diff --git a/.circleci/config.yml b/.circleci/config.yml index a5c743987e..101a1bc599 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -341,7 +341,6 @@ workflows: branches: only: - develop - - topgear-login-redirect # This is alternate dev env for parallel testing - "build-test": context : org-global @@ -370,7 +369,6 @@ workflows: branches: only: - develop - - topgear-login-redirect # Production builds are exectuted # when PR is merged to the master # Don't change anything in this configuration diff --git a/automated-smoke-test/page-objects/pages/topcoder/challenge-listing/challenge-listing.helper.ts b/automated-smoke-test/page-objects/pages/topcoder/challenge-listing/challenge-listing.helper.ts index 29fa9578a3..3f6b1015f2 100644 --- a/automated-smoke-test/page-objects/pages/topcoder/challenge-listing/challenge-listing.helper.ts +++ b/automated-smoke-test/page-objects/pages/topcoder/challenge-listing/challenge-listing.helper.ts @@ -72,9 +72,12 @@ export class ChallengeListingPageHelper { await BrowserHelper.sleep(5000); const firstChallenge = ChallengeListingPageObject.firstChallengeLink; - let firstChallengeName = ''; - if (await firstChallenge.isPresent()) { - firstChallengeName = await firstChallenge.getText(); + + const isPresent = await firstChallenge.isPresent(); + expect(isPresent).toEqual(true); + + if (isPresent) { + const firstChallengeName = await firstChallenge.getText(); expect(firstChallengeName).toEqual(searchString); } } @@ -218,6 +221,35 @@ export class ChallengeListingPageHelper { let filtersVisibility = await CommonHelper.isDisplayed(ChallengeListingPageObject.subCommunityLabel); expect(filtersVisibility).toBe(true); + // Filter by Development Challenges + let el = await ChallengeListingPageObject.designSwitch(); + await el.click(); + await CommonHelper.waitUntilPresenceOf( + () => ChallengeListingPageObject.designSwitchTurnedOff, + 'wait for design switch turn off', + false + ); + + el = await ChallengeListingPageObject.dataScienceSwitch(); + await el.click(); + await CommonHelper.waitUntilPresenceOf( + () => ChallengeListingPageObject.dataScienceSwitchTurnedOff, + 'wait for data science switch turn off', + false + ); + + el = await ChallengeListingPageObject.qaSwitch(); + await el.click(); + await CommonHelper.waitUntilPresenceOf( + () => ChallengeListingPageObject.qaSwitchTurnedOff, + 'wait for qa switch turn off', + false + ); + + // Filter by Challenge type + await ChallengeListingPageObject.first2FinishCheckbox.click(); + await ChallengeListingPageObject.taskCheckbox.click(); + await ChallengeListingPageObject.challengeSearchBox.sendKeys('ReactJS'); await BrowserHelper.sleep(5000); await this.verifyChallengesMatchingKeyword(['ReactJS']); @@ -505,6 +537,7 @@ export class ChallengeListingPageHelper { // const tagText = ConfigHelper.getChallengeDetail().challengeTag; const tagText = 'EdgeNet'; await this.waitForSubCommunity(); + await ChallengeListingPageObject.challengeSearchBox.sendKeys(tagText); await BrowserHelper.sleep(2000); @@ -514,6 +547,36 @@ export class ChallengeListingPageHelper { false ); await ChallengeListingPageObject.getChallengeTag(tagText).click(); + + // Filter by Development Challenges + let el = await ChallengeListingPageObject.designSwitch(); + await el.click(); + await CommonHelper.waitUntilPresenceOf( + () => ChallengeListingPageObject.designSwitchTurnedOff, + 'wait for design switch turn off', + false + ); + + el = await ChallengeListingPageObject.dataScienceSwitch(); + await el.click(); + await CommonHelper.waitUntilPresenceOf( + () => ChallengeListingPageObject.dataScienceSwitchTurnedOff, + 'wait for data science switch turn off', + false + ); + + el = await ChallengeListingPageObject.qaSwitch(); + await el.click(); + await CommonHelper.waitUntilPresenceOf( + () => ChallengeListingPageObject.qaSwitchTurnedOff, + 'wait for qa switch turn off', + false + ); + + // Filter by Challenge type + await ChallengeListingPageObject.first2FinishCheckbox.click(); + await ChallengeListingPageObject.taskCheckbox.click(); + // waiting for re-render to happen await BrowserHelper.sleep(15000);