Skip to content

Commit f5dcfde

Browse files
authored
Merge pull request #226 from topcoder-platform/integration-v5-develop
Integration v5 develop
2 parents b7816e5 + cebfd8b commit f5dcfde

34 files changed

+11210
-9101
lines changed

Diff for: .circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- attach_workspace:
2929
at: .
3030
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
31-
- run: npm publish
31+
- run: npm publish --tag test-release
3232
# dont change anything
3333
workflows:
3434
version: 2

Diff for: __tests__/__snapshots__/index.js.snap

+8-5
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ Object {
111111
"getSubtrackChallengesInit": [Function],
112112
"getUserMarathonDone": [Function],
113113
"getUserMarathonInit": [Function],
114+
"getUserResourcesDone": [Function],
115+
"getUserResourcesInit": [Function],
114116
"getUserSrmDone": [Function],
115117
"getUserSrmInit": [Function],
116118
},
@@ -223,9 +225,9 @@ Object {
223225
"setEndDate": [Function],
224226
"setReviewOpportunityType": [Function],
225227
"setStartDate": [Function],
226-
"setSubtracks": [Function],
227228
"setTags": [Function],
228229
"setText": [Function],
230+
"setTypes": [Function],
229231
},
230232
},
231233
"errors": Object {
@@ -303,7 +305,6 @@ Object {
303305
"default": undefined,
304306
"getService": [Function],
305307
"normalizeChallenge": [Function],
306-
"normalizeChallengeDetails": [Function],
307308
},
308309
"communities": Object {
309310
"default": undefined,
@@ -340,6 +341,7 @@ Object {
340341
"reviewOpportunities": Object {
341342
"default": undefined,
342343
"getReviewOpportunitiesService": [Function],
344+
"normalizeChallenges": [Function],
343345
},
344346
"submissions": Object {
345347
"default": undefined,
@@ -370,9 +372,10 @@ Object {
370372
},
371373
"tc": Object {
372374
"COMPETITION_TRACKS": Object {
373-
"DATA_SCIENCE": "data_science",
374-
"DESIGN": "design",
375-
"DEVELOP": "develop",
375+
"DATA_SCIENCE": "Data Science",
376+
"DESIGN": "Design",
377+
"DEVELOP": "Development",
378+
"QA": "Quality Assurance",
376379
},
377380
"REVIEW_OPPORTUNITY_TYPES": Object {
378381
"Contest Review": "Review",

Diff for: __tests__/actions/__snapshots__/challenge.js.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`challenge.fetchChallengeInit 1`] = `
44
Object {
5-
"payload": "12345",
5+
"payload": "123456789",
66
"type": "CHALLENGE/GET_DETAILS_INIT",
77
}
88
`;
@@ -16,7 +16,7 @@ Object {
1616

1717
exports[`challenge.fetchSubmissionsInit 1`] = `
1818
Object {
19-
"payload": "12345",
19+
"payload": "123456789",
2020
"type": "CHALLENGE/GET_SUBMISSIONS_INIT",
2121
}
2222
`;

Diff for: __tests__/actions/auth.js

+9-6
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
1-
const MOCK_GROUPS_REQ_URL = 'https://api.topcoder-dev.com/v3/groups?memberId=12345&membershipType=user';
1+
const MOCK_GROUPS_REQ_URL = 'https://api.topcoder-dev.com/v5/groups?memberId=12345&membershipType=user';
22
const MOCK_PROFILE_REQ_URL = 'https://api.topcoder-dev.com/v3/members/username12345';
33

44
jest.mock('isomorphic-fetch', () => jest.fn(url => Promise.resolve({
5+
ok: true,
56
json: () => {
67
let content;
78
switch (url) {
8-
case MOCK_GROUPS_REQ_URL: content = ['Group1', 'Group2']; break;
9-
case MOCK_PROFILE_REQ_URL: content = { userId: 12345 }; break;
9+
case MOCK_GROUPS_REQ_URL:
10+
content = ['Group1', 'Group2'];
11+
break;
12+
case MOCK_PROFILE_REQ_URL:
13+
content = { result: { content: { userId: 12345 }, status: 200 } };
14+
break;
1015
default: throw new Error('Unexpected URL!');
1116
}
12-
return {
13-
result: { content, status: 200 },
14-
};
17+
return content;
1518
},
1619
})));
1720

Diff for: __tests__/actions/challenge.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ import { actions } from '../../src';
33
jest.mock('../../src/services/challenges');
44

55
test('challenge.fetchChallengeInit', () => {
6-
expect(actions.challenge.getDetailsInit(12345)).toMatchSnapshot();
6+
expect(actions.challenge.getDetailsInit(123456789)).toMatchSnapshot();
77
});
88

99
test('challenge.fetchSubmissionsInit', () => {
10-
expect(actions.challenge.getSubmissionsInit(12345)).toMatchSnapshot();
10+
expect(actions.challenge.getSubmissionsInit(123456789)).toMatchSnapshot();
1111
});
1212

1313

1414
test('challenge.getDetailsDone', () => {
15-
expect(actions.challenge.getDetailsDone(12345)).toMatchSnapshot();
15+
expect(actions.challenge.getDetailsDone(123456789)).toMatchSnapshot();
1616
});
1717

1818
test('challenge.fetchSubmissionsDone', () => {
19-
expect(actions.challenge.getSubmissionsDone(12345, {})).toMatchSnapshot();
19+
expect(actions.challenge.getSubmissionsDone(123456789, {})).toMatchSnapshot();
2020
});
2121

2222
test('challenge.getActiveChallengesCountInit', () => {

0 commit comments

Comments
 (0)