Skip to content

Challenge 30121747 #156

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 2 commits into from
Apr 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Expand Up @@ -29,7 +29,7 @@ jobs:
at: .
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
- run: npm publish

# dont change anything
workflows:
version: 2
build:
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ The [Topcoder](https://www.topcoder.com) lib for internal ReactJS projects.

Change the property in `AV_SCAN_SCORER_REVIEW_TYPE_ID` in config.

### Configuration for AV-Scan scorer review type ID

Change the property in `PROVISIONAL_SCORING_COMPLETED_REVIEW_TYPE_ID` in config.

### Development
```shell
# Install dependencies
Expand All @@ -19,7 +23,7 @@ npm install
npm test
npm run build

# Go to other project which depends on the topcoder-react-lib, config its package.json so
# Go to other project which depends on the topcoder-react-lib, config its package.json so
# that the 'topcoder-react-lib' points to the local foler path of topcoder-react-lib:
#
# "dependencies": {
Expand Down
35 changes: 35 additions & 0 deletions __tests__/__snapshots__/index.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,22 @@ Object {
"getAllCountriesInit": [Function],
"getCountriesDone": [Function],
"getCountriesInit": [Function],
"getReviewTypesDone": [Function],
"getReviewTypesInit": [Function],
"getSkillTagsDone": [Function],
"getSkillTagsInit": [Function],
},
"memberSearch": Object {
"checkIfSearchTermIsATag": [Function],
"clearMemberSearch": [Function],
"loadMoreUsernames": [Function],
"memberSearchSuccess": [Function],
"resetSearchTerm": [Function],
"setSearchTag": [Function],
"setSearchTerm": [Function],
"topMemberSearchSuccess": [Function],
"usernameSearchSuccess": [Function],
},
"memberTasks": Object {
"dropAll": [Function],
"getDone": [Function],
Expand Down Expand Up @@ -93,6 +106,18 @@ Object {
"getUserSrmDone": [Function],
"getUserSrmInit": [Function],
},
"notifications": Object {
"dismissChallengeNotificationsDone": [Function],
"dismissChallengeNotificationsInit": [Function],
"getNotificationsDone": [Function],
"getNotificationsInit": [Function],
"markAllNotificationAsReadDone": [Function],
"markAllNotificationAsReadInit": [Function],
"markAllNotificationAsSeenDone": [Function],
"markAllNotificationAsSeenInit": [Function],
"markNotificationAsReadDone": [Function],
"markNotificationAsReadInit": [Function],
},
"profile": Object {
"addSkillDone": [Function],
"addSkillInit": [Function],
Expand Down Expand Up @@ -238,9 +263,11 @@ Object {
"groups": [Function],
"looker": [Function],
"lookup": [Function],
"memberSearch": [Function],
"memberTasks": [Function],
"members": [Function],
"mySubmissionsManagement": [Function],
"notifications": [Function],
"profile": [Function],
"reviewOpportunity": [Function],
"settings": [Function],
Expand Down Expand Up @@ -290,10 +317,18 @@ Object {
"default": undefined,
"getService": [Function],
},
"memberSearch": Object {
"default": undefined,
"getService": [Function],
},
"members": Object {
"default": undefined,
"getService": [Function],
},
"notifications": Object {
"default": undefined,
"getService": [Function],
},
"reviewOpportunities": Object {
"default": undefined,
"getReviewOpportunitiesService": [Function],
Expand Down
2 changes: 2 additions & 0 deletions __tests__/actions/__snapshots__/lookup.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Object {
"getAllCountriesInit": [Function],
"getCountriesDone": [Function],
"getCountriesInit": [Function],
"getReviewTypesDone": [Function],
"getReviewTypesInit": [Function],
"getSkillTagsDone": [Function],
"getSkillTagsInit": [Function],
},
Expand Down
10 changes: 10 additions & 0 deletions __tests__/reducers/__snapshots__/lookup.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Object {
],
"loadingCountriesError": false,
"loadingSkillTagsError": true,
"reviewTypes": Array [],
"skillTags": Array [
Object {
"domain": "SKILLS",
Expand All @@ -33,6 +34,7 @@ Object {
],
"loadingCountriesError": true,
"loadingSkillTagsError": true,
"reviewTypes": Array [],
"skillTags": Array [
Object {
"domain": "SKILLS",
Expand All @@ -49,6 +51,7 @@ Object {
"allCountries": Array [],
"countries": Array [],
"loadingSkillTagsError": false,
"reviewTypes": Array [],
"skillTags": Array [
Object {
"domain": "SKILLS",
Expand All @@ -65,6 +68,7 @@ Object {
"allCountries": Array [],
"countries": Array [],
"loadingSkillTagsError": true,
"reviewTypes": Array [],
"skillTags": Array [
Object {
"domain": "SKILLS",
Expand All @@ -80,6 +84,7 @@ exports[`Default reducer Initial state 1`] = `
Object {
"allCountries": Array [],
"countries": Array [],
"reviewTypes": Array [],
"skillTags": Array [],
}
`;
Expand All @@ -95,6 +100,7 @@ Object {
],
"loadingCountriesError": false,
"loadingSkillTagsError": true,
"reviewTypes": Array [],
"skillTags": Array [
Object {
"domain": "SKILLS",
Expand All @@ -117,6 +123,7 @@ Object {
],
"loadingCountriesError": true,
"loadingSkillTagsError": true,
"reviewTypes": Array [],
"skillTags": Array [
Object {
"domain": "SKILLS",
Expand All @@ -133,6 +140,7 @@ Object {
"allCountries": Array [],
"countries": Array [],
"loadingSkillTagsError": false,
"reviewTypes": Array [],
"skillTags": Array [
Object {
"domain": "SKILLS",
Expand All @@ -149,6 +157,7 @@ Object {
"allCountries": Array [],
"countries": Array [],
"loadingSkillTagsError": true,
"reviewTypes": Array [],
"skillTags": Array [
Object {
"domain": "SKILLS",
Expand All @@ -164,6 +173,7 @@ exports[`Factory without server side rendering Initial state 1`] = `
Object {
"allCountries": Array [],
"countries": Array [],
"reviewTypes": Array [],
"skillTags": Array [],
}
`;
1 change: 1 addition & 0 deletions config/default.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"AV_SCAN_SCORER_REVIEW_TYPE_ID": "",
"PROVISIONAL_SCORING_COMPLETED_REVIEW_TYPE_ID": "",
"PAGE_SIZE": 50,
"REVIEW_OPPORTUNITY_PAGE_SIZE": 1000
}
3 changes: 2 additions & 1 deletion config/development.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"AV_SCAN_SCORER_REVIEW_TYPE_ID": "68c5a381-c8ab-48af-92a7-7a869a4ee6c3"
"AV_SCAN_SCORER_REVIEW_TYPE_ID": "68c5a381-c8ab-48af-92a7-7a869a4ee6c3",
"PROVISIONAL_SCORING_COMPLETED_REVIEW_TYPE_ID": "52c91e85-745f-4e62-b592-9879a2dfe9fd"
}
3 changes: 2 additions & 1 deletion config/production.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"AV_SCAN_SCORER_REVIEW_TYPE_ID": "55bbb17d-aac2-45a6-89c3-a8d102863d05"
"AV_SCAN_SCORER_REVIEW_TYPE_ID": "55bbb17d-aac2-45a6-89c3-a8d102863d05",
"PROVISIONAL_SCORING_COMPLETED_REVIEW_TYPE_ID": "df51ca7d-fb0a-4147-9569-992fcf5aae48"
}
8 changes: 8 additions & 0 deletions config/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,12 @@ module.exports = {
V3: 'https://api.topcoder-dev.com/v3',
},
dummyConfigKey: 'Dummy config value',
SECRET: {
TC_M2M: {
AUTH0_URL: '',
AUTH0_AUDIENCE: '',
TOKEN_CACHE_TIME: '',
AUTH0_PROXY_SERVER_URL: '',
},
},
};
17 changes: 10 additions & 7 deletions config/webpack/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
const webpack = require('webpack');

module.exports = {
plugins: [
// eslint-disable-next-line global-require
new webpack.DefinePlugin({ CONFIG: JSON.stringify(require('config')) }),
],
node: {
tls: 'empty',
fs: 'empty',
net: 'empty',
},
// Don't include the dependencies to keep built bundle small,
// they will be provided by the app using this lib
externals: [
Expand All @@ -24,8 +25,10 @@ module.exports = {
'tc-accounts',
'to-capital-case',
'topcoder-react-utils',
'tc-core-library-js',
],
plugins: [
// eslint-disable-next-line global-require
new webpack.DefinePlugin({ CONFIG: JSON.stringify(require('config')) }),
],
node: {
fs: 'empty',
},
};
Loading