diff options
Diffstat (limited to 'spec/frontend/commit/commit_pipeline_status_component_spec.js')
-rw-r--r-- | spec/frontend/commit/commit_pipeline_status_component_spec.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/frontend/commit/commit_pipeline_status_component_spec.js b/spec/frontend/commit/commit_pipeline_status_component_spec.js index 3a549e66eb7..43db6db00c1 100644 --- a/spec/frontend/commit/commit_pipeline_status_component_spec.js +++ b/spec/frontend/commit/commit_pipeline_status_component_spec.js @@ -1,6 +1,7 @@ import { GlLoadingIcon } from '@gitlab/ui'; import { shallowMount } from '@vue/test-utils'; import Visibility from 'visibilityjs'; +import { nextTick } from 'vue'; import fixture from 'test_fixtures/pipelines/pipelines.json'; import createFlash from '~/flash'; import Poll from '~/lib/utils/poll'; @@ -112,7 +113,7 @@ describe('Commit pipeline status component', () => { createComponent(); }); - it('shows the loading icon at start', () => { + it('shows the loading icon at start', async () => { createComponent(); expect(findLoader().exists()).toBe(true); @@ -120,17 +121,16 @@ describe('Commit pipeline status component', () => { data: { pipelines: [] }, }); - return wrapper.vm.$nextTick().then(() => { - expect(findLoader().exists()).toBe(false); - }); + await nextTick(); + expect(findLoader().exists()).toBe(false); }); describe('is successful', () => { - beforeEach(() => { + beforeEach(async () => { pollConfig.successCallback({ data: { pipelines: [{ details: { status: mockCiStatus } }] }, }); - return wrapper.vm.$nextTick(); + await nextTick(); }); it('does not render loader', () => { |