Skip to content

Commit 6bb8908

Browse files
authored
Merge pull request #422 from topcoder-platform/develop
topgear updates and bug bash updates
2 parents 8e82fe5 + fe4ef14 commit 6bb8908

File tree

67 files changed

+1761
-249
lines changed

Some content is hidden

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

67 files changed

+1761
-249
lines changed

__tests__/shared/actions/challenge-listing/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ describe('challengeListing.getPastChallengesInit', () => {
8282
});
8383

8484
describe('challengeListing.getChallengeSubtracksDone', () => {
85-
global.fetch = mockFetch(true, [{ description: 'dummy' }]);
85+
global.fetch = mockFetch(true, { result: { status: 200, content: [{ description: 'dummy' }] } });
8686

8787
const a = actions.getChallengeSubtracksDone();
8888

@@ -91,7 +91,7 @@ describe('challengeListing.getChallengeSubtracksDone', () => {
9191
});
9292

9393
test('payload is a promise which resolves to the expected object', () =>
94-
a.payload.then(res => expect(res).toEqual(['dummy', 'dummy'])));
94+
a.payload.then(res => expect(res).toEqual([{ description: 'dummy' }])));
9595
});
9696

9797
describe('challengeListing.getChallengeTagsDone', () => {

__tests__/shared/components/SubmissionManagement/__snapshots__/Submission.jsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ exports[`Snapshot match 1`] = `
2727
className="src-shared-components-SubmissionManagement-Submission-___styles__action-col___2M1RY"
2828
>
2929
<a
30-
href="https://studio.topcoder-dev.com?module=DownloadSubmission&sbmid=undefined&sbt=original"
30+
href={undefined}
3131
>
3232
<DownloadIcon />
3333
</a>
@@ -77,7 +77,7 @@ exports[`Snapshot match 2`] = `
7777
className="src-shared-components-SubmissionManagement-Submission-___styles__action-col___2M1RY"
7878
>
7979
<a
80-
href="https://studio.topcoder-dev.com?module=DownloadSubmission&sbmid=12345&sbt=original"
80+
href={undefined}
8181
>
8282
<DownloadIcon />
8383
</a>

__tests__/shared/components/SubmissionManagement/__snapshots__/SubmissionManagement.jsx.snap

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,22 @@ exports[`Matches shallow shapshot 1`] = `
2626
<p
2727
className="src-shared-components-SubmissionManagement-SubmissionManagement-___styles__round___3QPI9"
2828
/>
29-
<p
30-
className="src-shared-components-SubmissionManagement-SubmissionManagement-___styles__time-left___1Tye2"
31-
>
32-
33-
0
34-
H
35-
0
36-
M
37-
</p>
38-
<p
39-
className="src-shared-components-SubmissionManagement-SubmissionManagement-___styles__left-label___1eGT9"
40-
>
41-
left
42-
</p>
29+
<div>
30+
<p
31+
className="src-shared-components-SubmissionManagement-SubmissionManagement-___styles__time-left___1Tye2"
32+
>
33+
34+
0
35+
H
36+
0
37+
M
38+
</p>
39+
<p
40+
className="src-shared-components-SubmissionManagement-SubmissionManagement-___styles__left-label___1eGT9"
41+
>
42+
left
43+
</p>
44+
</div>
4345
</div>
4446
</div>
4547
<div

__tests__/shared/components/TopcoderHeader/__snapshots__/Auth.jsx.snap

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
exports[`Snapshot match 1`] = `
44
<div
55
className="src-shared-components-TopcoderHeader-Auth-___style__auth___3X0_r"
6+
onClick={[Function]}
7+
role="button"
8+
tabIndex="0"
69
>
710
<a
811
className="tc-btn-sm tc-btn-primary"
@@ -22,6 +25,9 @@ exports[`Snapshot match 1`] = `
2225
exports[`Snapshot match 2`] = `
2326
<div
2427
className="column src-shared-components-TopcoderHeader-Auth-___style__auth___3X0_r"
28+
onClick={[Function]}
29+
role="button"
30+
tabIndex="0"
2531
>
2632
<a
2733
className="tc-btn-sm tc-btn-primary"

__tests__/shared/components/challenge-listing/ChallengeCard/__snapshots__/Status.jsx.snap

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,6 @@ exports[`Matches shallow shapshot shapshot 1 3`] = `
242242
}
243243
>
244244
<LeaderboardAvatar
245-
domain={undefined}
246245
member={
247246
Object {
248247
"handle": undefined,
@@ -271,7 +270,6 @@ exports[`Matches shallow shapshot shapshot 1 3`] = `
271270
}
272271
>
273272
<LeaderboardAvatar
274-
domain={undefined}
275273
member={
276274
Object {
277275
"handle": undefined,
@@ -300,7 +298,6 @@ exports[`Matches shallow shapshot shapshot 1 3`] = `
300298
}
301299
>
302300
<LeaderboardAvatar
303-
domain={undefined}
304301
member={
305302
Object {
306303
"handle": undefined,
@@ -314,7 +311,6 @@ exports[`Matches shallow shapshot shapshot 1 3`] = `
314311
</UserAvatarTooltip>
315312
</div>
316313
<LeaderboardAvatar
317-
domain={undefined}
318314
member={
319315
Object {
320316
"handle": "+1",

__tests__/shared/components/challenge-listing/Filters/FiltersPanel.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const mockDatas = [{
2525
setFilterState,
2626
setSearchText,
2727
validKeywords: ['key', 'word'],
28-
validSubtracks: ['sub', 'track'],
28+
validSubtracks: [{ name: 'sub', subTrack: 'sub' }, { name: 'track', subTrack: 'track' }],
2929
onClose,
3030
}, {
3131
communityFilters: [

__tests__/shared/components/challenge-listing/Filters/__snapshots__/ChallengeFilters.jsx.snap

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ exports[`Matches shallow shapshot shapshot 1`] = `
3131
<FiltersIcon
3232
className="src-shared-components-challenge-listing-Filters-___ChallengeFilters__FiltersIcon___2xL1E"
3333
/>
34-
Filter
3534
</span>
3635
<FiltersSwitch
3736
active={false}
@@ -161,7 +160,11 @@ exports[`Matches shallow shapshot shapshot 2`] = `
161160
<FiltersIcon
162161
className="src-shared-components-challenge-listing-Filters-___ChallengeFilters__FiltersIcon___2xL1E"
163162
/>
164-
Filter
163+
<span
164+
className="src-shared-components-challenge-listing-Filters-___ChallengeFilters__filtersCount___35dFo"
165+
>
166+
3
167+
</span>
165168
</span>
166169
<FiltersSwitch
167170
active={false}

__tests__/shared/components/challenge-listing/Filters/__snapshots__/FiltersPanel.jsx.snap

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ exports[`Matches shallow shapshot 1`] = `
6565
Sub community
6666
</label>
6767
<Select
68+
autoBlur={true}
69+
clearable={false}
6870
id="community-select"
6971
onChange={[Function]}
7072
options={
@@ -113,7 +115,7 @@ exports[`Matches shallow shapshot 1`] = `
113115
/>
114116
</div>
115117
<div
116-
className="src-shared-components-challenge-listing-Filters-FiltersPanel-___style__filter___1-QUz src-shared-components-challenge-listing-Filters-FiltersPanel-___style__dates___3kH3c"
118+
className="src-shared-components-challenge-listing-Filters-FiltersPanel-___style__filter___1-QUz src-shared-components-challenge-listing-Filters-FiltersPanel-___style__dates___3kH3c src-shared-components-challenge-listing-Filters-FiltersPanel-___style__hidetwomonthdatepicker___OurWT"
117119
>
118120
<label
119121
htmlFor="date-range-picker"
@@ -123,6 +125,23 @@ exports[`Matches shallow shapshot 1`] = `
123125
<DateRangePicker
124126
endDate={undefined}
125127
id="date-range-picker"
128+
numberOfMonths={1}
129+
onDatesChange={[Function]}
130+
startDate={undefined}
131+
/>
132+
</div>
133+
<div
134+
className="src-shared-components-challenge-listing-Filters-FiltersPanel-___style__filter___1-QUz src-shared-components-challenge-listing-Filters-FiltersPanel-___style__dates___3kH3c src-shared-components-challenge-listing-Filters-FiltersPanel-___style__hideonemonthdatepicker___2zdTb"
135+
>
136+
<label
137+
htmlFor="date-range-picker"
138+
>
139+
Date range
140+
</label>
141+
<DateRangePicker
142+
endDate={undefined}
143+
id="date-range-picker"
144+
numberOfMonths={2}
126145
onDatesChange={[Function]}
127146
startDate={undefined}
128147
/>
@@ -204,6 +223,8 @@ exports[`Matches shallow shapshot 2`] = `
204223
Sub community
205224
</label>
206225
<Select
226+
autoBlur={true}
227+
clearable={false}
207228
id="community-select"
208229
onChange={[Function]}
209230
options={
@@ -241,7 +262,23 @@ exports[`Matches shallow shapshot 2`] = `
241262
/>
242263
</div>
243264
<div
244-
className="src-shared-components-challenge-listing-Filters-FiltersPanel-___style__filter___1-QUz src-shared-components-challenge-listing-Filters-FiltersPanel-___style__dates___3kH3c"
265+
className="src-shared-components-challenge-listing-Filters-FiltersPanel-___style__filter___1-QUz src-shared-components-challenge-listing-Filters-FiltersPanel-___style__dates___3kH3c src-shared-components-challenge-listing-Filters-FiltersPanel-___style__hidetwomonthdatepicker___OurWT"
266+
>
267+
<label
268+
htmlFor="date-range-picker"
269+
>
270+
Date range
271+
</label>
272+
<DateRangePicker
273+
endDate={undefined}
274+
id="date-range-picker"
275+
numberOfMonths={1}
276+
onDatesChange={[Function]}
277+
startDate={undefined}
278+
/>
279+
</div>
280+
<div
281+
className="src-shared-components-challenge-listing-Filters-FiltersPanel-___style__filter___1-QUz src-shared-components-challenge-listing-Filters-FiltersPanel-___style__dates___3kH3c src-shared-components-challenge-listing-Filters-FiltersPanel-___style__hideonemonthdatepicker___2zdTb"
245282
>
246283
<label
247284
htmlFor="date-range-picker"
@@ -251,6 +288,7 @@ exports[`Matches shallow shapshot 2`] = `
251288
<DateRangePicker
252289
endDate={undefined}
253290
id="date-range-picker"
291+
numberOfMonths={2}
254292
onDatesChange={[Function]}
255293
startDate={undefined}
256294
/>

__tests__/shared/components/tc-communities/AccordionItem.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ describe('Click on title', () => {
5353
test('onTitleClick', () => {
5454
const btn = TU.findAllInRenderedTree(page, item =>
5555
item && item.className && item.className.match(/accordion-title-button/));
56-
expect(btn.length).toBe(1);
56+
expect(btn.length).toBe(2);
5757
TU.Simulate.click(btn[0]);
5858
expect(mockOnTitleClick).toHaveBeenCalled();
5959
});

__tests__/shared/components/tc-communities/__snapshots__/Accordion.jsx.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ exports[`Snapshot match 1`] = `
77
Object {
88
"container": "src-shared-components-tc-communities-Accordion-Accordion-___style__container___2y_cC",
99
"content": "src-shared-components-tc-communities-Accordion-Accordion-___style__content___39ka7",
10+
"title": "src-shared-components-tc-communities-Accordion-Accordion-___style__title___2jqCR",
1011
"titleList": "src-shared-components-tc-communities-Accordion-Accordion-___style__titleList___1AJq5",
1112
"titleListItem": "src-shared-components-tc-communities-Accordion-Accordion-___style__titleListItem___3MrXc",
1213
"titleListItemSelected": "src-shared-components-tc-communities-Accordion-Accordion-___style__titleListItemSelected___2EAYn",

0 commit comments

Comments
 (0)