Skip to content

Integration v5 challenge api #221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 167 commits into from
Aug 13, 2020
Merged
Changes from all commits
Commits
Show all changes
167 commits
Select commit Hold shift + click to select a range
4be52b8
Challenge 30124821
srjr19 May 18, 2020
208cfe3
Merge pull request #166 from simranb86/Challenge_30124821
sushilshinde May 19, 2020
ebae73a
Adding dist tag
sushilshinde May 19, 2020
4c94cb2
Test release npm ver bump to 1000.19.0
sushilshinde May 19, 2020
58fd1ac
Updated 'resources' call to use memberId
luizrrodrigues May 23, 2020
564fd25
getApiResponsePayload return null in case response is 200 but empty
luizrrodrigues May 23, 2020
f5b652b
fix for issue #4403
srjr19 May 25, 2020
ddccef1
Merge pull request #167 from simranb86/issue_4403
sushilshinde May 25, 2020
2f5e362
Npm ver bump up for test release - 1000.19.1
sushilshinde May 25, 2020
97ed3f6
fix for issue #4409
srjr19 May 25, 2020
befdfdf
Removed hardcoded challenge typeId
luizrrodrigues May 25, 2020
64280e1
fix for issue #4410
srjr19 May 25, 2020
4de4c32
fix for issue #4407
srjr19 May 26, 2020
9e176f1
Merge pull request #171 from simranb86/issue_4407
sushilshinde May 26, 2020
2d453ae
Merge pull request #168 from simranb86/issue_4409
sushilshinde May 26, 2020
47f435d
ci: updated npm version to 1000.18.2
sushilshinde May 26, 2020
28f1778
Update filter.js
rashmi73 May 26, 2020
cebf48b
Issue#4380: Fix register / unregister calls
luizrrodrigues May 26, 2020
78107b9
ci: fixed snaps
sushilshinde May 27, 2020
6ffac21
fix tests
srjr19 May 27, 2020
34aac46
Merge pull request #174 from simranb86/issue_4410
sushilshinde May 27, 2020
0f03ac8
fix for tests
srjr19 May 27, 2020
a5b2093
Merge pull request #175 from simranb86/integration-v5-challenge-api
sushilshinde May 27, 2020
7340b46
Merge pull request #172 from rashmi73/issue_4402
sushilshinde May 28, 2020
8f48e95
Merge pull request #173 from topcoder-platform/issue-4380
sushilshinde May 28, 2020
66e4be1
Test release v5 integration v1000.19.3
sushilshinde May 28, 2020
f110201
fix for issue #4435
srjr19 May 30, 2020
d5868e7
fix for issue #4430
srjr19 May 30, 2020
2906e84
fix for issue #4435
srjr19 May 30, 2020
ede622f
fix for issue #4435
srjr19 May 31, 2020
1aaa5fe
Merge pull request #176 from simranb86/issue_4430
sushilshinde Jun 1, 2020
be906cf
test release - bump ver to 1000.19.4
sushilshinde Jun 1, 2020
75f81f9
Merge branch 'integration-v5-challenge-api' into issue_4435
srjr19 Jun 1, 2020
942af6e
Merge pull request #177 from simranb86/issue_4435
sushilshinde Jun 2, 2020
2b8c31e
Npm ver bump up to 1000.19.5 for
sushilshinde Jun 2, 2020
edd0eaf
fix tests
srjr19 Jun 3, 2020
aeb69b5
Get SRMs via V4 API for now
luizrrodrigues Jun 3, 2020
6286153
Merge pull request #178 from simranb86/fix_tests
sushilshinde Jun 3, 2020
4623942
Merge pull request #169 from topcoder-platform/issue-4378
sushilshinde Jun 3, 2020
ac74ffb
Npm ver update to 1000.19.6
sushilshinde Jun 3, 2020
0cc8635
#4430 - rework needed due to backend changes
srjr19 Jun 4, 2020
37366b3
Merge pull request #180 from simranb86/issue_4430_new
sushilshinde Jun 5, 2020
b34816f
npm bump up "version": "1000.19.7",
sushilshinde Jun 5, 2020
1aaf110
fix for issue #4384
srjr19 Jun 6, 2020
011284b
fix for issue #4384
srjr19 Jun 7, 2020
fbc6220
Merge pull request #181 from simranb86/issue_4384
sushilshinde Jun 7, 2020
0c3b90e
npm bump version 1000.19.8
sushilshinde Jun 7, 2020
ec5dc90
fix for issue #4375 & #4376
srjr19 Jun 7, 2020
1c5f9f4
Merge pull request #182 from simranb86/issue_4375_4376
sushilshinde Jun 8, 2020
8449cba
npm bump up to 1000.19.9
sushilshinde Jun 8, 2020
186cd45
fix for issue #4384 feedback
srjr19 Jun 8, 2020
2e8ce50
Merge pull request #183 from simranb86/issue_4384_part_3_feedback
sushilshinde Jun 8, 2020
63d7e1e
npm bump 1000.19.10
sushilshinde Jun 8, 2020
8f1cadc
fix for issue #4383
srjr19 Jun 9, 2020
c19bc09
Added proxyApi
luizrrodrigues Jun 10, 2020
d25ed67
Updated getChallengeDetails to get registrants
luizrrodrigues Jun 10, 2020
5535289
Update getRoleId to use proxyApi
luizrrodrigues Jun 10, 2020
cc43614
Fix challenge unregister()
luizrrodrigues Jun 10, 2020
e26398e
Updated tests
luizrrodrigues Jun 10, 2020
d298cfa
Merge pull request #186 from simranb86/issue_4383_new
sushilshinde Jun 11, 2020
4be3737
npm. bump up 1000.19.13 for #4384
sushilshinde Jun 11, 2020
1ac7225
Merge pull request #187 from topcoder-platform/issue-4380-v2
sushilshinde Jun 11, 2020
b178cda
bump up 1000.19.14 fix for #4390
sushilshinde Jun 11, 2020
ccb4a93
fix issue 4519
nursoltan-s Jun 12, 2020
8bb6948
Merge pull request #189 from nursoltan-s/issue-4519
sushilshinde Jun 12, 2020
7c81d7b
npm bump up 1000.19.15
sushilshinde Jun 12, 2020
b9ad775
Removed proxyApi
luizrrodrigues Jun 12, 2020
bfa91c2
TEMP FIX - Registrants and isRegistered
luizrrodrigues Jun 12, 2020
3b7222c
Fix snapshot
luizrrodrigues Jun 12, 2020
20f9ec5
Merge pull request #190 from topcoder-platform/issue-4380-v2
sushilshinde Jun 12, 2020
b4baccc
fix: for #4380
sushilshinde Jun 12, 2020
1934269
Fix get memberId via decode()
luizrrodrigues Jun 13, 2020
a0c35b3
Merge pull request #191 from topcoder-platform/issue-4380-v2
sushilshinde Jun 14, 2020
a9113ac
fix: hot fix for #4380
sushilshinde Jun 14, 2020
bd2aec7
changes for issue #4491
srjr19 Jun 15, 2020
e85b7d4
Fix group addMember call
luizrrodrigues Jun 15, 2020
f3c6053
Merge pull request #192 from simranb86/issue_4491
sushilshinde Jun 15, 2020
ce75876
fix for #4491
sushilshinde Jun 15, 2020
fc7ae1f
Updated loadProfileDone() to use V5 API
luizrrodrigues Jun 16, 2020
ee1759f
issue-4380 - Hotfix
luizrrodrigues Jun 16, 2020
b6f5da3
Merge pull request #193 from topcoder-platform/issue-4380-hotfix
sushilshinde Jun 16, 2020
5a24a45
fix: for 4380
sushilshinde Jun 16, 2020
19790eb
TEMP fix to colorStyle in registrants return.
luizrrodrigues Jun 16, 2020
7c5f19b
Merge pull request #195 from topcoder-platform/issue-4537
sushilshinde Jun 16, 2020
dc5c430
fix: for #4537
sushilshinde Jun 16, 2020
e5c2886
fix for issue #4541
srjr19 Jun 17, 2020
48008f4
Merge pull request #196 from simranb86/issue_4541
sushilshinde Jun 17, 2020
a4f81b3
fix: for #4541
sushilshinde Jun 17, 2020
e2a4188
Challenge Details - Get submissions and merge with challenge return
luizrrodrigues Jun 17, 2020
d13c603
Merge pull request #197 from topcoder-platform/issue-4536
sushilshinde Jun 17, 2020
0df81e4
fix: for #4536
sushilshinde Jun 17, 2020
b6ae625
fix #4559
nursoltan-s Jun 18, 2020
a3bca94
Update challenge.js
PrakashDurlabhji Jun 18, 2020
531f3ec
Merge pull request #199 from PrakashDurlabhji/issue_4516
sushilshinde Jun 18, 2020
bd5d00d
fix: for #4516
sushilshinde Jun 18, 2020
a633cdd
fix for issue #4556
srjr19 Jun 18, 2020
b3bd699
Merge pull request #198 from nursoltan-s/issue-4559
sushilshinde Jun 19, 2020
d46cf36
fix my challenges page
nursoltan-s Jun 19, 2020
ea649b2
deleted comment
nursoltan-s Jun 19, 2020
915166d
fix for: #4559
sushilshinde Jun 19, 2020
843c7ec
Merge pull request #200 from simranb86/issue_4556
sushilshinde Jun 19, 2020
4238394
fix: for #4556
sushilshinde Jun 19, 2020
ea88d07
Merge pull request #201 from nursoltan-s/issue-4557
sushilshinde Jun 19, 2020
03713ef
fix: for #4557
sushilshinde Jun 19, 2020
606eb2e
Update Challenges param from groupIds to groups
luizrrodrigues Jun 19, 2020
f505394
Merge branch 'integration-v5-challenge-api' into issue-4393
luizrrodrigues Jun 19, 2020
b7da5e1
Merge branch 'integration-v5-challenge-api' into issue-4393
luizrrodrigues Jun 20, 2020
ec7e414
Updated params groupIds to groups
luizrrodrigues Jun 20, 2020
0ae4e1e
Fix challenges filter mapToBackend
luizrrodrigues Jun 22, 2020
49ba5a1
Update auth tests to support v5 API
luizrrodrigues Jun 22, 2020
f3ea4dc
Fix auth description v3 to v5
luizrrodrigues Jun 22, 2020
8d763fc
Merge pull request #194 from topcoder-platform/issue-4393
sushilshinde Jun 23, 2020
7df5b34
fix: for #4393
sushilshinde Jun 23, 2020
87e8aad
Updated terms to use V5 API
luizrrodrigues Jun 23, 2020
f9f4973
Merge pull request #203 from topcoder-platform/issue-4562
sushilshinde Jun 24, 2020
5386e83
fix: for #4562
sushilshinde Jun 24, 2020
bfef016
Update getSubmissionsDone() to use V5 API
luizrrodrigues Jun 24, 2020
0450683
Terms - Fix return data
luizrrodrigues Jun 25, 2020
dc67d57
Merge pull request #204 from topcoder-platform/issue-4562
sushilshinde Jun 25, 2020
45d09bb
fix: for #4562
sushilshinde Jun 25, 2020
d593f70
Updated var type from Number to String to challengeId
luizrrodrigues Jun 25, 2020
1c8f9f2
Update getSubmissions to use UUID instead legacyId
luizrrodrigues Jun 25, 2020
bed729f
Added checkErrorV5 to submissions services
luizrrodrigues Jun 25, 2020
5407a26
Updated action getSubmissionsDone to use submissionsService
luizrrodrigues Jun 30, 2020
4432f22
Updated deleteSubmissionDone to use V5 API
luizrrodrigues Jun 30, 2020
910cebf
Remove try/catch from get submissions in challenge details
luizrrodrigues Jun 30, 2020
d685a39
Merge pull request #205 from topcoder-platform/issue-4582
sushilshinde Jul 1, 2020
ca92a73
fix: for #4582
sushilshinde Jul 1, 2020
d5dbe0d
fix: #issue 4619, sync the fields for V3 and V5 for challenge phases
narekcat Jul 3, 2020
5885c35
Merge pull request #206 from narekcat/issue-4619
sushilshinde Jul 4, 2020
7376517
fix: for #4619
sushilshinde Jul 4, 2020
9c3ad4b
fix: for 4619
sushilshinde Jul 4, 2020
e3c9499
change loadProfileDone to use v3 instead v5 API
luizrrodrigues Jul 8, 2020
4b2df6b
Update tests
luizrrodrigues Jul 8, 2020
862ecd6
Merge pull request #207 from topcoder-platform/issue-4587
sushilshinde Jul 9, 2020
f5471db
fix: for
sushilshinde Jul 9, 2020
68222c0
Fix Issue-4648 : Different data type compare
luizrrodrigues Jul 17, 2020
5e2ea9d
Merge pull request #210 from topcoder-platform/issue-4648
sushilshinde Jul 17, 2020
db83da0
fix: for #4648
sushilshinde Jul 17, 2020
7fd4bd4
Fix var in filterByGroupIds in challenge listing filter
luizrrodrigues Jul 23, 2020
534b811
Merge pull request #211 from topcoder-platform/issue-4650
sushilshinde Jul 24, 2020
fe11ee6
fix: for #4650
sushilshinde Jul 24, 2020
5073881
fix: for #4650
sushilshinde Jul 27, 2020
8ff0d3b
issue-4673 : Fix checkpoint tab when SRR
luizrrodrigues Jul 28, 2020
7313569
Merge pull request #212 from topcoder-platform/issue-4673
sushilshinde Jul 28, 2020
de89e65
fix: for #4673
sushilshinde Jul 28, 2020
74d971b
issue-4688 : Added ongoing filter to challenges listing
luizrrodrigues Jul 31, 2020
b538030
Merge pull request #213 from topcoder-platform/issue-4688
sushilshinde Jul 31, 2020
70e97da
fix: for #4688
sushilshinde Jul 31, 2020
80a9b71
fix(ChallengeDetails): return `userDetails.roles` with challenge details
cagdas001 Aug 4, 2020
e11bded
fix(ChallengeDetails): include only user's own roles at `getUserRoles…
cagdas001 Aug 4, 2020
52ccdd5
issue-4700 : Filter registrants with Submitters only
luizrrodrigues Aug 4, 2020
9138860
Merge pull request #215 from topcoder-platform/issue-4700
sushilshinde Aug 5, 2020
2249d45
fix: for #4700
sushilshinde Aug 5, 2020
68cf7c9
Merge pull request #214 from cagdas001/integration-v5-challenge-api
sushilshinde Aug 5, 2020
2e8a309
fix: for #4672
sushilshinde Aug 5, 2020
9fec28b
Added QA to filter
luizrrodrigues Aug 5, 2020
b58fd0c
Updated challengeSubtracks to challengeTypes in filter
luizrrodrigues Aug 5, 2020
d16b2ba
Update to use new challenge.track name + added QA
luizrrodrigues Aug 6, 2020
b61fb0f
Merge pull request #216 from topcoder-platform/issue-4706
sushilshinde Aug 6, 2020
8bf92d9
fix: for #4706
sushilshinde Aug 6, 2020
ab871c4
Updated legacy with challenge.type and challenge.track
luizrrodrigues Aug 10, 2020
7551062
Merge pull request #217 from topcoder-platform/issue-4709
sushilshinde Aug 10, 2020
7ff38a8
fix: for #4709
sushilshinde Aug 10, 2020
e272c32
Disable filter by Type in getReviewOpportunitiesFilterFunction
luizrrodrigues Aug 11, 2020
4920086
Merge pull request #218 from topcoder-platform/issue-4718
sushilshinde Aug 11, 2020
69fecea
fix: for #4718
sushilshinde Aug 11, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ jobs:
- attach_workspace:
at: .
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
- run: npm publish
- run: npm publish --tag test-release
# dont change anything
workflows:
version: 2
13 changes: 8 additions & 5 deletions __tests__/__snapshots__/index.js.snap
Original file line number Diff line number Diff line change
@@ -111,6 +111,8 @@ Object {
"getSubtrackChallengesInit": [Function],
"getUserMarathonDone": [Function],
"getUserMarathonInit": [Function],
"getUserResourcesDone": [Function],
"getUserResourcesInit": [Function],
"getUserSrmDone": [Function],
"getUserSrmInit": [Function],
},
@@ -223,9 +225,9 @@ Object {
"setEndDate": [Function],
"setReviewOpportunityType": [Function],
"setStartDate": [Function],
"setSubtracks": [Function],
"setTags": [Function],
"setText": [Function],
"setTypes": [Function],
},
},
"errors": Object {
@@ -303,7 +305,6 @@ Object {
"default": undefined,
"getService": [Function],
"normalizeChallenge": [Function],
"normalizeChallengeDetails": [Function],
},
"communities": Object {
"default": undefined,
@@ -340,6 +341,7 @@ Object {
"reviewOpportunities": Object {
"default": undefined,
"getReviewOpportunitiesService": [Function],
"normalizeChallenges": [Function],
},
"submissions": Object {
"default": undefined,
@@ -370,9 +372,10 @@ Object {
},
"tc": Object {
"COMPETITION_TRACKS": Object {
"DATA_SCIENCE": "data_science",
"DESIGN": "design",
"DEVELOP": "develop",
"DATA_SCIENCE": "Data Science",
"DESIGN": "Design",
"DEVELOP": "Development",
"QA": "Quality Assurance",
},
"REVIEW_OPPORTUNITY_TYPES": Object {
"Contest Review": "Review",
4 changes: 2 additions & 2 deletions __tests__/actions/__snapshots__/challenge.js.snap
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

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

exports[`challenge.fetchSubmissionsInit 1`] = `
Object {
"payload": "12345",
"payload": "123456789",
"type": "CHALLENGE/GET_SUBMISSIONS_INIT",
}
`;
15 changes: 9 additions & 6 deletions __tests__/actions/auth.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
const MOCK_GROUPS_REQ_URL = 'https://api.topcoder-dev.com/v3/groups?memberId=12345&membershipType=user';
const MOCK_GROUPS_REQ_URL = 'https://api.topcoder-dev.com/v5/groups?memberId=12345&membershipType=user';
const MOCK_PROFILE_REQ_URL = 'https://api.topcoder-dev.com/v3/members/username12345';

jest.mock('isomorphic-fetch', () => jest.fn(url => Promise.resolve({
ok: true,
json: () => {
let content;
switch (url) {
case MOCK_GROUPS_REQ_URL: content = ['Group1', 'Group2']; break;
case MOCK_PROFILE_REQ_URL: content = { userId: 12345 }; break;
case MOCK_GROUPS_REQ_URL:
content = ['Group1', 'Group2'];
break;
case MOCK_PROFILE_REQ_URL:
content = { result: { content: { userId: 12345 }, status: 200 } };
break;
default: throw new Error('Unexpected URL!');
}
return {
result: { content, status: 200 },
};
return content;
},
})));

8 changes: 4 additions & 4 deletions __tests__/actions/challenge.js
Original file line number Diff line number Diff line change
@@ -3,20 +3,20 @@ import { actions } from '../../src';
jest.mock('../../src/services/challenges');

test('challenge.fetchChallengeInit', () => {
expect(actions.challenge.getDetailsInit(12345)).toMatchSnapshot();
expect(actions.challenge.getDetailsInit(123456789)).toMatchSnapshot();
});

test('challenge.fetchSubmissionsInit', () => {
expect(actions.challenge.getSubmissionsInit(12345)).toMatchSnapshot();
expect(actions.challenge.getSubmissionsInit(123456789)).toMatchSnapshot();
});


test('challenge.getDetailsDone', () => {
expect(actions.challenge.getDetailsDone(12345)).toMatchSnapshot();
expect(actions.challenge.getDetailsDone(123456789)).toMatchSnapshot();
});

test('challenge.fetchSubmissionsDone', () => {
expect(actions.challenge.getSubmissionsDone(12345, {})).toMatchSnapshot();
expect(actions.challenge.getSubmissionsDone(123456789, {})).toMatchSnapshot();
});

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