Skip to content

Commit e1528c7

Browse files
authored
Merge pull request #1 from topcoder-platform/develop
Develop
2 parents bb55cad + cf6886e commit e1528c7

Some content is hidden

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

49 files changed

+12025
-12960
lines changed

.DS_Store

6 KB
Binary file not shown.

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ workflows:
4343
branches:
4444
ignore: /.*/
4545
tags:
46-
only: /v[0-9]+(\.[0-9]+)*/
46+
only: /v[0-9]+(\.[0-9]+)*(-[0-9]+)?/
4747
requires:
4848
- test

.eslintrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
22
"extends": "./node_modules/topcoder-react-utils/config/eslint/default.json"
3-
}
3+
}

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
__coverage__
22
.build-info
33
.sass-cache
4-
dist
4+
#dist
55
node_modules
66
_auto_doc_
77
.vscode

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v8.11.1
1+
8.11.2

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Topcoder React Lib
22

3+
### v0.7.4
4+
- Added `getTcM2mToken()` function to API service, to facilitate handling of
5+
TC M2M token;
6+
- Added `getGroupTreeIds(..)`, `getTokenV3()`, and `reduceGroupIds(..)`
7+
functions to the Groups service, to facilitate deduction of all IDs in a group
8+
(sub-)tree, rooted at a specified group.
9+
310
### v0.6.0
411
A few changes related to fetch of projests visitble to users, and creation of
512
new challenges. Minor release to guard against any side-effects.

__tests__/__snapshots__/index.js.snap

+9-3
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ Object {
5454
"getLookerDone": [Function],
5555
},
5656
"lookup": Object {
57+
"getCountriesDone": [Function],
58+
"getCountriesInit": [Function],
5759
"getSkillTagsDone": [Function],
5860
"getSkillTagsInit": [Function],
5961
},
@@ -127,6 +129,8 @@ Object {
127129
"updateProfileInit": [Function],
128130
"uploadPhotoDone": [Function],
129131
"uploadPhotoInit": [Function],
132+
"verifyMemberNewEmailDone": [Function],
133+
"verifyMemberNewEmailInit": [Function],
130134
},
131135
"reviewOpportunity": Object {
132136
"cancelApplicationsDone": [Function],
@@ -237,9 +241,11 @@ Object {
237241
"services": Object {
238242
"api": Object {
239243
"default": [Function],
244+
"getApi": [Function],
240245
"getApiV2": [Function],
241246
"getApiV3": [Function],
242247
"getApiV4": [Function],
248+
"getTcM2mToken": [Function],
243249
},
244250
"billing": Object {
245251
"default": [Function],
@@ -253,7 +259,6 @@ Object {
253259
"getService": [Function],
254260
"normalizeChallenge": [Function],
255261
"normalizeChallengeDetails": [Function],
256-
"normalizeMarathonMatch": [Function],
257262
},
258263
"communities": Object {
259264
"default": undefined,
@@ -269,6 +274,7 @@ Object {
269274
"checkUserGroups": [Function],
270275
"default": undefined,
271276
"getService": [Function],
277+
"reduceGroupIds": [Function],
272278
},
273279
"lookup": Object {
274280
"default": undefined,
@@ -310,8 +316,8 @@ Object {
310316
"Iterative Review": "Iterative Review",
311317
"Spec Review": "Specification Review",
312318
},
313-
"getApiResponsePayloadV3": [Function],
314-
"getApiResponsePayloadV4": [Function],
319+
"getApiResponsePayload": [Function],
320+
"getLookerApiResponsePayload": [Function],
315321
},
316322
"time": Object {
317323
"default": undefined,

__tests__/actions/__snapshots__/lookup.js.snap

+20
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,32 @@
33
exports[`Module exports 1`] = `
44
Object {
55
"lookup": Object {
6+
"getCountriesDone": [Function],
7+
"getCountriesInit": [Function],
68
"getSkillTagsDone": [Function],
79
"getSkillTagsInit": [Function],
810
},
911
}
1012
`;
1113

14+
exports[`lookup.getCountriesDone 1`] = `
15+
Object {
16+
"payload": Array [
17+
Object {
18+
"country": "Afghanistan",
19+
"countryCode": "AFG",
20+
},
21+
],
22+
"type": "LOOKUP/GET_COUNTRIES_DONE",
23+
}
24+
`;
25+
26+
exports[`lookup.getCountriesInit 1`] = `
27+
Object {
28+
"type": "LOOKUP/GET_COUNTRIES_INIT",
29+
}
30+
`;
31+
1232
exports[`lookup.getSkillTagsDone 1`] = `
1333
Object {
1434
"payload": Array [

__tests__/actions/__snapshots__/profile.js.snap

+2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ Object {
4545
"updateProfileInit": [Function],
4646
"uploadPhotoDone": [Function],
4747
"uploadPhotoInit": [Function],
48+
"verifyMemberNewEmailDone": [Function],
49+
"verifyMemberNewEmailInit": [Function],
4850
},
4951
}
5052
`;

__tests__/actions/lookup.js

+17
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,15 @@ const tag = {
1010
status: 'APPROVED',
1111
};
1212

13+
const country = {
14+
country: 'Afghanistan',
15+
countryCode: 'AFG',
16+
};
17+
1318
// Mock services
1419
const mockLookupService = {
1520
getTags: jest.fn().mockReturnValue(Promise.resolve([tag])),
21+
getCountries: jest.fn().mockReturnValue(Promise.resolve([country])),
1622
};
1723
LookupService.getService = jest.fn().mockReturnValue(mockLookupService);
1824

@@ -28,3 +34,14 @@ test('lookup.getSkillTagsDone', async () => {
2834
expect(actionResult).toMatchSnapshot();
2935
expect(mockLookupService.getTags).toBeCalled();
3036
});
37+
38+
test('lookup.getCountriesInit', async () => {
39+
const actionResult = actions.lookup.getCountriesInit();
40+
expect(actionResult).toMatchSnapshot();
41+
});
42+
43+
test('lookup.getCountriesDone', async () => {
44+
const actionResult = await redux.resolveAction(actions.lookup.getCountriesDone());
45+
expect(actionResult).toMatchSnapshot();
46+
expect(mockLookupService.getCountries).toBeCalled();
47+
});

__tests__/reducers/__snapshots__/lookup.js.snap

+90
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,50 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3+
exports[`Default reducer Get countries 1`] = `
4+
Object {
5+
"countries": Array [
6+
Object {
7+
"country": "Afghanistan",
8+
"countryCode": "AFG",
9+
},
10+
],
11+
"loadingCountriesError": false,
12+
"loadingSkillTagsError": true,
13+
"skillTags": Array [
14+
Object {
15+
"domain": "SKILLS",
16+
"id": 251,
17+
"name": "Jekyll",
18+
"status": "APPROVED",
19+
},
20+
],
21+
}
22+
`;
23+
24+
exports[`Default reducer Get countries error 1`] = `
25+
Object {
26+
"countries": Array [
27+
Object {
28+
"country": "Afghanistan",
29+
"countryCode": "AFG",
30+
},
31+
],
32+
"loadingCountriesError": true,
33+
"loadingSkillTagsError": true,
34+
"skillTags": Array [
35+
Object {
36+
"domain": "SKILLS",
37+
"id": 251,
38+
"name": "Jekyll",
39+
"status": "APPROVED",
40+
},
41+
],
42+
}
43+
`;
44+
345
exports[`Default reducer Get skill tags 1`] = `
446
Object {
47+
"countries": Array [],
548
"loadingSkillTagsError": false,
649
"skillTags": Array [
750
Object {
@@ -16,6 +59,7 @@ Object {
1659

1760
exports[`Default reducer Get skill tags error 1`] = `
1861
Object {
62+
"countries": Array [],
1963
"loadingSkillTagsError": true,
2064
"skillTags": Array [
2165
Object {
@@ -30,12 +74,56 @@ Object {
3074

3175
exports[`Default reducer Initial state 1`] = `
3276
Object {
77+
"countries": Array [],
3378
"skillTags": Array [],
3479
}
3580
`;
3681

82+
exports[`Factory without server side rendering Get countries 1`] = `
83+
Object {
84+
"countries": Array [
85+
Object {
86+
"country": "Afghanistan",
87+
"countryCode": "AFG",
88+
},
89+
],
90+
"loadingCountriesError": false,
91+
"loadingSkillTagsError": true,
92+
"skillTags": Array [
93+
Object {
94+
"domain": "SKILLS",
95+
"id": 251,
96+
"name": "Jekyll",
97+
"status": "APPROVED",
98+
},
99+
],
100+
}
101+
`;
102+
103+
exports[`Factory without server side rendering Get countries error 1`] = `
104+
Object {
105+
"countries": Array [
106+
Object {
107+
"country": "Afghanistan",
108+
"countryCode": "AFG",
109+
},
110+
],
111+
"loadingCountriesError": true,
112+
"loadingSkillTagsError": true,
113+
"skillTags": Array [
114+
Object {
115+
"domain": "SKILLS",
116+
"id": 251,
117+
"name": "Jekyll",
118+
"status": "APPROVED",
119+
},
120+
],
121+
}
122+
`;
123+
37124
exports[`Factory without server side rendering Get skill tags 1`] = `
38125
Object {
126+
"countries": Array [],
39127
"loadingSkillTagsError": false,
40128
"skillTags": Array [
41129
Object {
@@ -50,6 +138,7 @@ Object {
50138

51139
exports[`Factory without server side rendering Get skill tags error 1`] = `
52140
Object {
141+
"countries": Array [],
53142
"loadingSkillTagsError": true,
54143
"skillTags": Array [
55144
Object {
@@ -64,6 +153,7 @@ Object {
64153

65154
exports[`Factory without server side rendering Initial state 1`] = `
66155
Object {
156+
"countries": Array [],
67157
"skillTags": Array [],
68158
}
69159
`;

0 commit comments

Comments
 (0)