Skip to content

Commit d3ff029

Browse files
Merge branch 'develop' into feature/profile-add-edgenet
2 parents 05192bf + 16ade0c commit d3ff029

File tree

20 files changed

+114
-43
lines changed

20 files changed

+114
-43
lines changed

.circleci/config.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,6 @@ workflows:
341341
branches:
342342
only:
343343
- develop
344-
- topgear-app
345344
# This is alternate dev env for parallel testing
346345
- "build-test":
347346
context : org-global
@@ -370,7 +369,6 @@ workflows:
370369
branches:
371370
only:
372371
- develop
373-
- feature/profile-add-edgenet
374372
# Production builds are exectuted
375373
# when PR is merged to the master
376374
# Don't change anything in this configuration
@@ -392,9 +390,7 @@ workflows:
392390
- develop
393391

394392
Smoke Testing:
395-
when:
396-
and:
397-
- << pipeline.parameters.run_smoketesting >>
393+
when: << pipeline.parameters.run_smoketesting >>
398394
jobs:
399395
- Hold [Smoke-Testing]:
400396
type: approval

automated-smoke-test/config/automation-config-beta.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@
103103
"termUrl": "https://beta-community-app.topcoder.com/challenges/terms/detail/9ef9dec4-dddb-48c9-9cce-659db68bc5ac",
104104
"forumUrl": "https://apps.topcoder.com/forums/?module=Category&categoryID=82117",
105105
"submissionUrl": "https://beta-community-app.topcoder.com/challenges/4bd5cf15-41ee-4932-927d-fda5731ec023/submit",
106-
"scorecardUrl": "https://software.topcoder.com/review/actions/ViewScorecard?scid=30002133"
106+
"scorecardUrl": "https://software.topcoder.com/review/actions/ViewScorecard?scid=30002133",
107+
"searchText": "KGuTnJmJ"
107108
},
108109
"myDashboard": {
109110
"url": "https://beta-community-app.topcoder.com/my-dashboard",

automated-smoke-test/config/automation-config-dev.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@
104104
"termUrl": "https://community-app.topcoder-dev.com/challenges/terms/detail/b11da5cd-713f-478d-90f4-f679ef53ee95",
105105
"forumUrl": "https://apps.topcoder-dev.com/forums/?module=Category&categoryID=0",
106106
"submissionUrl": "https://community-app.topcoder-dev.com/challenges/e0db3e96-522e-4b56-b954-a514acfd536e/submit",
107-
"scorecardUrl": "https://software.topcoder-dev.com/review/actions/ViewScorecard?scid=30056744"
107+
"scorecardUrl": "https://software.topcoder-dev.com/review/actions/ViewScorecard?scid=30056744",
108+
"searchText": "KGuTnJmJ"
108109
},
109110
"myDashboard": {
110111
"url": "https://community-app.topcoder-dev.com/my-dashboard",

automated-smoke-test/config/automation-config-local.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@
9999
"termUrl": "http://localhost:3000/challenges/terms/detail/9ef9dec4-dddb-48c9-9cce-659db68bc5ac",
100100
"forumUrl": "https://apps.topcoder.com/forums/?module=Category&categoryID=82117",
101101
"submissionUrl": "http://localhost:3000/challenges/4bd5cf15-41ee-4932-927d-fda5731ec023/submit",
102-
"scorecardUrl": "https://software.topcoder.com/review/actions/ViewScorecard?scid=30002133"
102+
"scorecardUrl": "https://software.topcoder.com/review/actions/ViewScorecard?scid=30002133",
103+
"searchText": "KGuTnJmJ"
103104
},
104105
"myDashboard": {
105106
"url": "http://localhost:3000/my-dashboard",

automated-smoke-test/config/automation-config-prod.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@
9999
"termUrl": "https://www.topcoder.com/challenges/terms/detail/9ef9dec4-dddb-48c9-9cce-659db68bc5ac",
100100
"forumUrl": "https://apps.topcoder.com/forums/?module=Category&categoryID=82117",
101101
"submissionUrl": "https://www.topcoder.com/challenges/4bd5cf15-41ee-4932-927d-fda5731ec023/submit",
102-
"scorecardUrl": "https://software.topcoder.com/review/actions/ViewScorecard?scid=30002133"
102+
"scorecardUrl": "https://software.topcoder.com/review/actions/ViewScorecard?scid=30002133",
103+
"searchText": "KGuTnJmJ"
103104
},
104105
"myDashboard": {
105106
"url": "https://www.topcoder.com/my-dashboard",

automated-smoke-test/config/automation-config-qa.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@
104104
"termUrl": "https://qa-community-app.topcoder-dev.com/challenges/terms/detail/b11da5cd-713f-478d-90f4-f679ef53ee95",
105105
"forumUrl": "https://apps.topcoder-dev.com/forums/?module=Category&categoryID=0",
106106
"submissionUrl": "https://qa-community-app.topcoder-dev.com/challenges/ee951f3e-8c3d-41d7-b232-aa8774ff7f27/submit",
107-
"scorecardUrl": "https://software.topcoder-dev.com/review/actions/ViewScorecard?scid=30001610"
107+
"scorecardUrl": "https://software.topcoder-dev.com/review/actions/ViewScorecard?scid=30001610",
108+
"searchText": "KGuTnJmJ"
108109
},
109110
"myDashboard": {
110111
"url": "https://qa-community-app.topcoder-dev.com/my-dashboard",

automated-smoke-test/config/automation-config-staging.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@
104104
"termUrl": "https://staging-community-app.topcoder.com/challenges/terms/detail/9ef9dec4-dddb-48c9-9cce-659db68bc5ac",
105105
"forumUrl": "https://apps.topcoder.com/forums/?module=Category&categoryID=82117",
106106
"submissionUrl": "https://staging-community-app.topcoder.com/challenges/4bd5cf15-41ee-4932-927d-fda5731ec023/submit",
107-
"scorecardUrl": "https://software.topcoder.com/review/actions/ViewScorecard?scid=30002133"
107+
"scorecardUrl": "https://software.topcoder.com/review/actions/ViewScorecard?scid=30002133",
108+
"searchText": "KGuTnJmJ"
108109
},
109110
"myDashboard": {
110111
"url": "https://staging-community-app.topcoder.com/my-dashboard",

automated-smoke-test/config/automation-config-test.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@
104104
"termUrl": "https://test-community-app.topcoder-dev.com/challenges/terms/detail/b11da5cd-713f-478d-90f4-f679ef53ee95",
105105
"forumUrl": "https://apps.topcoder-dev.com/forums/?module=Category&categoryID=0",
106106
"submissionUrl": "https://test-community-app.topcoder-dev.com/challenges/ee951f3e-8c3d-41d7-b232-aa8774ff7f27/submit",
107-
"scorecardUrl": "https://software.topcoder-dev.com/review/actions/ViewScorecard?scid=30001610"
107+
"scorecardUrl": "https://software.topcoder-dev.com/review/actions/ViewScorecard?scid=30001610",
108+
"searchText": "KGuTnJmJ"
108109
},
109110
"myDashboard": {
110111
"url": "https://test-community-app.topcoder-dev.com/my-dashboard",

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

Lines changed: 68 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,17 @@ export class ChallengeListingPageHelper {
6767
false
6868
);
6969

70-
const searchString = ConfigHelper.getChallengeDetail().challengeName;
70+
const searchString = ConfigHelper.getChallengeDetail().searchText;
7171
await ChallengeListingPageObject.challengeSearchBox.sendKeys(searchString);
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']);
@@ -503,8 +535,9 @@ export class ChallengeListingPageHelper {
503535
*/
504536
static async verifyChallengesByChallengeTag() {
505537
// const tagText = ConfigHelper.getChallengeDetail().challengeTag;
506-
const tagText = 'ReactJS';
538+
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

automated-smoke-test/utils/config-helper.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export interface ChallengeDetail {
2020
forumUrl: string;
2121
submissionUrl: string;
2222
scorecardUrl: string;
23+
searchText: string,
2324
}
2425

2526
export interface CommunityCardInfo {

src/assets/images/tc-edu/icon-radio-checked.svg

Lines changed: 0 additions & 3 deletions
Loading

src/assets/images/tc-edu/icon-radio-un-check.svg

Lines changed: 1 addition & 3 deletions
Loading

src/shared/components/Contentful/SearchBar/SearchBar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ export class SearchBarInner extends Component {
324324
<a className={theme.authorLink} href={`${config.TC_EDU_BASE_PATH}${config.TC_EDU_SEARCH_PATH}?author=${item.name}`}>
325325
{item.tcHandle}
326326
{
327-
item.tcHandle ? (
327+
item.name ? (
328328
<span className={theme.authorName}>
329329
{item.name}
330330
</span>

src/shared/components/Contentful/SearchPageFilter/FilterAuthor/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export class FilterAuthorInner extends Component {
7272
}}
7373
>
7474
<span>{selected}</span>
75-
<IconArrow className={theme['icon-arrow']} />
75+
<IconArrow className={theme[isShowPopup ? 'icon-arrow-popup' : 'icon-arrow']} />
7676
</button>
7777
{isShowPopup && (
7878
<div className={theme.popup}>

src/shared/components/Contentful/SearchPageFilter/FilterAuthor/themes/default.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,17 @@ $text-black: #2a2a2a;
5353
}
5454
}
5555

56+
.icon-arrow-popup {
57+
-moz-transform: none;
58+
-o-transform: none;
59+
-webkit-transform: none;
60+
transform: none;
61+
62+
polygon {
63+
fill: #aaa;
64+
}
65+
}
66+
5667
.popup {
5768
position: absolute;
5869
left: 0;

src/shared/components/Contentful/SearchPageFilter/FilterRadio/themes/default.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@ $text-black: #2a2a2a;
2828

2929
span {
3030
margin-left: 11px;
31+
cursor: default;
3132
}
3233
}

src/shared/components/Contentful/SearchPageFilter/FilterTags/index.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,12 @@ export class FilterTagsInner extends Component {
6666
value={inputValue}
6767
onChange={(e) => { this.setState({ inputValue: e.target.value }); }}
6868
onKeyDown={(e) => {
69-
if (e.key === 'Enter' && inputValue && inputValue.trim() && !isTagExist(inputValue)) {
69+
if (e.key === 'Enter' && inputValue && inputValue.trim() && !isTagExist(inputValue) && tags.length <= 4) {
7070
onAddNewTag(inputValue);
7171
this.setState({ inputValue: '' });
7272
}
7373
}}
74+
maxLength="40"
7475
/>
7576
<div className={theme['tag-container']}>
7677
{

src/shared/components/Contentful/TracksFilter/TracksTags/index.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ export class TracksTagsInner extends Component {
8585
type="text"
8686
className={theme['tags-field']}
8787
placeholder="Add tags to filter content..."
88+
maxLength="40"
8889
/>
8990
</div>
9091
</div>

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

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,20 @@ 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
}
54+
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+
}
62+
}
5963
}
6064

6165
render() {

src/shared/routes/Communities/Wipro/Routes.jsx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import Viewport from 'components/Contentful/Viewport';
2020
import theme from 'components/tc-communities/communities/wipro/theme';
2121
import { ThemeProvider } from 'react-css-super-themr';
2222
import { Route, Switch } from 'react-router-dom';
23-
import { config, isomorphy } from 'topcoder-react-utils';
23+
import { config } from 'topcoder-react-utils';
2424

2525
import Leaderboard from '../Leaderboard';
2626

@@ -122,15 +122,6 @@ export default function Wipro({ base, meta }) {
122122
spaceName="topgear"
123123
/>
124124
*/}
125-
<Route
126-
path={base}
127-
component={() => {
128-
if (isomorphy.isClientSide()) {
129-
window.location = config.URL.TOPGEAR;
130-
}
131-
return null;
132-
}}
133-
/>
134125
</Switch>
135126
<Viewport
136127
id="2rJCDsGCHTDygyx4dqxlNq"

0 commit comments

Comments
 (0)