diff options
Diffstat (limited to 'spec/frontend/boards/components/board_new_item_spec.js')
-rw-r--r-- | spec/frontend/boards/components/board_new_item_spec.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/frontend/boards/components/board_new_item_spec.js b/spec/frontend/boards/components/board_new_item_spec.js index ef83fc925bd..86cebc8a719 100644 --- a/spec/frontend/boards/components/board_new_item_spec.js +++ b/spec/frontend/boards/components/board_new_item_spec.js @@ -1,4 +1,5 @@ import { GlForm, GlFormInput, GlButton } from '@gitlab/ui'; +import { nextTick } from 'vue'; import { mountExtended } from 'helpers/vue_test_utils_helper'; import BoardNewItem from '~/boards/components/board_new_item.vue'; @@ -44,7 +45,7 @@ describe('BoardNewItem', () => { expect(wrapper.findByTestId('create-button').props('disabled')).toBe(true); wrapper.find(GlFormInput).vm.$emit('input', 'hello'); - await wrapper.vm.$nextTick(); + await nextTick(); expect(wrapper.findByTestId('create-button').props('disabled')).toBe(false); }); @@ -54,7 +55,7 @@ describe('BoardNewItem', () => { it('disables the Create Issue button', async () => { wrapper.find(GlFormInput).vm.$emit('input', ' '); - await wrapper.vm.$nextTick(); + await nextTick(); expect(wrapper.findByTestId('create-button').props('disabled')).toBe(true); }); @@ -124,7 +125,7 @@ describe('BoardNewItem', () => { it('emits `form-cancel` event and clears title value when `reset` is triggered on gl-form', async () => { titleInput().setValue('Foo'); - await wrapper.vm.$nextTick(); + await nextTick(); expect(titleInput().element.value).toBe('Foo'); await glForm().trigger('reset'); |