diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 16:16:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 16:16:36 +0300 |
commit | 311b0269b4eb9839fa63f80c8d7a58f32b8138a0 (patch) | |
tree | 07e7870bca8aed6d61fdcc810731c50d2c40af47 /spec/frontend/feature_flags/components/configure_feature_flags_modal_spec.js | |
parent | 27909cef6c4170ed9205afa7426b8d3de47cbb0c (diff) |
Add latest changes from gitlab-org/gitlab@14-5-stable-eev14.5.0-rc42
Diffstat (limited to 'spec/frontend/feature_flags/components/configure_feature_flags_modal_spec.js')
-rw-r--r-- | spec/frontend/feature_flags/components/configure_feature_flags_modal_spec.js | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/spec/frontend/feature_flags/components/configure_feature_flags_modal_spec.js b/spec/frontend/feature_flags/components/configure_feature_flags_modal_spec.js index 27ec6a7280f..f244da228b3 100644 --- a/spec/frontend/feature_flags/components/configure_feature_flags_modal_spec.js +++ b/spec/frontend/feature_flags/components/configure_feature_flags_modal_spec.js @@ -1,5 +1,6 @@ import { GlModal, GlSprintf, GlAlert } from '@gitlab/ui'; -import { shallowMount } from '@vue/test-utils'; + +import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; import Component from '~/feature_flags/components/configure_feature_flags_modal.vue'; describe('Configure Feature Flags Modal', () => { @@ -20,7 +21,7 @@ describe('Configure Feature Flags Modal', () => { }; let wrapper; - const factory = (props = {}, { mountFn = shallowMount, ...options } = {}) => { + const factory = (props = {}, { mountFn = shallowMountExtended, ...options } = {}) => { wrapper = mountFn(Component, { provide, stubs: { GlSprintf }, @@ -140,11 +141,13 @@ describe('Configure Feature Flags Modal', () => { describe('has rotate error', () => { afterEach(() => wrapper.destroy()); - beforeEach(factory.bind(null, { hasRotateError: false })); + beforeEach(() => { + factory({ hasRotateError: true }); + }); it('should display an error', async () => { - expect(wrapper.find('.text-danger')).toExist(); - expect(wrapper.find('[name="warning"]')).toExist(); + expect(wrapper.findByTestId('rotate-error').exists()).toBe(true); + expect(wrapper.find('[name="warning"]').exists()).toBe(true); }); }); |