diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-29 06:09:44 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-29 06:09:44 +0300 |
commit | 111f9a7cc6834edfeb81c4b91bcf43df332096a7 (patch) | |
tree | 76db22a425042d59c08d7bcecaed160cfdef885a /spec/frontend | |
parent | 72278d5e10d7470b59b81c1e51379baa3a6cdab8 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend')
-rw-r--r-- | spec/frontend/sidebar/components/severity/sidebar_severity_widget_spec.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/spec/frontend/sidebar/components/severity/sidebar_severity_widget_spec.js b/spec/frontend/sidebar/components/severity/sidebar_severity_widget_spec.js index bee90d2b2b6..05fb75dc0fb 100644 --- a/spec/frontend/sidebar/components/severity/sidebar_severity_widget_spec.js +++ b/spec/frontend/sidebar/components/severity/sidebar_severity_widget_spec.js @@ -1,4 +1,4 @@ -import { GlDropdown, GlDropdownItem, GlLoadingIcon, GlTooltip, GlSprintf } from '@gitlab/ui'; +import { GlCollapsibleListbox, GlLoadingIcon, GlTooltip, GlSprintf } from '@gitlab/ui'; import Vue, { nextTick } from 'vue'; import VueApollo from 'vue-apollo'; import createMockApollo from 'helpers/mock_apollo_helper'; @@ -51,8 +51,7 @@ describe('SidebarSeverityWidget', () => { const findSeverityToken = () => wrapper.findAllComponents(SeverityToken); const findEditBtn = () => wrapper.findByTestId('edit-button'); - const findDropdown = () => wrapper.findComponent(GlDropdown); - const findCriticalSeverityDropdownItem = () => wrapper.findComponent(GlDropdownItem); // First dropdown item is critical severity + const findDropdown = () => wrapper.findComponent(GlCollapsibleListbox); const findLoadingIcon = () => wrapper.findComponent(GlLoadingIcon); const findTooltip = () => wrapper.findComponent(GlTooltip); const findCollapsedSeverity = () => wrapper.findComponent({ ref: 'severity' }); @@ -87,7 +86,7 @@ describe('SidebarSeverityWidget', () => { }); createComponent({ mutationMock }); - findCriticalSeverityDropdownItem().vm.$emit('click'); + findDropdown().vm.$emit('select', severity); expect(mutationMock).toHaveBeenCalledWith({ iid, @@ -100,7 +99,7 @@ describe('SidebarSeverityWidget', () => { const mutationMock = jest.fn().mockRejectedValue('Something went wrong'); createComponent({ mutationMock }); - findCriticalSeverityDropdownItem().vm.$emit('click'); + findDropdown().vm.$emit('select', severity); await waitForPromises(); expect(createAlert).toHaveBeenCalled(); @@ -110,7 +109,7 @@ describe('SidebarSeverityWidget', () => { const mutationMock = jest.fn().mockRejectedValue({}); createComponent({ mutationMock }); - findCriticalSeverityDropdownItem().vm.$emit('click'); + findDropdown().vm.$emit('select', severity); await nextTick(); expect(findLoadingIcon().exists()).toBe(true); |