Skip to content

Commit c09d7df

Browse files
Merge pull request #5581 from topcoder-platform/develop
Release v1.9.8
2 parents fe5d80c + 16ade0c commit c09d7df

File tree

3 files changed

+76
-15
lines changed

3 files changed

+76
-15
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ workflows:
361361
filters:
362362
branches:
363363
only:
364-
- thrive-bug-fixes2
364+
- free
365365
# This is stage env for production QA releases
366366
- "build-prod-staging":
367367
context : org-global

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

Lines changed: 66 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,12 @@ export class ChallengeListingPageHelper {
7272
await BrowserHelper.sleep(5000);
7373

7474
const firstChallenge = ChallengeListingPageObject.firstChallengeLink;
75-
let firstChallengeName = '';
76-
if (await firstChallenge.isPresent()) {
77-
firstChallengeName = await firstChallenge.getText();
75+
76+
const isPresent = await firstChallenge.isPresent();
77+
expect(isPresent).toEqual(true);
78+
79+
if (isPresent) {
80+
const firstChallengeName = await firstChallenge.getText();
7881
expect(firstChallengeName).toEqual(searchString);
7982
}
8083
}
@@ -218,6 +221,35 @@ export class ChallengeListingPageHelper {
218221
let filtersVisibility = await CommonHelper.isDisplayed(ChallengeListingPageObject.subCommunityLabel);
219222
expect(filtersVisibility).toBe(true);
220223

224+
// Filter by Development Challenges
225+
let el = await ChallengeListingPageObject.designSwitch();
226+
await el.click();
227+
await CommonHelper.waitUntilPresenceOf(
228+
() => ChallengeListingPageObject.designSwitchTurnedOff,
229+
'wait for design switch turn off',
230+
false
231+
);
232+
233+
el = await ChallengeListingPageObject.dataScienceSwitch();
234+
await el.click();
235+
await CommonHelper.waitUntilPresenceOf(
236+
() => ChallengeListingPageObject.dataScienceSwitchTurnedOff,
237+
'wait for data science switch turn off',
238+
false
239+
);
240+
241+
el = await ChallengeListingPageObject.qaSwitch();
242+
await el.click();
243+
await CommonHelper.waitUntilPresenceOf(
244+
() => ChallengeListingPageObject.qaSwitchTurnedOff,
245+
'wait for qa switch turn off',
246+
false
247+
);
248+
249+
// Filter by Challenge type
250+
await ChallengeListingPageObject.first2FinishCheckbox.click();
251+
await ChallengeListingPageObject.taskCheckbox.click();
252+
221253
await ChallengeListingPageObject.challengeSearchBox.sendKeys('ReactJS');
222254
await BrowserHelper.sleep(5000);
223255
await this.verifyChallengesMatchingKeyword(['ReactJS']);
@@ -505,6 +537,7 @@ export class ChallengeListingPageHelper {
505537
// const tagText = ConfigHelper.getChallengeDetail().challengeTag;
506538
const tagText = 'EdgeNet';
507539
await this.waitForSubCommunity();
540+
508541
await ChallengeListingPageObject.challengeSearchBox.sendKeys(tagText);
509542
await BrowserHelper.sleep(2000);
510543

@@ -514,6 +547,36 @@ export class ChallengeListingPageHelper {
514547
false
515548
);
516549
await ChallengeListingPageObject.getChallengeTag(tagText).click();
550+
551+
// Filter by Development Challenges
552+
let el = await ChallengeListingPageObject.designSwitch();
553+
await el.click();
554+
await CommonHelper.waitUntilPresenceOf(
555+
() => ChallengeListingPageObject.designSwitchTurnedOff,
556+
'wait for design switch turn off',
557+
false
558+
);
559+
560+
el = await ChallengeListingPageObject.dataScienceSwitch();
561+
await el.click();
562+
await CommonHelper.waitUntilPresenceOf(
563+
() => ChallengeListingPageObject.dataScienceSwitchTurnedOff,
564+
'wait for data science switch turn off',
565+
false
566+
);
567+
568+
el = await ChallengeListingPageObject.qaSwitch();
569+
await el.click();
570+
await CommonHelper.waitUntilPresenceOf(
571+
() => ChallengeListingPageObject.qaSwitchTurnedOff,
572+
'wait for qa switch turn off',
573+
false
574+
);
575+
576+
// Filter by Challenge type
577+
await ChallengeListingPageObject.first2FinishCheckbox.click();
578+
await ChallengeListingPageObject.taskCheckbox.click();
579+
517580
// waiting for re-render to happen
518581
await BrowserHelper.sleep(15000);
519582

src/shared/containers/tc-communities/Loader.jsx

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,19 @@ class Loader extends React.Component {
4646
!meta /* || (Date.now() - meta.timestamp) > MAXAGE */
4747
)) nextProps.loadMetaData(communityId, tokenV3);
4848

49-
/* TODO: This is a hacky way to handle SSO authentication for TopGear
50-
* (Wipro) and Zurich community visitors. Should be re-factored, but not it is not
51-
* clear, what exactly do we need to support it in general. */
52-
if ((communityId === 'wipro' || communityId === 'comcast') && !visitorGroups) {
49+
/* TODO: This is a hacky way to handle SSO authentication for TopGear */
50+
if (communityId === 'comcast' && !visitorGroups) {
5351
const returnUrl = encodeURIComponent(window.location.href);
54-
if (communityId === 'wipro') {
55-
window.location = `${config.URL.AUTH}/?retUrl=${config.URL.TOPGEAR}`;
56-
}
5752
window.location = `${config.URL.AUTH}/member?retUrl=${returnUrl}&utm_source=${communityId}`;
5853
}
5954

60-
/* Redirect odl TopGear home to new TopGear App */
61-
if (communityId === 'wipro'
62-
&& (window.location.pathname === '/' || window.location.pathname === '/__community__/wipro')) {
63-
window.location = config.URL.TOPGEAR;
55+
/* Redirect old TopGear home to new TopGear App and login redirect */
56+
if (communityId === 'wipro') {
57+
if (!visitorGroups) {
58+
window.location = `${config.URL.AUTH}/?retUrl=${config.URL.TOPGEAR}&utm_source=${communityId}`;
59+
} else if (window.location.pathname === '/' || window.location.pathname === '/__community__/wipro') {
60+
window.location = config.URL.TOPGEAR;
61+
}
6462
}
6563
}
6664

0 commit comments

Comments
 (0)