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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v8.11.1
1+
8.11.2

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
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

Lines changed: 9 additions & 3 deletions
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

Lines changed: 20 additions & 0 deletions
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

Lines changed: 2 additions & 0 deletions
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

Lines changed: 17 additions & 0 deletions
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+
});

0 commit comments

Comments
 (0)