diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 09:45:46 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 09:45:46 +0000 |
commit | a7b3560714b4d9cc4ab32dffcd1f74a284b93580 (patch) | |
tree | 7452bd5c3545c2fa67a28aa013835fb4fa071baf /spec/frontend/vue_mr_widget/components/states/commit_edit_spec.js | |
parent | ee9173579ae56a3dbfe5afe9f9410c65bb327ca7 (diff) | |
download | gitlab-ce-a7b3560714b4d9cc4ab32dffcd1f74a284b93580.tar.gz |
Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42
Diffstat (limited to 'spec/frontend/vue_mr_widget/components/states/commit_edit_spec.js')
-rw-r--r-- | spec/frontend/vue_mr_widget/components/states/commit_edit_spec.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/frontend/vue_mr_widget/components/states/commit_edit_spec.js b/spec/frontend/vue_mr_widget/components/states/commit_edit_spec.js index c30f6f1dfd1..c0add94e6ed 100644 --- a/spec/frontend/vue_mr_widget/components/states/commit_edit_spec.js +++ b/spec/frontend/vue_mr_widget/components/states/commit_edit_spec.js @@ -1,4 +1,5 @@ import { shallowMount } from '@vue/test-utils'; +import { nextTick } from 'vue'; import CommitEdit from '~/vue_merge_request_widget/components/states/commit_edit.vue'; const testCommitMessage = 'Test commit message'; @@ -46,16 +47,15 @@ describe('Commits edit component', () => { expect(findTextarea().element.value).toBe(testCommitMessage); }); - it('emits an input event and receives changed value', () => { + it('emits an input event and receives changed value', async () => { const changedCommitMessage = 'Changed commit message'; findTextarea().element.value = changedCommitMessage; findTextarea().trigger('input'); - return wrapper.vm.$nextTick().then(() => { - expect(wrapper.emitted().input[0]).toEqual([changedCommitMessage]); - expect(findTextarea().element.value).toBe(changedCommitMessage); - }); + await nextTick(); + expect(wrapper.emitted().input[0]).toEqual([changedCommitMessage]); + expect(findTextarea().element.value).toBe(changedCommitMessage); }); }); |