Skip to content

Commit a11b10f

Browse files
nursoltan-stc_user
andauthored
fix failing tests circle ci (#4400)
* fix failing tests circle ci * seperate project url Co-authored-by: tc_user <[email protected]>
1 parent a4962d5 commit a11b10f

File tree

6 files changed

+23
-8
lines changed

6 files changed

+23
-8
lines changed

connect-automation/config/config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,6 @@
2323
"accountAndSecurityUrl": "https://connect.topcoder-dev.com/settings/account",
2424
"notificationsUrl": "https://connect.topcoder-dev.com/notifications",
2525
"allProjectsUrl": "https://connect.topcoder-dev.com/projects",
26-
"givenProjectUrl": "https://connect.topcoder-dev.com/projects/17236"
26+
"givenProjectUrl": "https://connect.topcoder-dev.com/projects/18013",
27+
"expiredProjectUrl": "https://connect.topcoder-dev.com/projects/17236"
2728
}

connect-automation/page-objects/project-creation-flow/projects/projects.helper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export class ProjectsHelper {
4545
* @param searchProject object for search
4646
*/
4747
public static async verifyProjectSearch(searchProject: ISearchProject) {
48-
await BrowserHelper.sleep(3000);
48+
await BrowserHelper.sleep(8000);
4949
const allProjectsBeforeSearch = await this.projectsPageObject.projectTitles();
5050
const beforeSearchLength = allProjectsBeforeSearch.length;
5151
const firstProjectBeforeSearch = await allProjectsBeforeSearch[0].getText();

connect-automation/page-objects/project-settings/project-settings.helper.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ export class ProjectSettingsPageHelper {
1414

1515
/**
1616
* Open Home page
17+
* @param expired
1718
*/
18-
public static async open() {
19-
await ProjectSettingsPageObject.open();
19+
public static async open(expired = false) {
20+
await ProjectSettingsPageObject.open(expired);
2021
await CommonHelper.waitForPageDisplayed();
2122
await BrowserHelper.sleep(10000);
2223
await CommonHelper.waitForElementToGetDisplayed(this.projectSettingsPageObject.getProjectMenu('Project Settings'));

connect-automation/page-objects/project-settings/project-settings.po.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ import { ConfigHelper } from '../../utils/config-helper';
55
export class ProjectSettingsPageObject {
66
/**
77
* Open the Given Project URL
8+
* @param expired
89
*/
9-
public static async open() {
10-
await BrowserHelper.open(ConfigHelper.getGivenProjectUrl());
10+
public static async open(expired = false) {
11+
const url = expired ? ConfigHelper.getExpiredProjectUrl() : ConfigHelper.getGivenProjectUrl()
12+
await BrowserHelper.open(url);
1113
logger.info('User navigated to Project Page');
1214
}
1315

connect-automation/test-suites/project-settings-flow/project-settings.spec.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ describe('Connect App - Project Settings Tests:', () => {
2222

2323
beforeEach(async () => {
2424
ProjectSettingsPageHelper.initialize();
25-
// Step Sequence #1: Go to the given app URL
26-
await ProjectSettingsPageHelper.open();
2725
});
2826

2927
it('[TC_001] Should verify user can update Project Details ( eg NDA, Default Group)', async () => {
28+
// Step Sequence #1: Go to the given app URL
29+
await ProjectSettingsPageHelper.open();
3030
// Resetting Existing Project Settings
3131
await ProjectSettingsPageHelper.resetSettings();
3232

@@ -35,18 +35,22 @@ describe('Connect App - Project Settings Tests:', () => {
3535
});
3636

3737
it('[TC_002] Should verify system showing Billing Account expiry information.', async () => {
38+
await ProjectSettingsPageHelper.open(true);
3839
await ProjectSettingsPageHelper.verifyAccountExpiryInformation();
3940
});
4041

4142
it('[TC_003] Should verify user can Add/Edit/Delete/Download Files', async () => {
43+
await ProjectSettingsPageHelper.open();
4244
await ProjectSettingsPageHelper.verifyUserCanAddEditDeleteDownloadFiles(testData.projectSettings);
4345
});
4446

4547
it('[TC_004] Should verify user can Add/Edit/Delete/Download Links', async () => {
48+
await ProjectSettingsPageHelper.open();
4649
await ProjectSettingsPageHelper.verifyUserCanAddEditDeleteDownloadLinks(testData.projectSettings);
4750
});
4851

4952
it('[TC_005] Should verify user can Add Message with Files Attachment', async () => {
53+
await ProjectSettingsPageHelper.open();
5054
await ProjectSettingsPageHelper.verifyUserCanAddMessageWithFileAttachment(testData.projectSettings);
5155
});
5256
});

connect-automation/utils/config-helper.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,11 @@ export const ConfigHelper = {
112112
getGivenProjectUrl(): string {
113113
return this.getConfig().givenProjectUrl;
114114
},
115+
116+
/**
117+
* Get Expired Project URL
118+
*/
119+
getExpiredProjectUrl(): string {
120+
return this.getConfig().expiredProjectUrl;
121+
},
115122
};

0 commit comments

Comments
 (0)