Skip to content

Commit 59ac00f

Browse files
committed
removed unused test to focus on user interactions
1 parent de8e0fc commit 59ac00f

File tree

1 file changed

+2
-42
lines changed
  • contentcuration/contentcuration/frontend/channelList/views/Channel/__tests__

1 file changed

+2
-42
lines changed

contentcuration/contentcuration/frontend/channelList/views/Channel/__tests__/catalogList.spec.js

Lines changed: 2 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ const results = ['channel-1', 'channel-2'];
2929

3030
function makeWrapper(overrides = {}) {
3131
const mockSearchCatalog = jest.fn(() => Promise.resolve());
32-
const mockDownloadChannelsCSV = jest.fn(() => Promise.resolve());
33-
const mockDownloadChannelsPDF = jest.fn(() => Promise.resolve());
3432

3533
const store = new Store({
3634
state: {
@@ -130,8 +128,6 @@ function makeWrapper(overrides = {}) {
130128
store,
131129
router,
132130
mockSearchCatalog,
133-
mockDownloadChannelsCSV,
134-
mockDownloadChannelsPDF,
135131
};
136132
}
137133

@@ -173,7 +169,7 @@ describe('CatalogList', () => {
173169
expect(screen.queryByText('Cancel')).not.toBeInTheDocument();
174170
});
175171

176-
it('should enter selection mode when user clicks select button', async () => {
172+
it('should enter selection mode and show toolbar with selection count when user clicks select button', async () => {
177173
const user = userEvent.setup();
178174
makeWrapper();
179175

@@ -183,17 +179,6 @@ describe('CatalogList', () => {
183179
await waitFor(() => {
184180
expect(screen.getByText('Select all')).toBeInTheDocument();
185181
expect(screen.getByText('Cancel')).toBeInTheDocument();
186-
});
187-
});
188-
189-
it('should show all channels selected by default in selection mode', async () => {
190-
const user = userEvent.setup();
191-
makeWrapper();
192-
193-
await waitFor(() => screen.getByText('Download a summary of selected channels'));
194-
await user.click(screen.getByText('Download a summary of selected channels'));
195-
196-
await waitFor(() => {
197182
expect(screen.getByText('2 channels selected')).toBeInTheDocument();
198183
});
199184
});
@@ -217,7 +202,7 @@ describe('CatalogList', () => {
217202
});
218203

219204
describe('channel selection', () => {
220-
it('should show selection count in toolbar when in selection mode', async () => {
205+
it('should display select-all checkbox and selection count in selection mode', async () => {
221206
const user = userEvent.setup();
222207
makeWrapper();
223208

@@ -229,18 +214,6 @@ describe('CatalogList', () => {
229214
expect(screen.getByText('2 channels selected')).toBeInTheDocument();
230215
});
231216
});
232-
233-
it('should display select-all checkbox in selection mode', async () => {
234-
const user = userEvent.setup();
235-
makeWrapper();
236-
237-
await waitFor(() => screen.getByText('Download a summary of selected channels'));
238-
await user.click(screen.getByText('Download a summary of selected channels'));
239-
240-
await waitFor(() => {
241-
expect(screen.getByText('Select all')).toBeInTheDocument();
242-
});
243-
});
244217
});
245218

246219
describe('search and filtering', () => {
@@ -285,18 +258,5 @@ describe('CatalogList', () => {
285258
expect(screen.getByText('Download a summary of selected channels')).toBeInTheDocument();
286259
});
287260
});
288-
289-
it('should display toolbar when entering selection mode', async () => {
290-
const user = userEvent.setup();
291-
makeWrapper();
292-
293-
await waitFor(() => screen.getByText('Download a summary of selected channels'));
294-
await user.click(screen.getByText('Download a summary of selected channels'));
295-
296-
await waitFor(() => {
297-
expect(screen.getByText('Select all')).toBeInTheDocument();
298-
expect(screen.getByText('Cancel')).toBeInTheDocument();
299-
});
300-
});
301261
});
302262
});

0 commit comments

Comments
 (0)