diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-19 14:01:45 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-19 14:01:45 +0300 |
commit | 9297025d0b7ddf095eb618dfaaab2ff8f2018d8b (patch) | |
tree | 865198c01d1824a9b098127baa3ab980c9cd2c06 /spec/frontend/whats_new/store/actions_spec.js | |
parent | 6372471f43ee03c05a7c1f8b0c6ac6b8a7431dbe (diff) |
Add latest changes from gitlab-org/gitlab@16-7-stable-eev16.7.0-rc42
Diffstat (limited to 'spec/frontend/whats_new/store/actions_spec.js')
-rw-r--r-- | spec/frontend/whats_new/store/actions_spec.js | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/spec/frontend/whats_new/store/actions_spec.js b/spec/frontend/whats_new/store/actions_spec.js index 5f5e4e53be2..908aa3aaeea 100644 --- a/spec/frontend/whats_new/store/actions_spec.js +++ b/spec/frontend/whats_new/store/actions_spec.js @@ -11,8 +11,8 @@ describe('whats new actions', () => { describe('openDrawer', () => { useLocalStorageSpy(); - it('should commit openDrawer', () => { - testAction(actions.openDrawer, 'digest-hash', {}, [{ type: types.OPEN_DRAWER }]); + it('should commit openDrawer', async () => { + await testAction(actions.openDrawer, 'digest-hash', {}, [{ type: types.OPEN_DRAWER }]); expect(window.localStorage.setItem).toHaveBeenCalledWith( 'display-whats-new-notification', @@ -23,7 +23,7 @@ describe('whats new actions', () => { describe('closeDrawer', () => { it('should commit closeDrawer', () => { - testAction(actions.closeDrawer, {}, {}, [{ type: types.CLOSE_DRAWER }]); + return testAction(actions.closeDrawer, {}, {}, [{ type: types.CLOSE_DRAWER }]); }); }); @@ -52,7 +52,7 @@ describe('whats new actions', () => { .onGet('/-/whats_new', { params: { page: undefined, v: undefined } }) .replyOnce(HTTP_STATUS_OK, [{ title: 'GitLab Stories' }]); - testAction( + return testAction( actions.fetchItems, {}, {}, @@ -69,7 +69,7 @@ describe('whats new actions', () => { .onGet('/-/whats_new', { params: { page: 8, v: 42 } }) .replyOnce(HTTP_STATUS_OK, [{ title: 'GitLab Stories' }]); - testAction( + return testAction( actions.fetchItems, { page: 8, versionDigest: 42 }, {}, @@ -80,11 +80,11 @@ describe('whats new actions', () => { }); it('if already fetching, does not fetch', () => { - testAction(actions.fetchItems, {}, { fetching: true }, []); + return testAction(actions.fetchItems, {}, { fetching: true }, []); }); it('should commit fetching, setFeatures and setPagination', () => { - testAction(actions.fetchItems, {}, {}, [ + return testAction(actions.fetchItems, {}, {}, [ { type: types.SET_FETCHING, payload: true }, { type: types.ADD_FEATURES, payload: [{ title: 'Whats New Drawer', url: 'www.url.com' }] }, { type: types.SET_PAGE_INFO, payload: { nextPage: 2 } }, @@ -94,8 +94,10 @@ describe('whats new actions', () => { }); describe('setDrawerBodyHeight', () => { - testAction(actions.setDrawerBodyHeight, 42, {}, [ - { type: types.SET_DRAWER_BODY_HEIGHT, payload: 42 }, - ]); + it('should commit setDrawerBodyHeight', () => { + return testAction(actions.setDrawerBodyHeight, 42, {}, [ + { type: types.SET_DRAWER_BODY_HEIGHT, payload: 42 }, + ]); + }); }); }); |