Skip to content

Commit 29b38f1

Browse files
Merge pull request #5624 from topcoder-platform/ast-login-fix
Automated Smoke Testing - Login
2 parents dedd15a + 731f4a0 commit 29b38f1

File tree

6 files changed

+12
-10
lines changed

6 files changed

+12
-10
lines changed

.circleci/config.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ jobs:
248248
source buildenvvar
249249
./automated-smoke-test/smoketest.sh automation-config-staging.json prod
250250
- store_artifacts:
251-
path: /automated-smoke-test/test-results
251+
path: ./automated-smoke-test/test-results
252252

253253
# Automated Smoke Testing against Production
254254
Smoke-Testing-On-Production:
@@ -273,6 +273,8 @@ jobs:
273273
source awsenvconf
274274
source buildenvvar
275275
./automated-smoke-test/smoketest.sh automation-config-prod.json prod
276+
- store_artifacts:
277+
path: ./automated-smoke-test/test-results
276278

277279
# Test job for the cases when we do not need deployment. It just rapidly
278280
# installs (updates) app dependencies, and runs tests (ESLint, Stylelint,

automated-smoke-test/conf.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ exports.config = {
3434
framework: 'jasmine2',
3535

3636
specs: [
37-
// '../temp/test-suites/tc-login.spec.js'
37+
'../temp/test-suites/tc-login.spec.js',
3838
// '../temp/test-suites/tc-tools.spec.js',
3939
// '../temp/test-suites/tc-account.spec.js',
4040
// '../temp/test-suites/tc-profile.spec.js',

automated-smoke-test/page-objects/pages/topcoder/login/login.constants.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ export class LoginPageConstants {
55
static get errors() {
66
return {
77
InvalidPassword:
8-
'That password is incorrect. Please check that you entered the right one.',
8+
'WRONG USERNAME OR PASSWORD.',
99
MemberNotPresent:
10-
"We couldn't find a member with that username. Please check that you entered it correctly.",
10+
"WRONG USERNAME OR PASSWORD.",
1111
};
1212
}
1313
}

automated-smoke-test/page-objects/pages/topcoder/login/login.helper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export class LoginPageHelper {
4848
* @param {String} password
4949
*/
5050
public static async verifyLogin(username: string, password: string) {
51-
await CommonHelper.verifyCurrentUrl(ConfigHelper.getLoginUrl());
51+
await CommonHelper.verifyCurrentUrlToContain(ConfigHelper.getLoginUrl());
5252
await this.loginPageObject.waitForLoginForm();
5353
await this.loginPageObject.fillLoginForm(username, password);
5454
const homePage = await this.loginPageObject.waitForHomePage();

automated-smoke-test/page-objects/pages/topcoder/login/login.po.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export class LoginPage {
4848
* Get Error message
4949
*/
5050
public get errorMessage() {
51-
return ElementHelper.getElementByClassName('form-error');
51+
return ElementHelper.getElementByCss('.auth0-global-message.auth0-global-message-error .animated.fadeInUp span');
5252
}
5353

5454
/**

automated-smoke-test/test-suites/tc-login.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ describe('Topcoder Login Page Tests: ', () => {
3232
* Verifies User cannot login using invalid username
3333
*/
3434
it('[TC_002] should Verify User cannot login using invalid username', async () => {
35-
const invalidUsername = testData.login.invalidUsername;
35+
const { invalidUsername } = testData.login;
3636
const password = ConfigHelper.getPassword();
3737
await LoginPageHelper.verifyLoginWithInvalidUserName(
3838
invalidUsername,
39-
password
39+
password,
4040
);
4141
});
4242

@@ -45,10 +45,10 @@ describe('Topcoder Login Page Tests: ', () => {
4545
*/
4646
it('[TC_003] should Verify User cannot login using invalid password', async () => {
4747
const username = ConfigHelper.getUserName();
48-
const inavlidPassword = testData.login.invalidPassword;
48+
const { invalidPassword } = testData.login;
4949
await LoginPageHelper.verifyLoginWithInvalidPassword(
5050
username,
51-
inavlidPassword
51+
invalidPassword,
5252
);
5353
});
5454

0 commit comments

Comments
 (0)