Skip to content

Commit 25d2892

Browse files
Sync with develop
2 parents ef02e52 + 1d21aae commit 25d2892

File tree

67 files changed

+1282
-1807
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

+1282
-1807
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,4 +206,4 @@ workflows:
206206
filters:
207207
branches:
208208
ignore:
209-
- develop
209+
- develop

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

+23-23
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import sidebarActions from 'actions/challenge-listing/sidebar';
22

3-
const actions = sidebarActions.challengeListing.sidebar;
3+
const actions = sidebarActions.challengeListingFrontend.sidebar;
44

55
const mockFetch = (ok, resolvesTo) => jest.fn(
66
() => Promise.resolve({ ok, json: () => resolvesTo }),
@@ -17,11 +17,11 @@ afterAll(() => {
1717
jest.clearAllMocks();
1818
});
1919

20-
describe('challengeListing.sidebar.changeFilterName', () => {
20+
describe('challengeListingFront.sidebar.changeFilterName', () => {
2121
const a = actions.changeFilterName('index', 'name');
2222

2323
test('has expected type', () => {
24-
expect(a.type).toBe('CHALLENGE_LISTING/SIDEBAR/CHANGE_FILTER_NAME');
24+
expect(a.type).toBe('CHALLENGE_LISTING_FRONTEND/SIDEBAR/CHANGE_FILTER_NAME');
2525
});
2626

2727
test('payload is expected object', () => expect(a.payload).toEqual({
@@ -30,126 +30,126 @@ describe('challengeListing.sidebar.changeFilterName', () => {
3030
}));
3131
});
3232

33-
describe('challengeListing.sidebar.deleteSavedFilter', () => {
33+
describe('challengeListingFrontend.sidebar.deleteSavedFilter', () => {
3434
global.fetch = mockFetch(true, 'dummy');
3535

3636
const a = actions.deleteSavedFilter('id', 'token');
3737

3838
test('has expected type', () => {
39-
expect(a.type).toBe('CHALLENGE_LISTING/SIDEBAR/DELETE_SAVED_FILTER');
39+
expect(a.type).toBe('CHALLENGE_LISTING_FRONTEND/SIDEBAR/DELETE_SAVED_FILTER');
4040
});
4141

4242
test('payload is a promise which resolves to the expected object', () => a.payload.then(res => expect(res).toEqual('id')));
4343
});
4444

45-
describe('challengeListing.sidebar.dragSavedFilterMove', () => {
45+
describe('challengeListingFrontend.sidebar.dragSavedFilterMove', () => {
4646
const a = actions.dragSavedFilterMove(
4747
{ target: { offsetHeight: 10 } },
4848
{ y: 0, startIndex: 0, index: 10 },
4949
);
5050

5151
test('has expected type', () => {
52-
expect(a.type).toBe('CHALLENGE_LISTING/SIDEBAR/DRAG_SAVED_FILTER_MOVE');
52+
expect(a.type).toBe('CHALLENGE_LISTING_FRONTEND/SIDEBAR/DRAG_SAVED_FILTER_MOVE');
5353
});
5454

5555
test('payload is expected object', () => expect(a.payload).toEqual({ y: 0, startIndex: 0, index: 10 }));
5656
});
5757

58-
describe('challengeListing.sidebar.dragSavedFilterMove with screenY', () => {
58+
describe('challengeListingFrontend.sidebar.dragSavedFilterMove with screenY', () => {
5959
const a = actions.dragSavedFilterMove(
6060
{ screenY: 10, target: { offsetHeight: 10 } },
6161
{ y: 0, startIndex: 0, index: 10 },
6262
);
6363

6464
test('has expected type', () => {
65-
expect(a.type).toBe('CHALLENGE_LISTING/SIDEBAR/DRAG_SAVED_FILTER_MOVE');
65+
expect(a.type).toBe('CHALLENGE_LISTING_FRONTEND/SIDEBAR/DRAG_SAVED_FILTER_MOVE');
6666
});
6767

6868
test('payload is expected object', () => expect(a.payload).toEqual({
6969
y: 0, startIndex: 0, index: 10, currentIndex: 1,
7070
}));
7171
});
7272

73-
describe('challengeListing.sidebar.dragSavedFilterMove same index', () => {
73+
describe('challengeListingFrontend.sidebar.dragSavedFilterMove same index', () => {
7474
const a = actions.dragSavedFilterMove(
7575
{ screenY: 10, target: { offsetHeight: 10 } },
7676
{ y: 0, startIndex: 9, index: 10 },
7777
);
7878

7979
test('has expected type', () => {
80-
expect(a.type).toBe('CHALLENGE_LISTING/SIDEBAR/DRAG_SAVED_FILTER_MOVE');
80+
expect(a.type).toBe('CHALLENGE_LISTING_FRONTEND/SIDEBAR/DRAG_SAVED_FILTER_MOVE');
8181
});
8282

8383
test('payload is expected object', () => expect(a.payload).toEqual({ y: 0, startIndex: 9, index: 10 }));
8484
});
8585

86-
describe('challengeListing.sidebar.dragSavedFilterStart', () => {
86+
describe('challengeListingFrontend.sidebar.dragSavedFilterStart', () => {
8787
const a = actions.dragSavedFilterStart(10, { screenY: 5 });
8888

8989
test('has expected type', () => {
90-
expect(a.type).toBe('CHALLENGE_LISTING/SIDEBAR/DRAG_SAVED_FILTER_START');
90+
expect(a.type).toBe('CHALLENGE_LISTING_FRONTEND/SIDEBAR/DRAG_SAVED_FILTER_START');
9191
});
9292

9393
test('payload is expected object', () => expect(a.payload).toEqual({ y: 5, startIndex: 10, currentIndex: 10 }));
9494
});
9595

96-
describe('challengeListing.sidebar.getSavedFilters', () => {
96+
describe('challengeListingFrontend.sidebar.getSavedFilters', () => {
9797
global.fetch = mockFetch(true, []);
9898

9999
const a = actions.getSavedFilters('id', 'token');
100100

101101
test('has expected type', () => {
102-
expect(a.type).toBe('CHALLENGE_LISTING/SIDEBAR/GET_SAVED_FILTERS');
102+
expect(a.type).toBe('CHALLENGE_LISTING_FRONTEND/SIDEBAR/GET_SAVED_FILTERS');
103103
});
104104

105105
// FIXME: Broken in topcoder-react-lib v0.3.0
106106
// test('payload is a promise which resolves to the expected object', () =>
107107
// a.payload.then(res => expect(res).toEqual([])));
108108
});
109109

110-
describe('challengeListing.sidebar.resetFilterName', () => {
110+
describe('challengeListingFrontend.sidebar.resetFilterName', () => {
111111
const a = actions.resetFilterName(1);
112112

113113
test('has expected type', () => {
114-
expect(a.type).toBe('CHALLENGE_LISTING/SIDEBAR/RESET_FILTER_NAME');
114+
expect(a.type).toBe('CHALLENGE_LISTING_FRONTEND/SIDEBAR/RESET_FILTER_NAME');
115115
});
116116

117117
test('payload is expected object', () => expect(a.payload).toEqual(1));
118118
});
119119

120-
describe('challengeListing.sidebar.saveFilter', () => {
120+
describe('challengeListingFrontend.sidebar.saveFilter', () => {
121121
global.fetch = mockFetch(true, 'dummy');
122122

123123
const a = actions.saveFilterDone('name', {}, 'token');
124124

125125
test('has expected type', () => {
126-
expect(a.type).toBe('CHALLENGE_LISTING/SIDEBAR/SAVE_FILTER_DONE');
126+
expect(a.type).toBe('CHALLENGE_LISTING_FRONTEND/SIDEBAR/SAVE_FILTER_DONE');
127127
});
128128

129129
// FIXME: Broken in topcoder-react-lib v0.3.0
130130
// test('payload is a promise which resolves to the expected object', () =>
131131
// a.payload.then(res => expect(res).toEqual('dummy')));
132132
});
133133

134-
describe('challengeListing.sidebar.updateAllSavedFilters', () => {
134+
describe('challengeListingFrontend.sidebar.updateAllSavedFilters', () => {
135135
global.fetch = mockFetch(true, 'dummy');
136136

137137
const a = actions.updateAllSavedFilters([{ filter: {} }], 'token');
138138

139139
test('has expected type', () => {
140-
expect(a.type).toBe('CHALLENGE_LISTING/SIDEBAR/UPDATE_ALL_SAVED_FILTERS');
140+
expect(a.type).toBe('CHALLENGE_LISTING_FRONTEND/SIDEBAR/UPDATE_ALL_SAVED_FILTERS');
141141
});
142142

143143
test('payload is undefined', () => expect(a.payload).toBeUndefined());
144144
});
145145

146-
describe('challengeListing.sidebar.updateSavedFilter', () => {
146+
describe('challengeListingFrontend.sidebar.updateSavedFilter', () => {
147147
global.fetch = mockFetch(true, 'dummy');
148148

149149
const a = actions.updateSavedFilter({}, 'token');
150150

151151
test('has expected type', () => {
152-
expect(a.type).toBe('CHALLENGE_LISTING/SIDEBAR/UPDATE_SAVED_FILTER');
152+
expect(a.type).toBe('CHALLENGE_LISTING_FRONTEND/SIDEBAR/UPDATE_SAVED_FILTER');
153153
});
154154

155155
// FIXME: Broken in topcoder-react-lib v0.3.0

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

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ exports[`Matches shallow shapshot 1`] = `
1515
displayFormat="MMM DD, YYYY"
1616
enableOutsideDays={false}
1717
endDate={null}
18+
endDateId="date-range-picker-two-month"
1819
endDatePlaceholderText="End Date"
1920
firstDayOfWeek={null}
2021
focusedInput={null}
@@ -89,6 +90,7 @@ exports[`Matches shallow shapshot 1`] = `
8990
showDefaultInputIcon={false}
9091
small={false}
9192
startDate={null}
93+
startDateId="date-range-picker-one-month"
9294
startDatePlaceholderText="Start Date"
9395
verticalHeight={null}
9496
verticalSpacing={22}

0 commit comments

Comments
 (0)