From 716215269f8e63273558050ed28af00b9a416973 Mon Sep 17 00:00:00 2001 From: "Luiz R. Rodrigues" Date: Tue, 22 Jun 2021 03:33:08 -0300 Subject: [PATCH 1/7] ast: enable login test cases --- automated-smoke-test/conf.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/automated-smoke-test/conf.ts b/automated-smoke-test/conf.ts index 2148d113a8..68166254ed 100644 --- a/automated-smoke-test/conf.ts +++ b/automated-smoke-test/conf.ts @@ -34,14 +34,14 @@ exports.config = { framework: 'jasmine2', specs: [ - // '../temp/test-suites/tc-login.spec.js' + '../temp/test-suites/tc-login.spec.js' // '../temp/test-suites/tc-tools.spec.js', // '../temp/test-suites/tc-account.spec.js', // '../temp/test-suites/tc-profile.spec.js', // '../temp/test-suites/tc-header.spec.js', // '../temp/test-suites/tc-footer.spec.js', // '../temp/test-suites/tc-preferences.spec.js', - '../temp/test-suites/tc-challenge-listing.spec.js', + // '../temp/test-suites/tc-challenge-listing.spec.js', // '../temp/test-suites/tc-challenge-detail.spec.js', // '../temp/test-suites/tc-my-dashboard.spec.js', // '../temp/test-suites/tc-member-profile.spec.js', From 40e80f65a79060ef1213dc7ed080defde5be57a2 Mon Sep 17 00:00:00 2001 From: "Luiz R. Rodrigues" Date: Mon, 5 Jul 2021 19:21:56 -0300 Subject: [PATCH 2/7] Fix lint --- automated-smoke-test/test-suites/tc-login.spec.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/automated-smoke-test/test-suites/tc-login.spec.ts b/automated-smoke-test/test-suites/tc-login.spec.ts index 30c3c941ae..001c2b43b2 100644 --- a/automated-smoke-test/test-suites/tc-login.spec.ts +++ b/automated-smoke-test/test-suites/tc-login.spec.ts @@ -32,11 +32,11 @@ describe('Topcoder Login Page Tests: ', () => { * Verifies User cannot login using invalid username */ it('[TC_002] should Verify User cannot login using invalid username', async () => { - const invalidUsername = testData.login.invalidUsername; + const { invalidUsername } = testData.login; const password = ConfigHelper.getPassword(); await LoginPageHelper.verifyLoginWithInvalidUserName( invalidUsername, - password + password, ); }); @@ -45,10 +45,10 @@ describe('Topcoder Login Page Tests: ', () => { */ it('[TC_003] should Verify User cannot login using invalid password', async () => { const username = ConfigHelper.getUserName(); - const inavlidPassword = testData.login.invalidPassword; + const { invalidPassword } = testData.login; await LoginPageHelper.verifyLoginWithInvalidPassword( username, - inavlidPassword + invalidPassword, ); }); From f15afa4bef4020a365781ad63d5ddd53b2c0ea4c Mon Sep 17 00:00:00 2001 From: "Luiz R. Rodrigues" Date: Mon, 5 Jul 2021 19:23:14 -0300 Subject: [PATCH 3/7] Fix check login URL --- .../page-objects/pages/topcoder/login/login.helper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automated-smoke-test/page-objects/pages/topcoder/login/login.helper.ts b/automated-smoke-test/page-objects/pages/topcoder/login/login.helper.ts index f8ca773ee8..1f3dca2921 100644 --- a/automated-smoke-test/page-objects/pages/topcoder/login/login.helper.ts +++ b/automated-smoke-test/page-objects/pages/topcoder/login/login.helper.ts @@ -48,7 +48,7 @@ export class LoginPageHelper { * @param {String} password */ public static async verifyLogin(username: string, password: string) { - await CommonHelper.verifyCurrentUrl(ConfigHelper.getLoginUrl()); + await CommonHelper.verifyCurrentUrlToContain(ConfigHelper.getLoginUrl()); await this.loginPageObject.waitForLoginForm(); await this.loginPageObject.fillLoginForm(username, password); const homePage = await this.loginPageObject.waitForHomePage(); From 9043e11d953b5e7f0300e5c1da87140137652614 Mon Sep 17 00:00:00 2001 From: "Luiz R. Rodrigues" Date: Mon, 5 Jul 2021 19:30:00 -0300 Subject: [PATCH 4/7] ci: Deploy ast-login-fix to Stag env --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 101a1bc599..98a6f4fa5b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -369,6 +369,7 @@ workflows: branches: only: - develop + - ast-login-fix # Production builds are exectuted # when PR is merged to the master # Don't change anything in this configuration From 812c57871c5504abefab3a2ab185d4b5245ba697 Mon Sep 17 00:00:00 2001 From: tc_user Date: Tue, 6 Jul 2021 18:24:04 +0800 Subject: [PATCH 5/7] fix login e2e test failures --- .../page-objects/pages/topcoder/login/login.constants.ts | 4 ++-- .../page-objects/pages/topcoder/login/login.po.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/automated-smoke-test/page-objects/pages/topcoder/login/login.constants.ts b/automated-smoke-test/page-objects/pages/topcoder/login/login.constants.ts index d32e496d7d..6f1b184993 100644 --- a/automated-smoke-test/page-objects/pages/topcoder/login/login.constants.ts +++ b/automated-smoke-test/page-objects/pages/topcoder/login/login.constants.ts @@ -5,9 +5,9 @@ export class LoginPageConstants { static get errors() { return { InvalidPassword: - 'That password is incorrect. Please check that you entered the right one.', + 'WRONG USERNAME OR PASSWORD.', MemberNotPresent: - "We couldn't find a member with that username. Please check that you entered it correctly.", + "WRONG USERNAME OR PASSWORD.", }; } } diff --git a/automated-smoke-test/page-objects/pages/topcoder/login/login.po.ts b/automated-smoke-test/page-objects/pages/topcoder/login/login.po.ts index 39ca7685a9..89fa24f91d 100644 --- a/automated-smoke-test/page-objects/pages/topcoder/login/login.po.ts +++ b/automated-smoke-test/page-objects/pages/topcoder/login/login.po.ts @@ -48,7 +48,7 @@ export class LoginPage { * Get Error message */ public get errorMessage() { - return ElementHelper.getElementByClassName('form-error'); + return ElementHelper.getElementByCss('.auth0-global-message.auth0-global-message-error .animated.fadeInUp span'); } /** From aa35fe92b064c9659d646cbc90fa9ec0a71744df Mon Sep 17 00:00:00 2001 From: "Luiz R. Rodrigues" Date: Tue, 6 Jul 2021 10:25:24 -0300 Subject: [PATCH 6/7] ast: Enable finished Test Cases --- automated-smoke-test/conf.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/automated-smoke-test/conf.ts b/automated-smoke-test/conf.ts index 68166254ed..bc3828dc63 100644 --- a/automated-smoke-test/conf.ts +++ b/automated-smoke-test/conf.ts @@ -34,15 +34,15 @@ exports.config = { framework: 'jasmine2', specs: [ - '../temp/test-suites/tc-login.spec.js' + '../temp/test-suites/tc-login.spec.js', // '../temp/test-suites/tc-tools.spec.js', // '../temp/test-suites/tc-account.spec.js', // '../temp/test-suites/tc-profile.spec.js', // '../temp/test-suites/tc-header.spec.js', // '../temp/test-suites/tc-footer.spec.js', // '../temp/test-suites/tc-preferences.spec.js', - // '../temp/test-suites/tc-challenge-listing.spec.js', - // '../temp/test-suites/tc-challenge-detail.spec.js', + '../temp/test-suites/tc-challenge-listing.spec.js', + '../temp/test-suites/tc-challenge-detail.spec.js', // '../temp/test-suites/tc-my-dashboard.spec.js', // '../temp/test-suites/tc-member-profile.spec.js', ], From acff5ad6d50b9775df9897f26df6f142a1cf2502 Mon Sep 17 00:00:00 2001 From: "Luiz R. Rodrigues" Date: Tue, 6 Jul 2021 10:34:10 -0300 Subject: [PATCH 7/7] ast: Fix Store Artifacts --- .circleci/config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 98a6f4fa5b..c11479aa2c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -248,7 +248,7 @@ jobs: source buildenvvar ./automated-smoke-test/smoketest.sh automation-config-staging.json prod - store_artifacts: - path: /automated-smoke-test/test-results + path: ./automated-smoke-test/test-results # Automated Smoke Testing against Production Smoke-Testing-On-Production: @@ -273,6 +273,8 @@ jobs: source awsenvconf source buildenvvar ./automated-smoke-test/smoketest.sh automation-config-prod.json prod + - store_artifacts: + path: ./automated-smoke-test/test-results # Test job for the cases when we do not need deployment. It just rapidly # installs (updates) app dependencies, and runs tests (ESLint, Stylelint,