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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-01-25 00:14:06 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-01-25 00:14:06 +0300
commit8e73c80c681d8b02633ae25dbd642ecff4864511 (patch)
tree5d33c6c8cd78c596f80997864b3558edf430b666 /spec/frontend/pipelines/notification
parentfdc98c3e3cfdca66222044fc6aa195011d227ee2 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/pipelines/notification')
-rw-r--r--spec/frontend/pipelines/notification/deprecated_type_keyword_notification_spec.js16
1 files changed, 11 insertions, 5 deletions
diff --git a/spec/frontend/pipelines/notification/deprecated_type_keyword_notification_spec.js b/spec/frontend/pipelines/notification/deprecated_type_keyword_notification_spec.js
index 10ee55818ac..f626652a944 100644
--- a/spec/frontend/pipelines/notification/deprecated_type_keyword_notification_spec.js
+++ b/spec/frontend/pipelines/notification/deprecated_type_keyword_notification_spec.js
@@ -2,6 +2,7 @@ import VueApollo from 'vue-apollo';
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { GlAlert, GlSprintf } from '@gitlab/ui';
import createMockApollo from 'helpers/mock_apollo_helper';
+import waitForPromises from 'helpers/wait_for_promises';
import DeprecatedTypeKeywordNotification from '~/pipelines/components/notification/deprecated_type_keyword_notification.vue';
import getPipelineWarnings from '~/pipelines/graphql/queries/get_pipeline_warnings.query.graphql';
import {
@@ -77,9 +78,10 @@ describe('Deprecated keyword notification', () => {
});
describe('if there is an error in the query', () => {
- beforeEach(() => {
+ beforeEach(async () => {
mockWarnings.mockResolvedValue({ errors: ['It didnt work'] });
wrapper = createComponentWithApollo();
+ await waitForPromises();
});
it('does not display the notification', () => {
@@ -89,9 +91,10 @@ describe('Deprecated keyword notification', () => {
describe('with a valid query result', () => {
describe('if there are no deprecation warnings', () => {
- beforeEach(() => {
+ beforeEach(async () => {
mockWarnings.mockResolvedValue(mockWarningsWithoutDeprecation);
wrapper = createComponentWithApollo();
+ await waitForPromises();
});
it('does not show the notification', () => {
expect(findAlert().exists()).toBe(false);
@@ -99,9 +102,10 @@ describe('Deprecated keyword notification', () => {
});
describe('with a root type deprecation message', () => {
- beforeEach(() => {
+ beforeEach(async () => {
mockWarnings.mockResolvedValue(mockWarningsRootType);
wrapper = createComponentWithApollo();
+ await waitForPromises();
});
it('shows the notification with one item', () => {
expect(findAlert().exists()).toBe(true);
@@ -111,9 +115,10 @@ describe('Deprecated keyword notification', () => {
});
describe('with a job type deprecation message', () => {
- beforeEach(() => {
+ beforeEach(async () => {
mockWarnings.mockResolvedValue(mockWarningsType);
wrapper = createComponentWithApollo();
+ await waitForPromises();
});
it('shows the notification with one item', () => {
expect(findAlert().exists()).toBe(true);
@@ -124,9 +129,10 @@ describe('Deprecated keyword notification', () => {
});
describe('with both the root types and job type deprecation message', () => {
- beforeEach(() => {
+ beforeEach(async () => {
mockWarnings.mockResolvedValue(mockWarningsTypesAll);
wrapper = createComponentWithApollo();
+ await waitForPromises();
});
it('shows the notification with two items', () => {
expect(findAlert().exists()).toBe(true);