diff options
Diffstat (limited to 'spec/frontend/feature_flags/components/environments_dropdown_spec.js')
-rw-r--r-- | spec/frontend/feature_flags/components/environments_dropdown_spec.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/spec/frontend/feature_flags/components/environments_dropdown_spec.js b/spec/frontend/feature_flags/components/environments_dropdown_spec.js index 917f5f5ccd3..042fccaa369 100644 --- a/spec/frontend/feature_flags/components/environments_dropdown_spec.js +++ b/spec/frontend/feature_flags/components/environments_dropdown_spec.js @@ -1,6 +1,6 @@ import MockAdapter from 'axios-mock-adapter'; import { shallowMount } from '@vue/test-utils'; -import { GlLoadingIcon, GlDeprecatedButton, GlSearchBoxByType } from '@gitlab/ui'; +import { GlLoadingIcon, GlButton, GlSearchBoxByType } from '@gitlab/ui'; import { TEST_HOST } from 'spec/test_constants'; import waitForPromises from 'helpers/wait_for_promises'; import EnvironmentsDropdown from '~/feature_flags/components/environments_dropdown.vue'; @@ -11,7 +11,7 @@ describe('Feature flags > Environments dropdown ', () => { let wrapper; let mock; const results = ['production', 'staging']; - const factory = props => { + const factory = (props) => { wrapper = shallowMount(EnvironmentsDropdown, { propsData: { ...props, @@ -99,8 +99,8 @@ describe('Feature flags > Environments dropdown ', () => { it('emits event when a suggestion is clicked', async () => { const button = wrapper - .findAll(GlDeprecatedButton) - .filter(b => b.text() === 'production') + .findAll(GlButton) + .filter((b) => b.text() === 'production') .at(0); button.vm.$emit('click'); await wrapper.vm.$nextTick(); @@ -110,7 +110,7 @@ describe('Feature flags > Environments dropdown ', () => { describe('on click clear button', () => { beforeEach(async () => { - wrapper.find(GlDeprecatedButton).vm.$emit('click'); + wrapper.find(GlButton).vm.$emit('click'); await wrapper.vm.$nextTick(); }); @@ -136,10 +136,7 @@ describe('Feature flags > Environments dropdown ', () => { }); it('emits create event', async () => { - wrapper - .findAll(GlDeprecatedButton) - .at(0) - .vm.$emit('click'); + wrapper.findAll(GlButton).at(0).vm.$emit('click'); await wrapper.vm.$nextTick(); expect(wrapper.emitted('createClicked')).toEqual([['production']]); }); |