diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-25 18:12:32 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-25 18:12:32 +0300 |
commit | 7d8d5a3dab415672a41ab29c3bfa9581f275dc50 (patch) | |
tree | 7b9249d8ca8c12ad899b4e6d968193d58e63f458 /spec/frontend/commit | |
parent | 868c8c35fbddd439f4df76a5954e2a1caa2af3cc (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/commit')
-rw-r--r-- | spec/frontend/commit/commit_pipeline_status_component_spec.js | 12 | ||||
-rw-r--r-- | spec/frontend/commit/pipelines/pipelines_table_spec.js | 3 |
2 files changed, 8 insertions, 7 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', () => { diff --git a/spec/frontend/commit/pipelines/pipelines_table_spec.js b/spec/frontend/commit/pipelines/pipelines_table_spec.js index e209f628aa2..ac432593d2f 100644 --- a/spec/frontend/commit/pipelines/pipelines_table_spec.js +++ b/spec/frontend/commit/pipelines/pipelines_table_spec.js @@ -1,6 +1,7 @@ import { GlEmptyState, GlLoadingIcon, GlModal, GlTableLite } from '@gitlab/ui'; import { mount } from '@vue/test-utils'; import MockAdapter from 'axios-mock-adapter'; +import { nextTick } from 'vue'; import fixture from 'test_fixtures/pipelines/pipelines.json'; import { extendedWrapper } from 'helpers/vue_test_utils_helper'; import waitForPromises from 'helpers/wait_for_promises'; @@ -238,7 +239,7 @@ describe('Pipelines table in Commits and Merge requests', () => { it('on desktop, shows a security warning modal', async () => { await findRunPipelineBtn().trigger('click'); - await wrapper.vm.$nextTick(); + await nextTick(); expect(findModal()).not.toBeNull(); }); |