From cb8bd7d5946ca50a2de99645687a633a0c8105be Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 22 Jul 2021 12:10:04 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/frontend/diffs/components/settings_dropdown_spec.js | 8 ++++++-- spec/frontend/diffs/store/actions_spec.js | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'spec/frontend/diffs') diff --git a/spec/frontend/diffs/components/settings_dropdown_spec.js b/spec/frontend/diffs/components/settings_dropdown_spec.js index 43b9c5871a6..2dd35519464 100644 --- a/spec/frontend/diffs/components/settings_dropdown_spec.js +++ b/spec/frontend/diffs/components/settings_dropdown_spec.js @@ -48,13 +48,17 @@ describe('Diff settings dropdown component', () => { it('list view button dispatches setRenderTreeList with false', () => { wrapper.find('.js-list-view').trigger('click'); - expect(store.dispatch).toHaveBeenCalledWith('diffs/setRenderTreeList', false); + expect(store.dispatch).toHaveBeenCalledWith('diffs/setRenderTreeList', { + renderTreeList: false, + }); }); it('tree view button dispatches setRenderTreeList with true', () => { wrapper.find('.js-tree-view').trigger('click'); - expect(store.dispatch).toHaveBeenCalledWith('diffs/setRenderTreeList', true); + expect(store.dispatch).toHaveBeenCalledWith('diffs/setRenderTreeList', { + renderTreeList: true, + }); }); it('sets list button as selected when renderTreeList is false', () => { diff --git a/spec/frontend/diffs/store/actions_spec.js b/spec/frontend/diffs/store/actions_spec.js index c2e5d07bcfd..4681b4f9d45 100644 --- a/spec/frontend/diffs/store/actions_spec.js +++ b/spec/frontend/diffs/store/actions_spec.js @@ -1000,7 +1000,7 @@ describe('DiffsStoreActions', () => { it('commits SET_RENDER_TREE_LIST', (done) => { testAction( setRenderTreeList, - true, + { renderTreeList: true }, {}, [{ type: types.SET_RENDER_TREE_LIST, payload: true }], [], @@ -1009,7 +1009,7 @@ describe('DiffsStoreActions', () => { }); it('sets localStorage', () => { - setRenderTreeList({ commit() {} }, true); + setRenderTreeList({ commit() {} }, { renderTreeList: true }); expect(localStorage.setItem).toHaveBeenCalledWith('mr_diff_tree_list', true); }); -- cgit v1.2.1