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/vue_shared/components/dropdown/dropdown_widget_spec.js | |
parent | 6372471f43ee03c05a7c1f8b0c6ac6b8a7431dbe (diff) |
Add latest changes from gitlab-org/gitlab@16-7-stable-eev16.7.0-rc42
Diffstat (limited to 'spec/frontend/vue_shared/components/dropdown/dropdown_widget_spec.js')
-rw-r--r-- | spec/frontend/vue_shared/components/dropdown/dropdown_widget_spec.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/spec/frontend/vue_shared/components/dropdown/dropdown_widget_spec.js b/spec/frontend/vue_shared/components/dropdown/dropdown_widget_spec.js index dd5a05a40c6..1a9a08a9656 100644 --- a/spec/frontend/vue_shared/components/dropdown/dropdown_widget_spec.js +++ b/spec/frontend/vue_shared/components/dropdown/dropdown_widget_spec.js @@ -1,8 +1,8 @@ import { GlDropdown, GlSearchBoxByType, GlDropdownItem } from '@gitlab/ui'; import { shallowMount } from '@vue/test-utils'; - import { nextTick } from 'vue'; import DropdownWidget from '~/vue_shared/components/dropdown/dropdown_widget/dropdown_widget.vue'; +import { stubComponent, RENDER_ALL_SLOTS_TEMPLATE } from 'helpers/stub_component'; describe('DropdownWidget component', () => { let wrapper; @@ -27,11 +27,14 @@ describe('DropdownWidget component', () => { ...props, }, stubs: { - GlDropdown, + GlDropdown: stubComponent(GlDropdown, { + methods: { + hide: jest.fn(), + }, + template: RENDER_ALL_SLOTS_TEMPLATE, + }), }, }); - - jest.spyOn(findDropdown().vm, 'hide').mockImplementation(); }; beforeEach(() => { |