diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-19 23:18:09 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-19 23:18:09 +0000 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /spec/frontend/add_context_commits_modal/components/add_context_commits_modal_spec.js | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) | |
download | gitlab-ce-6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde.tar.gz |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'spec/frontend/add_context_commits_modal/components/add_context_commits_modal_spec.js')
-rw-r--r-- | spec/frontend/add_context_commits_modal/components/add_context_commits_modal_spec.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/frontend/add_context_commits_modal/components/add_context_commits_modal_spec.js b/spec/frontend/add_context_commits_modal/components/add_context_commits_modal_spec.js index bffadbde087..1d57473943b 100644 --- a/spec/frontend/add_context_commits_modal/components/add_context_commits_modal_spec.js +++ b/spec/frontend/add_context_commits_modal/components/add_context_commits_modal_spec.js @@ -48,8 +48,8 @@ describe('AddContextCommitsModal', () => { return wrapper; }; - const findModal = () => wrapper.find(GlModal); - const findSearch = () => wrapper.find(GlSearchBoxByType); + const findModal = () => wrapper.findComponent(GlModal); + const findSearch = () => wrapper.findComponent(GlSearchBoxByType); beforeEach(() => { wrapper = createWrapper(); @@ -75,7 +75,7 @@ describe('AddContextCommitsModal', () => { it('when user starts entering text in search box, it calls action "searchCommits" after waiting for 500s', () => { const searchText = 'abcd'; findSearch().vm.$emit('input', searchText); - expect(searchCommits).not.toBeCalled(); + expect(searchCommits).not.toHaveBeenCalled(); jest.advanceTimersByTime(500); expect(searchCommits).toHaveBeenCalledWith(expect.anything(), searchText); }); @@ -107,12 +107,12 @@ describe('AddContextCommitsModal', () => { it('a disabled ok button in first tab, when row is selected in second tab', () => { createWrapper({ selectedContextCommits: [commit] }); - expect(wrapper.find(GlModal).attributes('ok-disabled')).toBe('true'); + expect(wrapper.findComponent(GlModal).attributes('ok-disabled')).toBe('true'); }); }); describe('has an ok button when clicked calls action', () => { - it('"createContextCommits" when only new commits to be added ', async () => { + it('"createContextCommits" when only new commits to be added', async () => { wrapper.vm.$store.state.selectedCommits = [{ ...commit, isSelected: true }]; findModal().vm.$emit('ok'); await nextTick(); @@ -121,7 +121,7 @@ describe('AddContextCommitsModal', () => { forceReload: true, }); }); - it('"removeContextCommits" when only added commits are to be removed ', async () => { + it('"removeContextCommits" when only added commits are to be removed', async () => { wrapper.vm.$store.state.toRemoveCommits = [commit.short_id]; findModal().vm.$emit('ok'); await nextTick(); |