Skip to content

Commit dfd64ff

Browse files
authored
Merge pull request #4744 from topcoder-platform/i-v5-develop-12Aug
I v5 develop 12 aug
2 parents 747e8f6 + f624779 commit dfd64ff

File tree

163 files changed

+4514
-3390
lines changed

Some content is hidden

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

163 files changed

+4514
-3390
lines changed

.circleci/config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ workflows:
252252
filters:
253253
branches:
254254
only:
255+
- integration-v5-challenge-api
255256
- develop
256257
- feature-contentful
257258
# This is stage env for production QA releases

__tests__/shared/actions/challenge-listing/sidebar.js

+18
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,23 @@ const mockFetch = (ok, resolvesTo) => jest.fn(
66
() => Promise.resolve({ ok, json: () => resolvesTo }),
77
);
88

9+
const createXHRmock = () => {
10+
const open = jest.fn();
11+
// be aware we use *function* because we need to get *this*
12+
// from *new XmlHttpRequest()* call
13+
const send = jest.fn().mockImplementation(() => {
14+
this.onload();
15+
});
16+
const xhrMockClass = {
17+
open,
18+
send,
19+
setRequestHeader: jest.fn(),
20+
getAllResponseHeaders: jest.fn(),
21+
};
22+
23+
window.XMLHttpRequest = jest.fn().mockImplementation(xhrMockClass);
24+
};
25+
926
let originalFetch;
1027

1128
beforeAll(() => {
@@ -32,6 +49,7 @@ describe('challengeListing.sidebar.changeFilterName', () => {
3249

3350
describe('challengeListing.sidebar.deleteSavedFilter', () => {
3451
global.fetch = mockFetch(true, 'dummy');
52+
createXHRmock();
3553

3654
const a = actions.deleteSavedFilter('id', 'token');
3755

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

+18-12
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@
1414
"updatedBy": "22841596",
1515
"technologies": "",
1616
"status": "COMPLETED",
17-
"track": "DESIGN",
17+
"legacy": {
18+
"track": "DESIGN",
19+
"forumId": 599349
20+
},
1821
"subTrack": "LOGO_DESIGN",
1922
"name": "Sunshot - MapMySolar - SunGiver - Brand Concept Logo Design Challenge",
2023
"reviewType": "INTERNAL",
2124
"id": 30051608,
22-
"forumId": 599349,
23-
"numSubmissions": 22,
24-
"numRegistrants": 31,
25+
"numOfSubmissions": 22,
26+
"numOfRegistrants": 31,
2527
"registrationStartDate": "2015-10-01T22:21:07.491Z",
2628
"registrationEndDate": "2015-10-09T13:04:02.272Z",
2729
"checkpointSubmissionEndDate": "2015-10-05T13:05:56.398Z",
@@ -317,14 +319,16 @@
317319
"updatedBy": "22841596",
318320
"technologies": "",
319321
"status": "COMPLETED",
320-
"track": "DESIGN",
322+
"legacy": {
323+
"track": "DESIGN",
324+
"forumId": 598066
325+
},
321326
"subTrack": "LOGO_DESIGN",
322327
"name": "2016 Topcoder Open Logo Design Challenge",
323328
"reviewType": "INTERNAL",
324329
"id": 30051059,
325-
"forumId": 598066,
326-
"numSubmissions": 57,
327-
"numRegistrants": 111,
330+
"numOfSubmissions": 57,
331+
"numOfRegistrants": 111,
328332
"registrationStartDate": "2015-08-10T13:00:01.576Z",
329333
"registrationEndDate": "2015-08-24T13:17:15.335Z",
330334
"checkpointSubmissionEndDate": "2015-08-17T13:10:56.385Z",
@@ -527,14 +531,16 @@
527531
"updatedBy": "22841596",
528532
"technologies": "",
529533
"status": "COMPLETED",
530-
"track": "DESIGN",
534+
"legacy": {
535+
"track": "DESIGN",
536+
"forumId": 596557
537+
},
531538
"subTrack": "LOGO_DESIGN",
532539
"name": "ACME Logos Design Challenge",
533540
"reviewType": "INTERNAL",
534541
"id": 30050375,
535-
"forumId": 596557,
536-
"numSubmissions": 15,
537-
"numRegistrants": 55,
542+
"numOfSubmissions": 15,
543+
"numOfRegistrants": 55,
538544
"registrationStartDate": "2015-06-01T19:00:33.351Z",
539545
"registrationEndDate": "2015-06-09T13:00:37.186Z",
540546
"checkpointSubmissionEndDate": "2015-06-06T13:07:38.023Z",

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

+24-16
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,16 @@
2121
"updatedBy": "22841596",
2222
"technologies": "CSS, HTML, JavaScript",
2323
"status": "COMPLETED",
24-
"track": "DEVELOP",
24+
"legacy": {
25+
"track": "DEVELOP",
26+
"forumId": 39153
27+
},
2528
"subTrack": "FIRST_2_FINISH",
2629
"name": "$100 Eaton PX 2.0 Petting Zoo - MDC Web Enhancement F2F Challenge",
2730
"reviewType": "INTERNAL",
2831
"id": 30060905,
29-
"forumId": 39153,
30-
"numSubmissions": 3,
31-
"numRegistrants": 8,
32+
"numOfSubmissions": 3,
33+
"numOfRegistrants": 8,
3234
"registrationStartDate": "2017-12-02T09:01:23.251Z",
3335
"registrationEndDate": "2017-12-12T20:01:00.000Z",
3436
"checkpointSubmissionEndDate": null,
@@ -162,14 +164,16 @@
162164
"updatedBy": "22841596",
163165
"technologies": "ReactJS",
164166
"status": "COMPLETED",
165-
"track": "DEVELOP",
167+
"legacy": {
168+
"track": "DEVELOP",
169+
"forumId": 39151
170+
},
166171
"subTrack": "FIRST_2_FINISH",
167172
"name": "$100 Eaton PX 2.0 Petting Zoo - ReactJS Enhancement F2F Challenge",
168173
"reviewType": "INTERNAL",
169174
"id": 30060903,
170-
"forumId": 39151,
171-
"numSubmissions": 2,
172-
"numRegistrants": 6,
175+
"numOfSubmissions": 2,
176+
"numOfRegistrants": 6,
173177
"registrationStartDate": "2017-12-02T09:01:21.329Z",
174178
"registrationEndDate": "2017-12-12T20:01:00.000Z",
175179
"checkpointSubmissionEndDate": null,
@@ -318,14 +322,16 @@
318322
"updatedBy": "22841596",
319323
"technologies": "Angular 2+, Express, JSON, Node.js",
320324
"status": "COMPLETED",
321-
"track": "DEVELOP",
325+
"legacy": {
326+
"track": "DEVELOP",
327+
"forumId": 38951
328+
},
322329
"subTrack": "FIRST_2_FINISH",
323330
"name": "$500 BG800 Online Course Mock Rest API F2F Challenge",
324331
"reviewType": "INTERNAL",
325332
"id": 30060687,
326-
"forumId": 38951,
327-
"numSubmissions": 14,
328-
"numRegistrants": 18,
333+
"numOfSubmissions": 14,
334+
"numOfRegistrants": 18,
329335
"registrationStartDate": "2017-11-24T13:27:44.751Z",
330336
"registrationEndDate": "2017-12-05T22:27:00.000Z",
331337
"checkpointSubmissionEndDate": null,
@@ -624,14 +630,16 @@
624630
"updatedBy": "22841596",
625631
"technologies": "JavaScript, ReactJS",
626632
"status": "COMPLETED",
627-
"track": "DEVELOP",
633+
"legacy": {
634+
"track": "DEVELOP",
635+
"forumId": 38702
636+
},
628637
"subTrack": "FIRST_2_FINISH",
629638
"name": "John Hancock - Giving Tuesday - General image handling",
630639
"reviewType": "INTERNAL",
631640
"id": 30060425,
632-
"forumId": 38702,
633-
"numSubmissions": 3,
634-
"numRegistrants": 17,
641+
"numOfSubmissions": 3,
642+
"numOfRegistrants": 17,
635643
"registrationStartDate": "2017-11-11T02:02:21.127Z",
636644
"registrationEndDate": "2017-11-21T02:02:00.000Z",
637645
"checkpointSubmissionEndDate": null,

0 commit comments

Comments
 (0)