Skip to content

Commit fefdfb3

Browse files
authored
Merge pull request #2 from topcoder-platform/develop
latest code
2 parents e1528c7 + 3a520ff commit fefdfb3

Some content is hidden

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

41 files changed

+4440
-221
lines changed

__tests__/__snapshots__/index.js.snap

+228
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,31 @@ Object {
2929
"updateChallengeDone": [Function],
3030
"updateChallengeInit": [Function],
3131
},
32+
"challengeListing": Object {
33+
"dropChallenges": [Function],
34+
"expandTag": [Function],
35+
"getActiveChallengesDone": [Function],
36+
"getActiveChallengesInit": [Function],
37+
"getAllActiveChallengesDone": [Function],
38+
"getAllActiveChallengesInit": [Function],
39+
"getChallengeSubtracksDone": [Function],
40+
"getChallengeSubtracksInit": [Function],
41+
"getChallengeTagsDone": [Function],
42+
"getChallengeTagsInit": [Function],
43+
"getMoreChallenges": [Function],
44+
"getPastChallengesDone": [Function],
45+
"getPastChallengesInit": [Function],
46+
"getRestActiveChallengesDone": [Function],
47+
"getRestActiveChallengesInit": [Function],
48+
"getReviewOpportunitiesDone": [Function],
49+
"getReviewOpportunitiesInit": [Function],
50+
"getSrmsDone": [Function],
51+
"getSrmsInit": [Function],
52+
"selectCommunity": [Function],
53+
"setDatepickerStatus": [Function],
54+
"setFilter": [Function],
55+
"setSort": [Function],
56+
},
3257
"direct": Object {
3358
"dropAll": [Function],
3459
"getProjectDetailsDone": [Function],
@@ -69,6 +94,7 @@ Object {
6994
"dropAll": [Function],
7095
"getAchievementsDone": [Function],
7196
"getAchievementsInit": [Function],
97+
"getAchievementsV3Done": [Function],
7298
"getActiveChallengesDone": [Function],
7399
"getActiveChallengesInit": [Function],
74100
"getFinancesDone": [Function],
@@ -98,6 +124,7 @@ Object {
98124
"deleteWebLinkInit": [Function],
99125
"getAchievementsDone": [Function],
100126
"getAchievementsInit": [Function],
127+
"getAchievementsV3Done": [Function],
101128
"getCredentialDone": [Function],
102129
"getCredentialInit": [Function],
103130
"getEmailPreferencesDone": [Function],
@@ -123,6 +150,7 @@ Object {
123150
"saveEmailPreferencesInit": [Function],
124151
"unlinkExternalAccountDone": [Function],
125152
"unlinkExternalAccountInit": [Function],
153+
"updateEmailConflict": [Function],
126154
"updatePasswordDone": [Function],
127155
"updatePasswordInit": [Function],
128156
"updateProfileDone": [Function],
@@ -170,13 +198,145 @@ Object {
170198
},
171199
},
172200
"challenge": Object {
201+
"buckets": Object {
202+
"BUCKETS": Object {
203+
"ALL": "all",
204+
"MY": "my",
205+
"ONGOING": "ongoing",
206+
"OPEN_FOR_REGISTRATION": "openForRegistration",
207+
"PAST": "past",
208+
"REVIEW_OPPORTUNITIES": "reviewOpportunities",
209+
"SAVED_FILTER": "saved-filter",
210+
"SAVED_REVIEW_OPPORTUNITIES_FILTER": "savedReviewOpportunitiesFilter",
211+
"UPCOMING": "upcoming",
212+
},
213+
"BUCKET_DATA": Object {
214+
"all": Object {
215+
"filter": Object {
216+
"started": true,
217+
"status": Array [
218+
"ACTIVE",
219+
],
220+
},
221+
"hideCount": false,
222+
"name": "All Challenges",
223+
"sorts": Array [],
224+
},
225+
"my": Object {
226+
"filter": Object {
227+
"started": true,
228+
"status": Array [
229+
"ACTIVE",
230+
],
231+
},
232+
"hideCount": false,
233+
"name": "My Challenges",
234+
"sorts": Array [
235+
"most-recent",
236+
"time-to-submit",
237+
"num-registrants",
238+
"num-submissions",
239+
"prize-high-to-low",
240+
"title-a-to-z",
241+
],
242+
},
243+
"ongoing": Object {
244+
"filter": Object {
245+
"registrationOpen": false,
246+
"started": true,
247+
"status": Array [
248+
"ACTIVE",
249+
],
250+
},
251+
"hideCount": false,
252+
"name": "Ongoing challenges",
253+
"sorts": Array [
254+
"most-recent",
255+
"current-phase",
256+
"title-a-to-z",
257+
"prize-high-to-low",
258+
],
259+
},
260+
"openForRegistration": Object {
261+
"filter": Object {
262+
"registrationOpen": true,
263+
"started": true,
264+
"status": Array [
265+
"ACTIVE",
266+
],
267+
},
268+
"hideCount": false,
269+
"name": "Open for registration",
270+
"sorts": Array [
271+
"most-recent",
272+
"time-to-register",
273+
"time-to-submit",
274+
"num-registrants",
275+
"num-submissions",
276+
"prize-high-to-low",
277+
"title-a-to-z",
278+
],
279+
},
280+
"past": Object {
281+
"filter": Object {
282+
"status": Array [
283+
"COMPLETED",
284+
"PAST",
285+
],
286+
},
287+
"hideCount": true,
288+
"name": "Past challenges",
289+
"sorts": Array [
290+
"most-recent",
291+
"prize-high-to-low",
292+
"title-a-to-z",
293+
],
294+
},
295+
"reviewOpportunities": Object {
296+
"filter": Object {},
297+
"hideCount": true,
298+
"name": "Open for review",
299+
"sorts": Array [
300+
"review-opportunities-start-date",
301+
"review-opportunities-payment",
302+
"review-opportunities-title-a-to-z",
303+
],
304+
},
305+
"savedReviewOpportunitiesFilter": Object {
306+
"filter": Object {},
307+
"sorts": Array [
308+
"review-opportunities-start-date",
309+
"review-opportunities-payment",
310+
"review-opportunities-title-a-to-z",
311+
],
312+
},
313+
"upcoming": Object {
314+
"filter": Object {
315+
"upcoming": true,
316+
},
317+
"hideCount": true,
318+
"name": "Upcoming challenges",
319+
"sorts": Array [
320+
"most-recent",
321+
"prize-high-to-low",
322+
"title-a-to-z",
323+
],
324+
},
325+
},
326+
"default": undefined,
327+
"getBuckets": [Function],
328+
"isReviewOpportunitiesBucket": [Function],
329+
"registerBucket": [Function],
330+
},
173331
"filter": Object {
174332
"addTrack": [Function],
175333
"combine": [Function],
176334
"default": undefined,
335+
"filterByDate": [Function],
177336
"getFilterFunction": [Function],
178337
"getReviewOpportunitiesFilterFunction": [Function],
179338
"mapToBackend": [Function],
339+
"newMeta": [Function],
180340
"removeTrack": [Function],
181341
"setEndDate": [Function],
182342
"setReviewOpportunityType": [Function],
@@ -185,6 +345,67 @@ Object {
185345
"setTags": [Function],
186346
"setText": [Function],
187347
},
348+
"sort": Object {
349+
"SORTS": Object {
350+
"CURRENT_PHASE": "current-phase",
351+
"MOST_RECENT": "most-recent",
352+
"NUM_REGISTRANTS": "num-registrants",
353+
"NUM_SUBMISSIONS": "num-submissions",
354+
"PRIZE_HIGH_TO_LOW": "prize-high-to-low",
355+
"REVIEW_OPPORTUNITIES_PAYMENT": "review-opportunities-payment",
356+
"REVIEW_OPPORTUNITIES_START_DATE": "review-opportunities-start-date",
357+
"REVIEW_OPPORTUNITIES_TITLE_A_TO_Z": "review-opportunities-title-a-to-z",
358+
"TIME_TO_REGISTER": "time-to-register",
359+
"TIME_TO_SUBMIT": "time-to-submit",
360+
"TITLE_A_TO_Z": "title-a-to-z",
361+
},
362+
"SORTS_DATA": Object {
363+
"current-phase": Object {
364+
"func": [Function],
365+
"name": "Current phase",
366+
},
367+
"most-recent": Object {
368+
"func": [Function],
369+
"name": "Most recent",
370+
},
371+
"num-registrants": Object {
372+
"func": [Function],
373+
"name": "# of registrants",
374+
},
375+
"num-submissions": Object {
376+
"func": [Function],
377+
"name": "# of submissions",
378+
},
379+
"prize-high-to-low": Object {
380+
"func": [Function],
381+
"name": "Prize high to low",
382+
},
383+
"review-opportunities-payment": Object {
384+
"func": [Function],
385+
"name": "Payment",
386+
},
387+
"review-opportunities-start-date": Object {
388+
"func": [Function],
389+
"name": "Review start date",
390+
},
391+
"review-opportunities-title-a-to-z": Object {
392+
"func": [Function],
393+
"name": "Title A-Z",
394+
},
395+
"time-to-register": Object {
396+
"func": [Function],
397+
"name": "Time to register",
398+
},
399+
"time-to-submit": Object {
400+
"func": [Function],
401+
"name": "Time to submit",
402+
},
403+
"title-a-to-z": Object {
404+
"func": [Function],
405+
"name": "Title A-Z",
406+
},
407+
},
408+
},
188409
},
189410
"errors": Object {
190411
"ERROR_ICON_TYPES": Object {
@@ -224,6 +445,7 @@ Object {
224445
"reducers": Object {
225446
"auth": [Function],
226447
"challenge": [Function],
448+
"challengeListing": [Function],
227449
"direct": [Function],
228450
"errors": [Function],
229451
"groups": [Function],
@@ -318,11 +540,17 @@ Object {
318540
},
319541
"getApiResponsePayload": [Function],
320542
"getLookerApiResponsePayload": [Function],
543+
"processSRM": [Function],
321544
},
322545
"time": Object {
323546
"default": undefined,
324547
"delay": [Function],
325548
"formatDuration": [Function],
326549
},
550+
"url": Object {
551+
"default": undefined,
552+
"removeTrailingSlash": [Function],
553+
"updateQuery": [Function],
554+
},
327555
}
328556
`;

__tests__/actions/__snapshots__/profile.js.snap

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Object {
1414
"deleteWebLinkInit": [Function],
1515
"getAchievementsDone": [Function],
1616
"getAchievementsInit": [Function],
17+
"getAchievementsV3Done": [Function],
1718
"getCredentialDone": [Function],
1819
"getCredentialInit": [Function],
1920
"getEmailPreferencesDone": [Function],
@@ -39,6 +40,7 @@ Object {
3940
"saveEmailPreferencesInit": [Function],
4041
"unlinkExternalAccountDone": [Function],
4142
"unlinkExternalAccountInit": [Function],
43+
"updateEmailConflict": [Function],
4244
"updatePasswordDone": [Function],
4345
"updatePasswordInit": [Function],
4446
"updateProfileDone": [Function],
@@ -164,6 +166,7 @@ Object {
164166
},
165167
},
166168
"handle": "tcscoder",
169+
"preferences": Object {},
167170
},
168171
"type": "PROFILE/SAVE_EMAIL_PREFERENCES_DONE",
169172
}

__tests__/reducers/__snapshots__/profile.js.snap

+6-6
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ Object {
740740
"deletingPhoto": false,
741741
"deletingWebLink": false,
742742
"emailPreferences": Object {
743-
"TOPCODER_NL_DATA": true,
743+
"Dev Newsletter": true,
744744
},
745745
"externalLinks": Array [
746746
Object {
@@ -939,7 +939,7 @@ Object {
939939
"deletingPhoto": false,
940940
"deletingWebLink": false,
941941
"emailPreferences": Object {
942-
"TOPCODER_NL_DATA": true,
942+
"Dev Newsletter": true,
943943
},
944944
"externalLinks": Array [
945945
Object {
@@ -989,7 +989,7 @@ Object {
989989
"deletingPhoto": false,
990990
"deletingWebLink": false,
991991
"emailPreferences": Object {
992-
"TOPCODER_NL_DATA": true,
992+
"Dev Newsletter": true,
993993
},
994994
"externalLinks": Array [
995995
Object {
@@ -1926,7 +1926,7 @@ Object {
19261926
"deletingPhoto": false,
19271927
"deletingWebLink": false,
19281928
"emailPreferences": Object {
1929-
"TOPCODER_NL_DATA": true,
1929+
"Dev Newsletter": true,
19301930
},
19311931
"externalLinks": Array [
19321932
Object {
@@ -2125,7 +2125,7 @@ Object {
21252125
"deletingPhoto": false,
21262126
"deletingWebLink": false,
21272127
"emailPreferences": Object {
2128-
"TOPCODER_NL_DATA": true,
2128+
"Dev Newsletter": true,
21292129
},
21302130
"externalLinks": Array [
21312131
Object {
@@ -2175,7 +2175,7 @@ Object {
21752175
"deletingPhoto": false,
21762176
"deletingWebLink": false,
21772177
"emailPreferences": Object {
2178-
"TOPCODER_NL_DATA": true,
2178+
"Dev Newsletter": true,
21792179
},
21802180
"externalLinks": Array [
21812181
Object {

__tests__/reducers/profile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const mockActions = {
3333
deleteWebLinkInit: mockAction('DELETE_WEB_LINK_INIT'),
3434
deleteWebLinkDone: mockAction('DELETE_WEB_LINK_DONE', { handle, data: webLink }),
3535
saveEmailPreferencesInit: mockAction('SAVE_EMAIL_PREFERENCES_INIT'),
36-
saveEmailPreferencesDone: mockAction('SAVE_EMAIL_PREFERENCES_DONE', { handle, data: { subscriptions: { TOPCODER_NL_DATA: true } } }),
36+
saveEmailPreferencesDone: mockAction('SAVE_EMAIL_PREFERENCES_DONE', { handle, preferences: { 'Dev Newsletter': true } }),
3737
linkExternalAccountInit: mockAction('LINK_EXTERNAL_ACCOUNT_INIT'),
3838
linkExternalAccountDone: mockAction('LINK_EXTERNAL_ACCOUNT_DONE', { handle, data: linkedAccount2 }),
3939
unlinkExternalAccountInit: mockAction('UNLINK_EXTERNAL_ACCOUNT_INIT'),

config/test.js

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ module.exports = {
22
API: {
33
V2: 'https://api.topcoder-dev.com/v2',
44
V3: 'https://api.topcoder-dev.com/v3',
5+
V5: 'https://api.topcoder-dev.com/v5',
56
},
67
dummyConfigKey: 'Dummy config value',
78
};

0 commit comments

Comments
 (0)