Skip to content

Automated Smoke Testing - Login #5624

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jul 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion automated-smoke-test/conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ 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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

/**
Expand Down
8 changes: 4 additions & 4 deletions automated-smoke-test/test-suites/tc-login.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);
});

Expand All @@ -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,
);
});

Expand Down