Skip to content

Commit

Permalink
Merge pull request #422 from topcoder-platform/develop
Browse files Browse the repository at this point in the history
topgear updates and bug bash updates
  • Loading branch information
ajefts authored Aug 31, 2017
2 parents 8e82fe5 + fe4ef14 commit 6bb8908
Show file tree
Hide file tree
Showing 67 changed files with 1,761 additions and 249 deletions.
4 changes: 2 additions & 2 deletions __tests__/shared/actions/challenge-listing/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ describe('challengeListing.getPastChallengesInit', () => {
});

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

const a = actions.getChallengeSubtracksDone();

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

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

describe('challengeListing.getChallengeTagsDone', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ exports[`Snapshot match 1`] = `
className="src-shared-components-SubmissionManagement-Submission-___styles__action-col___2M1RY"
>
<a
href="https://studio.topcoder-dev.com?module=DownloadSubmission&sbmid=undefined&sbt=original"
href={undefined}
>
<DownloadIcon />
</a>
Expand Down Expand Up @@ -77,7 +77,7 @@ exports[`Snapshot match 2`] = `
className="src-shared-components-SubmissionManagement-Submission-___styles__action-col___2M1RY"
>
<a
href="https://studio.topcoder-dev.com?module=DownloadSubmission&sbmid=12345&sbt=original"
href={undefined}
>
<DownloadIcon />
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,22 @@ exports[`Matches shallow shapshot 1`] = `
<p
className="src-shared-components-SubmissionManagement-SubmissionManagement-___styles__round___3QPI9"
/>
<p
className="src-shared-components-SubmissionManagement-SubmissionManagement-___styles__time-left___1Tye2"
>
0
H
0
M
</p>
<p
className="src-shared-components-SubmissionManagement-SubmissionManagement-___styles__left-label___1eGT9"
>
left
</p>
<div>
<p
className="src-shared-components-SubmissionManagement-SubmissionManagement-___styles__time-left___1Tye2"
>
0
H
0
M
</p>
<p
className="src-shared-components-SubmissionManagement-SubmissionManagement-___styles__left-label___1eGT9"
>
left
</p>
</div>
</div>
</div>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
exports[`Snapshot match 1`] = `
<div
className="src-shared-components-TopcoderHeader-Auth-___style__auth___3X0_r"
onClick={[Function]}
role="button"
tabIndex="0"
>
<a
className="tc-btn-sm tc-btn-primary"
Expand All @@ -22,6 +25,9 @@ exports[`Snapshot match 1`] = `
exports[`Snapshot match 2`] = `
<div
className="column src-shared-components-TopcoderHeader-Auth-___style__auth___3X0_r"
onClick={[Function]}
role="button"
tabIndex="0"
>
<a
className="tc-btn-sm tc-btn-primary"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ exports[`Matches shallow shapshot shapshot 1 3`] = `
}
>
<LeaderboardAvatar
domain={undefined}
member={
Object {
"handle": undefined,
Expand Down Expand Up @@ -271,7 +270,6 @@ exports[`Matches shallow shapshot shapshot 1 3`] = `
}
>
<LeaderboardAvatar
domain={undefined}
member={
Object {
"handle": undefined,
Expand Down Expand Up @@ -300,7 +298,6 @@ exports[`Matches shallow shapshot shapshot 1 3`] = `
}
>
<LeaderboardAvatar
domain={undefined}
member={
Object {
"handle": undefined,
Expand All @@ -314,7 +311,6 @@ exports[`Matches shallow shapshot shapshot 1 3`] = `
</UserAvatarTooltip>
</div>
<LeaderboardAvatar
domain={undefined}
member={
Object {
"handle": "+1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const mockDatas = [{
setFilterState,
setSearchText,
validKeywords: ['key', 'word'],
validSubtracks: ['sub', 'track'],
validSubtracks: [{ name: 'sub', subTrack: 'sub' }, { name: 'track', subTrack: 'track' }],
onClose,
}, {
communityFilters: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ exports[`Matches shallow shapshot shapshot 1`] = `
<FiltersIcon
className="src-shared-components-challenge-listing-Filters-___ChallengeFilters__FiltersIcon___2xL1E"
/>
Filter
</span>
<FiltersSwitch
active={false}
Expand Down Expand Up @@ -161,7 +160,11 @@ exports[`Matches shallow shapshot shapshot 2`] = `
<FiltersIcon
className="src-shared-components-challenge-listing-Filters-___ChallengeFilters__FiltersIcon___2xL1E"
/>
Filter
<span
className="src-shared-components-challenge-listing-Filters-___ChallengeFilters__filtersCount___35dFo"
>
3
</span>
</span>
<FiltersSwitch
active={false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ exports[`Matches shallow shapshot 1`] = `
Sub community
</label>
<Select
autoBlur={true}
clearable={false}
id="community-select"
onChange={[Function]}
options={
Expand Down Expand Up @@ -113,7 +115,7 @@ exports[`Matches shallow shapshot 1`] = `
/>
</div>
<div
className="src-shared-components-challenge-listing-Filters-FiltersPanel-___style__filter___1-QUz src-shared-components-challenge-listing-Filters-FiltersPanel-___style__dates___3kH3c"
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"
>
<label
htmlFor="date-range-picker"
Expand All @@ -123,6 +125,23 @@ exports[`Matches shallow shapshot 1`] = `
<DateRangePicker
endDate={undefined}
id="date-range-picker"
numberOfMonths={1}
onDatesChange={[Function]}
startDate={undefined}
/>
</div>
<div
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"
>
<label
htmlFor="date-range-picker"
>
Date range
</label>
<DateRangePicker
endDate={undefined}
id="date-range-picker"
numberOfMonths={2}
onDatesChange={[Function]}
startDate={undefined}
/>
Expand Down Expand Up @@ -204,6 +223,8 @@ exports[`Matches shallow shapshot 2`] = `
Sub community
</label>
<Select
autoBlur={true}
clearable={false}
id="community-select"
onChange={[Function]}
options={
Expand Down Expand Up @@ -241,7 +262,23 @@ exports[`Matches shallow shapshot 2`] = `
/>
</div>
<div
className="src-shared-components-challenge-listing-Filters-FiltersPanel-___style__filter___1-QUz src-shared-components-challenge-listing-Filters-FiltersPanel-___style__dates___3kH3c"
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"
>
<label
htmlFor="date-range-picker"
>
Date range
</label>
<DateRangePicker
endDate={undefined}
id="date-range-picker"
numberOfMonths={1}
onDatesChange={[Function]}
startDate={undefined}
/>
</div>
<div
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"
>
<label
htmlFor="date-range-picker"
Expand All @@ -251,6 +288,7 @@ exports[`Matches shallow shapshot 2`] = `
<DateRangePicker
endDate={undefined}
id="date-range-picker"
numberOfMonths={2}
onDatesChange={[Function]}
startDate={undefined}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe('Click on title', () => {
test('onTitleClick', () => {
const btn = TU.findAllInRenderedTree(page, item =>
item && item.className && item.className.match(/accordion-title-button/));
expect(btn.length).toBe(1);
expect(btn.length).toBe(2);
TU.Simulate.click(btn[0]);
expect(mockOnTitleClick).toHaveBeenCalled();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ exports[`Snapshot match 1`] = `
Object {
"container": "src-shared-components-tc-communities-Accordion-Accordion-___style__container___2y_cC",
"content": "src-shared-components-tc-communities-Accordion-Accordion-___style__content___39ka7",
"title": "src-shared-components-tc-communities-Accordion-Accordion-___style__title___2jqCR",
"titleList": "src-shared-components-tc-communities-Accordion-Accordion-___style__titleList___1AJq5",
"titleListItem": "src-shared-components-tc-communities-Accordion-Accordion-___style__titleListItem___3MrXc",
"titleListItemSelected": "src-shared-components-tc-communities-Accordion-Accordion-___style__titleListItemSelected___2EAYn",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ exports[`Snapshot match 1`] = `
Object {
"containerOpen": "src-shared-components-tc-communities-Accordion-AccordionItem-___style__containerOpen___2_Z8e",
"content": "src-shared-components-tc-communities-Accordion-AccordionItem-___style__content___1dpq2",
"desktop": "src-shared-components-tc-communities-Accordion-AccordionItem-___style__desktop___23r4A",
"mobile": "src-shared-components-tc-communities-Accordion-AccordionItem-___style__mobile___3e9mH",
"title": "src-shared-components-tc-communities-Accordion-AccordionItem-___style__title___1l-ih",
"titleArrow": "src-shared-components-tc-communities-Accordion-AccordionItem-___style__titleArrow___33JDq",
"titleText": "src-shared-components-tc-communities-Accordion-AccordionItem-___style__titleText___1TU4v",
Expand All @@ -29,6 +31,8 @@ exports[`Snapshot match 2`] = `
Object {
"containerOpen": "src-shared-components-tc-communities-Accordion-AccordionItem-___style__containerOpen___2_Z8e",
"content": "src-shared-components-tc-communities-Accordion-AccordionItem-___style__content___1dpq2",
"desktop": "src-shared-components-tc-communities-Accordion-AccordionItem-___style__desktop___23r4A",
"mobile": "src-shared-components-tc-communities-Accordion-AccordionItem-___style__mobile___3e9mH",
"title": "src-shared-components-tc-communities-Accordion-AccordionItem-___style__title___1l-ih",
"titleArrow": "src-shared-components-tc-communities-Accordion-AccordionItem-___style__titleArrow___33JDq",
"titleText": "src-shared-components-tc-communities-Accordion-AccordionItem-___style__titleText___1TU4v",
Expand Down
1 change: 1 addition & 0 deletions __tests__/shared/reducers/challenge-listing/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ let expectedState = {

challenges: [],
challengeSubtracks: [],
challengeSubtracksMap: {},
challengeTags: [],

filter: {},
Expand Down
Loading

0 comments on commit 6bb8908

Please sign in to comment.