Skip to content

Commit d16b2ba

Browse files
Update to use new challenge.track name + added QA
1 parent b58fd0c commit d16b2ba

File tree

3 files changed

+9
-22
lines changed

3 files changed

+9
-22
lines changed

__tests__/__snapshots__/index.js.snap

+4-4
Original file line numberDiff line numberDiff line change
@@ -372,10 +372,10 @@ Object {
372372
},
373373
"tc": Object {
374374
"COMPETITION_TRACKS": Object {
375-
"DATA_SCIENCE": "data_science",
376-
"DESIGN": "design",
377-
"DEVELOP": "develop",
378-
"QA": "qa",
375+
"DATA_SCIENCE": "Data Science",
376+
"DESIGN": "Design",
377+
"DEVELOP": "Development",
378+
"QA": "Quality Assurance",
379379
},
380380
"REVIEW_OPPORTUNITY_TYPES": Object {
381381
"Contest Review": "Review",

src/utils/challenge/filter.js

+1-14
Original file line numberDiff line numberDiff line change
@@ -159,20 +159,7 @@ function filterByText(challenge, state) {
159159

160160
function filterByTrack(challenge, state) {
161161
if (!state.tracks) return true;
162-
163-
/* Development challenges having Data Science and QA tech tag, still should be
164-
* included into data science and qa tracks. */
165-
if (state.tracks[COMPETITION_TRACKS.DATA_SCIENCE]
166-
&& _.includes(challenge.tags, 'Data Science')) {
167-
return true;
168-
}
169-
170-
if (state.tracks[COMPETITION_TRACKS.QA]
171-
&& _.includes(challenge.tags, 'QA')) {
172-
return true;
173-
}
174-
175-
return _.keys(state.tracks).some(track => challenge.communities.has(track));
162+
return _.keys(state.tracks).some(track => challenge.track === track);
176163
}
177164

178165
function filterByTypes(challenge, state) {

src/utils/tc.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
* uses upper-case literals to encode the tracks. At some point, we should
1212
* update it in this code as well! */
1313
export const COMPETITION_TRACKS = {
14-
DATA_SCIENCE: 'data_science',
15-
DESIGN: 'design',
16-
DEVELOP: 'develop',
17-
QA: 'qa',
14+
DATA_SCIENCE: 'Data Science',
15+
DESIGN: 'Design',
16+
DEVELOP: 'Development',
17+
QA: 'Quality Assurance',
1818
};
1919

2020
/**

0 commit comments

Comments
 (0)