diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-23 00:08:58 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-23 00:08:58 +0000 |
commit | 94221585cabf666f38ac989978838393fc3bf56e (patch) | |
tree | 54cae93eba04c045b3b2037bbcdbaf913320c9c6 /spec/frontend/groups | |
parent | 2319d04d069d5e066e35cc44035239b21d3fae32 (diff) | |
download | gitlab-ce-94221585cabf666f38ac989978838393fc3bf56e.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/groups')
-rw-r--r-- | spec/frontend/groups/components/app_spec.js | 8 | ||||
-rw-r--r-- | spec/frontend/groups/components/groups_spec.js | 5 | ||||
-rw-r--r-- | spec/frontend/groups/components/item_actions_spec.js | 5 |
3 files changed, 10 insertions, 8 deletions
diff --git a/spec/frontend/groups/components/app_spec.js b/spec/frontend/groups/components/app_spec.js index 3c04cac7402..35eda21e047 100644 --- a/spec/frontend/groups/components/app_spec.js +++ b/spec/frontend/groups/components/app_spec.js @@ -184,7 +184,7 @@ describe('AppComponent', () => { jest.spyOn(window.history, 'replaceState').mockImplementation(() => {}); jest.spyOn($, 'scrollTo').mockImplementation(() => {}); - const fetchPagePromise = vm.fetchPage([2, null, null, true]); + const fetchPagePromise = vm.fetchPage(2, null, null, true); expect(vm.isLoading).toBe(true); expect(vm.fetchGroups).toHaveBeenCalledWith({ @@ -275,7 +275,7 @@ describe('AppComponent', () => { expect(vm.targetGroup).toBe(null); expect(vm.targetParentGroup).toBe(null); - vm.showLeaveGroupModal([group, mockParentGroupItem]); + vm.showLeaveGroupModal(group, mockParentGroupItem); expect(vm.targetGroup).not.toBe(null); expect(vm.targetParentGroup).not.toBe(null); @@ -286,7 +286,7 @@ describe('AppComponent', () => { expect(vm.showModal).toBe(false); expect(vm.groupLeaveConfirmationMessage).toBe(''); - vm.showLeaveGroupModal([group, mockParentGroupItem]); + vm.showLeaveGroupModal(group, mockParentGroupItem); expect(vm.showModal).toBe(true); expect(vm.groupLeaveConfirmationMessage).toBe( @@ -298,7 +298,7 @@ describe('AppComponent', () => { describe('hideLeaveGroupModal', () => { it('hides modal confirmation which is shown before leaving the group', () => { const group = { ...mockParentGroupItem }; - vm.showLeaveGroupModal([group, mockParentGroupItem]); + vm.showLeaveGroupModal(group, mockParentGroupItem); expect(vm.showModal).toBe(true); vm.hideLeaveGroupModal(); diff --git a/spec/frontend/groups/components/groups_spec.js b/spec/frontend/groups/components/groups_spec.js index 42c3c813941..6205400eb03 100644 --- a/spec/frontend/groups/components/groups_spec.js +++ b/spec/frontend/groups/components/groups_spec.js @@ -41,12 +41,13 @@ describe('GroupsComponent', () => { vm.change(2); - expect(eventHub.$emit).toHaveBeenCalledWith('fetchPage', [ + expect(eventHub.$emit).toHaveBeenCalledWith( + 'fetchPage', 2, expect.any(Object), expect.any(Object), expect.any(Object), - ]); + ); }); }); }); diff --git a/spec/frontend/groups/components/item_actions_spec.js b/spec/frontend/groups/components/item_actions_spec.js index 1ca42f28c7f..c0dc1a816e6 100644 --- a/spec/frontend/groups/components/item_actions_spec.js +++ b/spec/frontend/groups/components/item_actions_spec.js @@ -31,10 +31,11 @@ describe('ItemActionsComponent', () => { jest.spyOn(eventHub, '$emit').mockImplementation(() => {}); vm.onLeaveGroup(); - expect(eventHub.$emit).toHaveBeenCalledWith('showLeaveGroupModal', [ + expect(eventHub.$emit).toHaveBeenCalledWith( + 'showLeaveGroupModal', vm.group, vm.parentGroup, - ]); + ); }); }); }); |