From cfd68afc649d430c9fd26e1a77fd6190ec36ff5a Mon Sep 17 00:00:00 2001 From: tc_user Date: Tue, 6 Jul 2021 15:11:50 +0800 Subject: [PATCH 1/2] fix failing tests circle ci --- connect-automation/config/config.json | 2 +- .../project-creation-flow/projects/projects.helper.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/connect-automation/config/config.json b/connect-automation/config/config.json index 5423dd226..3c61e1c48 100644 --- a/connect-automation/config/config.json +++ b/connect-automation/config/config.json @@ -23,5 +23,5 @@ "accountAndSecurityUrl": "https://connect.topcoder-dev.com/settings/account", "notificationsUrl": "https://connect.topcoder-dev.com/notifications", "allProjectsUrl": "https://connect.topcoder-dev.com/projects", - "givenProjectUrl": "https://connect.topcoder-dev.com/projects/17236" + "givenProjectUrl": "https://connect.topcoder-dev.com/projects/18013" } diff --git a/connect-automation/page-objects/project-creation-flow/projects/projects.helper.ts b/connect-automation/page-objects/project-creation-flow/projects/projects.helper.ts index 6c4bd1f30..f09726b9c 100644 --- a/connect-automation/page-objects/project-creation-flow/projects/projects.helper.ts +++ b/connect-automation/page-objects/project-creation-flow/projects/projects.helper.ts @@ -45,7 +45,7 @@ export class ProjectsHelper { * @param searchProject object for search */ public static async verifyProjectSearch(searchProject: ISearchProject) { - await BrowserHelper.sleep(3000); + await BrowserHelper.sleep(8000); const allProjectsBeforeSearch = await this.projectsPageObject.projectTitles(); const beforeSearchLength = allProjectsBeforeSearch.length; const firstProjectBeforeSearch = await allProjectsBeforeSearch[0].getText(); From 1b6fee8d6081432ee701726b2fbc19edae7f0a07 Mon Sep 17 00:00:00 2001 From: tc_user Date: Tue, 6 Jul 2021 15:39:29 +0800 Subject: [PATCH 2/2] seperate project url --- connect-automation/config/config.json | 3 ++- .../project-settings/project-settings.helper.ts | 5 +++-- .../page-objects/project-settings/project-settings.po.ts | 6 ++++-- .../project-settings-flow/project-settings.spec.ts | 8 ++++++-- connect-automation/utils/config-helper.ts | 7 +++++++ 5 files changed, 22 insertions(+), 7 deletions(-) diff --git a/connect-automation/config/config.json b/connect-automation/config/config.json index 3c61e1c48..06dd18781 100644 --- a/connect-automation/config/config.json +++ b/connect-automation/config/config.json @@ -23,5 +23,6 @@ "accountAndSecurityUrl": "https://connect.topcoder-dev.com/settings/account", "notificationsUrl": "https://connect.topcoder-dev.com/notifications", "allProjectsUrl": "https://connect.topcoder-dev.com/projects", - "givenProjectUrl": "https://connect.topcoder-dev.com/projects/18013" + "givenProjectUrl": "https://connect.topcoder-dev.com/projects/18013", + "expiredProjectUrl": "https://connect.topcoder-dev.com/projects/17236" } diff --git a/connect-automation/page-objects/project-settings/project-settings.helper.ts b/connect-automation/page-objects/project-settings/project-settings.helper.ts index a4189f429..0930acf25 100644 --- a/connect-automation/page-objects/project-settings/project-settings.helper.ts +++ b/connect-automation/page-objects/project-settings/project-settings.helper.ts @@ -14,9 +14,10 @@ export class ProjectSettingsPageHelper { /** * Open Home page + * @param expired */ - public static async open() { - await ProjectSettingsPageObject.open(); + public static async open(expired = false) { + await ProjectSettingsPageObject.open(expired); await CommonHelper.waitForPageDisplayed(); await BrowserHelper.sleep(10000); await CommonHelper.waitForElementToGetDisplayed(this.projectSettingsPageObject.getProjectMenu('Project Settings')); diff --git a/connect-automation/page-objects/project-settings/project-settings.po.ts b/connect-automation/page-objects/project-settings/project-settings.po.ts index eabfe25ff..6e9dffa83 100644 --- a/connect-automation/page-objects/project-settings/project-settings.po.ts +++ b/connect-automation/page-objects/project-settings/project-settings.po.ts @@ -5,9 +5,11 @@ import { ConfigHelper } from '../../utils/config-helper'; export class ProjectSettingsPageObject { /** * Open the Given Project URL + * @param expired */ - public static async open() { - await BrowserHelper.open(ConfigHelper.getGivenProjectUrl()); + public static async open(expired = false) { + const url = expired ? ConfigHelper.getExpiredProjectUrl() : ConfigHelper.getGivenProjectUrl() + await BrowserHelper.open(url); logger.info('User navigated to Project Page'); } diff --git a/connect-automation/test-suites/project-settings-flow/project-settings.spec.ts b/connect-automation/test-suites/project-settings-flow/project-settings.spec.ts index 301115f05..1230688d3 100644 --- a/connect-automation/test-suites/project-settings-flow/project-settings.spec.ts +++ b/connect-automation/test-suites/project-settings-flow/project-settings.spec.ts @@ -22,11 +22,11 @@ describe('Connect App - Project Settings Tests:', () => { beforeEach(async () => { ProjectSettingsPageHelper.initialize(); - // Step Sequence #1: Go to the given app URL - await ProjectSettingsPageHelper.open(); }); it('[TC_001] Should verify user can update Project Details ( eg NDA, Default Group)', async () => { + // Step Sequence #1: Go to the given app URL + await ProjectSettingsPageHelper.open(); // Resetting Existing Project Settings await ProjectSettingsPageHelper.resetSettings(); @@ -35,18 +35,22 @@ describe('Connect App - Project Settings Tests:', () => { }); it('[TC_002] Should verify system showing Billing Account expiry information.', async () => { + await ProjectSettingsPageHelper.open(true); await ProjectSettingsPageHelper.verifyAccountExpiryInformation(); }); it('[TC_003] Should verify user can Add/Edit/Delete/Download Files', async () => { + await ProjectSettingsPageHelper.open(); await ProjectSettingsPageHelper.verifyUserCanAddEditDeleteDownloadFiles(testData.projectSettings); }); it('[TC_004] Should verify user can Add/Edit/Delete/Download Links', async () => { + await ProjectSettingsPageHelper.open(); await ProjectSettingsPageHelper.verifyUserCanAddEditDeleteDownloadLinks(testData.projectSettings); }); it('[TC_005] Should verify user can Add Message with Files Attachment', async () => { + await ProjectSettingsPageHelper.open(); await ProjectSettingsPageHelper.verifyUserCanAddMessageWithFileAttachment(testData.projectSettings); }); }); diff --git a/connect-automation/utils/config-helper.ts b/connect-automation/utils/config-helper.ts index 46c22e821..99df6c111 100644 --- a/connect-automation/utils/config-helper.ts +++ b/connect-automation/utils/config-helper.ts @@ -112,4 +112,11 @@ export const ConfigHelper = { getGivenProjectUrl(): string { return this.getConfig().givenProjectUrl; }, + + /** + * Get Expired Project URL + */ + getExpiredProjectUrl(): string { + return this.getConfig().expiredProjectUrl; + }, };