Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/batch_comments/components/publish_button_spec.js')
-rw-r--r--spec/frontend/batch_comments/components/publish_button_spec.js11
1 files changed, 4 insertions, 7 deletions
diff --git a/spec/frontend/batch_comments/components/publish_button_spec.js b/spec/frontend/batch_comments/components/publish_button_spec.js
index eca424814b4..9a782ec09b6 100644
--- a/spec/frontend/batch_comments/components/publish_button_spec.js
+++ b/spec/frontend/batch_comments/components/publish_button_spec.js
@@ -1,4 +1,4 @@
-import Vue from 'vue';
+import Vue, { nextTick } from 'vue';
import { mountComponentWithStore } from 'helpers/vue_mount_component_helper';
import PublishButton from '~/batch_comments/components/publish_button.vue';
import { createStore } from '~/batch_comments/stores';
@@ -29,13 +29,10 @@ describe('Batch comments publish button component', () => {
expect(vm.$store.dispatch).toHaveBeenCalledWith('batchComments/publishReview', undefined);
});
- it('sets loading when isPublishing is true', (done) => {
+ it('sets loading when isPublishing is true', async () => {
vm.$store.state.batchComments.isPublishing = true;
- vm.$nextTick(() => {
- expect(vm.$el.getAttribute('disabled')).toBe('disabled');
-
- done();
- });
+ await nextTick();
+ expect(vm.$el.getAttribute('disabled')).toBe('disabled');
});
});