Skip to content

Commit ad26fae

Browse files
Merge pull request #30 from topcoder-platform/integration-v5-challenge-api
Integration v5 challenge api
2 parents 8c2e6ef + 2b019ba commit ad26fae

File tree

140 files changed

+2166
-988
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+2166
-988
lines changed

.circleci/config.yml

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,35 @@ jobs:
9191
source awsenvconf
9292
source buildenvvar
9393
./master_deploy.sh -d ECS -e DEV -t latest -s test_communityapp_taskvar -i communityapp
94-
94+
95+
# Build & Deploy against testing backend
96+
"build-qa":
97+
<<: *defaults
98+
steps:
99+
# Initialization.
100+
- checkout
101+
- setup_remote_docker
102+
- run: *install_dependency
103+
- run: *install_deploysuite
104+
# Restoration of node_modules from cache.
105+
- restore_cache: *restore_cache_settings_for_build
106+
- run:
107+
name: "configuring environment"
108+
command: |
109+
./awsconfiguration.sh DEV
110+
./buildenv.sh -e DEV -b qa_communityapp_buildvar,qa_communityapp_deployvar
111+
# Build of Docker image.
112+
- run: *build_docker_image
113+
# Caching node modules.
114+
- save_cache: *save_cache_settings
115+
# Deployment.
116+
- deploy:
117+
name: Running MasterScript
118+
command: |
119+
source awsenvconf
120+
source buildenvvar
121+
./master_deploy.sh -d ECS -e DEV -t latest -s qa_communityapp_taskvar -i communityapp
122+
95123
# Build & Deploy against prod api backend
96124
"build-prod-beta":
97125
<<: *defaults
@@ -203,13 +231,21 @@ workflows:
203231
branches:
204232
only:
205233
- develop
234+
- feature-contentful
206235
# This is alternate dev env for parallel testing
207236
- "build-test":
208237
context : org-global
209238
filters:
210239
branches:
211-
only:
240+
only:
212241
- integration-v5-challenge-api
242+
# This is alternate dev env for parallel testing
243+
- "build-qa":
244+
context : org-global
245+
filters:
246+
branches:
247+
only:
248+
- develop
213249
# This is beta env for production soft releases
214250
- "build-prod-beta":
215251
context : org-global

__tests__/shared/components/ChallengeTile/__mocks__/design.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
"technologies": "",
1616
"status": "COMPLETED",
1717
"legacy": {
18-
"track": "DESIGN"
18+
"track": "DESIGN",
19+
"forumId": 599349
1920
},
2021
"subTrack": "LOGO_DESIGN",
2122
"name": "Sunshot - MapMySolar - SunGiver - Brand Concept Logo Design Challenge",
2223
"reviewType": "INTERNAL",
2324
"id": 30051608,
24-
"forumId": 599349,
2525
"numOfSubmissions": 22,
2626
"numOfRegistrants": 31,
2727
"registrationStartDate": "2015-10-01T22:21:07.491Z",
@@ -320,13 +320,13 @@
320320
"technologies": "",
321321
"status": "COMPLETED",
322322
"legacy": {
323-
"track": "DESIGN"
323+
"track": "DESIGN",
324+
"forumId": 598066
324325
},
325326
"subTrack": "LOGO_DESIGN",
326327
"name": "2016 Topcoder Open Logo Design Challenge",
327328
"reviewType": "INTERNAL",
328329
"id": 30051059,
329-
"forumId": 598066,
330330
"numOfSubmissions": 57,
331331
"numOfRegistrants": 111,
332332
"registrationStartDate": "2015-08-10T13:00:01.576Z",
@@ -532,13 +532,13 @@
532532
"technologies": "",
533533
"status": "COMPLETED",
534534
"legacy": {
535-
"track": "DESIGN"
535+
"track": "DESIGN",
536+
"forumId": 596557
536537
},
537538
"subTrack": "LOGO_DESIGN",
538539
"name": "ACME Logos Design Challenge",
539540
"reviewType": "INTERNAL",
540541
"id": 30050375,
541-
"forumId": 596557,
542542
"numOfSubmissions": 15,
543543
"numOfRegistrants": 55,
544544
"registrationStartDate": "2015-06-01T19:00:33.351Z",

__tests__/shared/components/ChallengeTile/__mocks__/develop.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
"technologies": "CSS, HTML, JavaScript",
2323
"status": "COMPLETED",
2424
"legacy": {
25-
"track": "DEVELOP"
25+
"track": "DEVELOP",
26+
"forumId": 39153
2627
},
2728
"subTrack": "FIRST_2_FINISH",
2829
"name": "$100 Eaton PX 2.0 Petting Zoo - MDC Web Enhancement F2F Challenge",
2930
"reviewType": "INTERNAL",
3031
"id": 30060905,
31-
"forumId": 39153,
3232
"numOfSubmissions": 3,
3333
"numOfRegistrants": 8,
3434
"registrationStartDate": "2017-12-02T09:01:23.251Z",
@@ -165,13 +165,13 @@
165165
"technologies": "ReactJS",
166166
"status": "COMPLETED",
167167
"legacy": {
168-
"track": "DEVELOP"
168+
"track": "DEVELOP",
169+
"forumId": 39151
169170
},
170171
"subTrack": "FIRST_2_FINISH",
171172
"name": "$100 Eaton PX 2.0 Petting Zoo - ReactJS Enhancement F2F Challenge",
172173
"reviewType": "INTERNAL",
173174
"id": 30060903,
174-
"forumId": 39151,
175175
"numOfSubmissions": 2,
176176
"numOfRegistrants": 6,
177177
"registrationStartDate": "2017-12-02T09:01:21.329Z",
@@ -323,13 +323,13 @@
323323
"technologies": "Angular 2+, Express, JSON, Node.js",
324324
"status": "COMPLETED",
325325
"legacy": {
326-
"track": "DEVELOP"
326+
"track": "DEVELOP",
327+
"forumId": 38951
327328
},
328329
"subTrack": "FIRST_2_FINISH",
329330
"name": "$500 BG800 Online Course Mock Rest API F2F Challenge",
330331
"reviewType": "INTERNAL",
331332
"id": 30060687,
332-
"forumId": 38951,
333333
"numOfSubmissions": 14,
334334
"numOfRegistrants": 18,
335335
"registrationStartDate": "2017-11-24T13:27:44.751Z",
@@ -631,13 +631,13 @@
631631
"technologies": "JavaScript, ReactJS",
632632
"status": "COMPLETED",
633633
"legacy": {
634-
"track": "DEVELOP"
634+
"track": "DEVELOP",
635+
"forumId": 38702
635636
},
636637
"subTrack": "FIRST_2_FINISH",
637638
"name": "John Hancock - Giving Tuesday - General image handling",
638639
"reviewType": "INTERNAL",
639640
"id": 30060425,
640-
"forumId": 38702,
641641
"numOfSubmissions": 3,
642642
"numOfRegistrants": 17,
643643
"registrationStartDate": "2017-11-11T02:02:21.127Z",

__tests__/shared/components/Header/__snapshots__/index.jsx.snap

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,17 @@ exports[`Default render 1`] = `
5858
"title": "All Challenges",
5959
},
6060
Object {
61-
"href": "https://arena.topcoder-dev.com",
61+
"href": "/community/arena",
6262
"title": "Competitive Programming",
6363
},
6464
Object {
6565
"href": "/community/taas",
6666
"title": "Gig Work",
6767
},
68+
Object {
69+
"href": "/community/practice",
70+
"title": "Practice",
71+
},
6872
],
6973
"title": "Compete",
7074
},
@@ -204,4 +208,4 @@ exports[`Default render 1`] = `
204208
}
205209
/>
206210
</div>
207-
`;
211+
`;

__tests__/shared/components/ProfilePage/Stats/SubTrackChallengeView/GalleryModal/__mocks__/challenge.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@
8383
"name": "2016 Topcoder Open Logo Design Challenge",
8484
"reviewType": "INTERNAL",
8585
"id": 30051059,
86-
"forumId": 598066,
86+
"legacy": {
87+
"forumId": 598066
88+
},
8789
"numOfSubmissions": 57,
8890
"numOfRegistrants": 111,
8991
"registrationStartDate": "2015-08-10T13:00:01.576Z",

__tests__/shared/components/ProfilePage/Stats/SubTrackChallengeView/__mocks__/develop.json

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@
3535
"name": "$100 Eaton PX 2.0 Petting Zoo - MDC Web Enhancement F2F Challenge",
3636
"reviewType": "INTERNAL",
3737
"id": 30060905,
38-
"forumId": 39153,
38+
"legacy": {
39+
"forumId": 39153
40+
},
3941
"numOfSubmissions": 3,
4042
"numOfRegistrants": 8,
4143
"registrationStartDate": "2017-12-02T09:01:23.251Z",
@@ -189,7 +191,9 @@
189191
"name": "$100 Eaton PX 2.0 Petting Zoo - ReactJS Enhancement F2F Challenge",
190192
"reviewType": "INTERNAL",
191193
"id": 30060903,
192-
"forumId": 39151,
194+
"legacy": {
195+
"forumId": 38951
196+
},
193197
"numOfSubmissions": 2,
194198
"numOfRegistrants": 6,
195199
"registrationStartDate": "2017-12-02T09:01:21.329Z",
@@ -385,7 +389,9 @@
385389
"name": "$500 BG800 Online Course Mock Rest API F2F Challenge",
386390
"reviewType": "INTERNAL",
387391
"id": 30060687,
388-
"forumId": 38951,
392+
"legacy": {
393+
"forumId": 38951
394+
},
389395
"numOfSubmissions": 14,
390396
"numOfRegistrants": 18,
391397
"registrationStartDate": "2017-11-24T13:27:44.751Z",
@@ -713,7 +719,9 @@
713719
"name": "John Hancock - Giving Tuesday - General image handling",
714720
"reviewType": "INTERNAL",
715721
"id": 30060425,
716-
"forumId": 38702,
722+
"legacy": {
723+
"forumId": 38702
724+
},
717725
"numOfSubmissions": 3,
718726
"numOfRegistrants": 17,
719727
"registrationStartDate": "2017-11-11T02:02:21.127Z",

__tests__/shared/components/ProfilePage/Stats/SubTrackChallengeView/__snapshots__/index.jsx.snap

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,14 @@ exports[`SubtrackChallengeView matches shallow snapshot 1`] = `
107107
"projectId": 30060905,
108108
},
109109
],
110-
"forumId": 39153,
111110
"groupIds": null,
112111
"handle": "thomaskranitsas",
113112
"id": 30060905,
114113
"isPrivate": false,
115114
"isTask": false,
115+
"legacy": Object {
116+
"forumId": 39153,
117+
},
116118
"name": "$100 Eaton PX 2.0 Petting Zoo - MDC Web Enhancement F2F Challenge",
117119
"numOfRegistrants": 8,
118120
"numOfSubmissions": 3,
@@ -285,12 +287,14 @@ exports[`SubtrackChallengeView matches shallow snapshot 1`] = `
285287
"projectId": 30060903,
286288
},
287289
],
288-
"forumId": 39151,
289290
"groupIds": null,
290291
"handle": "thomaskranitsas",
291292
"id": 30060903,
292293
"isPrivate": false,
293294
"isTask": false,
295+
"legacy": Object {
296+
"forumId": 38951,
297+
},
294298
"name": "$100 Eaton PX 2.0 Petting Zoo - ReactJS Enhancement F2F Challenge",
295299
"numOfRegistrants": 6,
296300
"numOfSubmissions": 2,
@@ -633,12 +637,14 @@ exports[`SubtrackChallengeView matches shallow snapshot 1`] = `
633637
"projectId": 30060687,
634638
},
635639
],
636-
"forumId": 38951,
637640
"groupIds": null,
638641
"handle": "thomaskranitsas",
639642
"id": 30060687,
640643
"isPrivate": false,
641644
"isTask": false,
645+
"legacy": Object {
646+
"forumId": 38951,
647+
},
642648
"name": "$500 BG800 Online Course Mock Rest API F2F Challenge",
643649
"numOfRegistrants": 18,
644650
"numOfSubmissions": 14,
@@ -867,12 +873,14 @@ exports[`SubtrackChallengeView matches shallow snapshot 1`] = `
867873
"projectId": 30060425,
868874
},
869875
],
870-
"forumId": 38702,
871876
"groupIds": null,
872877
"handle": "thomaskranitsas",
873878
"id": 30060425,
874879
"isPrivate": false,
875880
"isTask": false,
881+
"legacy": Object {
882+
"forumId": 38702,
883+
},
876884
"name": "John Hancock - Giving Tuesday - General image handling",
877885
"numOfRegistrants": 17,
878886
"numOfSubmissions": 3,
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`renders email preferences setting page correctly 1`] = `
4+
<div
5+
className="src-shared-components-Settings-Preferences-Email-___styles__EmailPreferences___2FUGT"
6+
>
7+
<h1
8+
className="src-shared-components-Settings-Preferences-Email-___styles__title___1q6eb"
9+
>
10+
E-Mail Preferences
11+
</h1>
12+
<div
13+
className="src-shared-components-Settings-Preferences-Email-___styles__sub-title___2Fh1W"
14+
>
15+
Your preferences
16+
</div>
17+
<div
18+
className="src-shared-components-Settings-Preferences-Email-___styles__preferences-container___38AVF"
19+
>
20+
<ToggleableItem
21+
checked={false}
22+
id="Pipeline"
23+
onToggle={[Function]}
24+
primaryText="Challenge Pipeline"
25+
secondaryText="Subscribe to this newsletter if you want to get updates on the types of challenges coming up in the future. To view these challenges at your leisure you can always visit the <a href=\\"https://www.topcoder.com/community/pipeline\\" style=\\"color:#0d61bf;text-decoration:underline\\">Challenge Pipeline</a> page."
26+
value="Pipeline"
27+
/>
28+
<ToggleableItem
29+
checked={false}
30+
id="Gig Work"
31+
onToggle={[Function]}
32+
primaryText="Gig Work"
33+
secondaryText="This newsletter gets sent out at various times, specifically when we have an opportunity of mass appeal. For more information you can visit the <a href=\\"https://www.topcoder.com/community/taas\\" style=\\"color:#0d61bf;text-decoration:underline\\">Gig Work</a> page."
34+
value="Gig Work"
35+
/>
36+
<ToggleableItem
37+
checked={false}
38+
id="Monthly Newsletter"
39+
onToggle={[Function]}
40+
primaryText="Monthly Newsletter"
41+
secondaryText="This newsletter gets sent out at the end of every month and contains a variety of important information across all of our tracks."
42+
value="Monthly Newsletter"
43+
/>
44+
<ToggleableItem
45+
checked={false}
46+
id="Marathon Match Reminders"
47+
onToggle={[Function]}
48+
primaryText="Marathon Match Reminders"
49+
secondaryText="Receive updates whenever a new marathon match is scheduled."
50+
value="Marathon Match Reminders"
51+
/>
52+
<ToggleableItem
53+
checked={false}
54+
id="Single Round Match Reminders"
55+
onToggle={[Function]}
56+
primaryText="Single Round Match (SRM) Reminders"
57+
secondaryText="Attention Competitive Programmers! If there is any newsletter you are subscribing too, it better be this one. Receive updates when a new SRM event is scheduled."
58+
value="Single Round Match Reminders"
59+
/>
60+
<ToggleableItem
61+
checked={false}
62+
id="TCO Tuesdays"
63+
onToggle={[Function]}
64+
primaryText="TCO Newsletter"
65+
secondaryText="For all the latest updates surrounding the <a href=\\"https://www.topcoder.com/community/member-programs/topcoder-open\\" style=\\"color:#0d61bf;text-decoration:underline\\">Topcoder Open</a> you should definitely be subscribing to this one. Expect an update in your mailbox every Tuesday!"
66+
value="TCO Tuesdays"
67+
/>
68+
</div>
69+
</div>
70+
`;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import React from 'react';
2+
import Renderer from 'react-test-renderer/shallow';
3+
4+
import Email from 'components/Settings/Preferences/Email';
5+
6+
const rnd = new Renderer();
7+
8+
it('renders email preferences setting page correctly', () => {
9+
rnd.render((<Email email="test@test.com" preferences={[]} />));
10+
expect(rnd.getRenderOutput()).toMatchSnapshot();
11+
});

0 commit comments

Comments
 (0)