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-09-30 09:09:35 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-09-30 09:09:35 +0300
commitbfb305ef516d8d6c07e91024a16772070d09afe0 (patch)
treef622d935ede21c5df6bfc48a3ac81cead8e7cc30 /spec/frontend/ci_variable_list
parentc74f7b6ff54ab900d2585ff216cce78d619b183c (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/ci_variable_list')
-rw-r--r--spec/frontend/ci_variable_list/components/ci_admin_variables_spec.js14
-rw-r--r--spec/frontend/ci_variable_list/components/ci_group_variables_spec.js14
-rw-r--r--spec/frontend/ci_variable_list/components/ci_project_variables_spec.js18
-rw-r--r--spec/frontend/ci_variable_list/store/actions_spec.js12
4 files changed, 29 insertions, 29 deletions
diff --git a/spec/frontend/ci_variable_list/components/ci_admin_variables_spec.js b/spec/frontend/ci_variable_list/components/ci_admin_variables_spec.js
index 0c28a3703c4..864041141b8 100644
--- a/spec/frontend/ci_variable_list/components/ci_admin_variables_spec.js
+++ b/spec/frontend/ci_variable_list/components/ci_admin_variables_spec.js
@@ -4,7 +4,7 @@ import { GlLoadingIcon, GlTable } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils';
import createMockApollo from 'helpers/mock_apollo_helper';
import waitForPromises from 'helpers/wait_for_promises';
-import createFlash from '~/flash';
+import { createAlert } from '~/flash';
import { resolvers } from '~/ci_variable_list/graphql/settings';
import ciAdminVariables from '~/ci_variable_list/components/ci_admin_variables.vue';
@@ -92,8 +92,8 @@ describe('Ci Admin Variable list', () => {
);
});
- it('createFlash was not called', () => {
- expect(createFlash).not.toHaveBeenCalled();
+ it('createAlert was not called', () => {
+ expect(createAlert).not.toHaveBeenCalled();
});
});
@@ -104,8 +104,8 @@ describe('Ci Admin Variable list', () => {
await createComponentWithApollo();
});
- it('calls createFlash with the expected error message', () => {
- expect(createFlash).toHaveBeenCalledWith({ message: variableFetchErrorText });
+ it('calls createAlert with the expected error message', () => {
+ expect(createAlert).toHaveBeenCalledWith({ message: variableFetchErrorText });
});
});
});
@@ -153,7 +153,7 @@ describe('Ci Admin Variable list', () => {
await nextTick();
expect(wrapper.vm.$apollo.mutate).toHaveBeenCalled();
- expect(createFlash).toHaveBeenCalledWith({ message: graphQLErrorMessage });
+ expect(createAlert).toHaveBeenCalledWith({ message: graphQLErrorMessage });
},
);
@@ -171,7 +171,7 @@ describe('Ci Admin Variable list', () => {
await findCiSettings().vm.$emit(event, newVariable);
expect(wrapper.vm.$apollo.mutate).toHaveBeenCalled();
- expect(createFlash).toHaveBeenCalledWith({ message: genericMutationErrorText });
+ expect(createAlert).toHaveBeenCalledWith({ message: genericMutationErrorText });
},
);
});
diff --git a/spec/frontend/ci_variable_list/components/ci_group_variables_spec.js b/spec/frontend/ci_variable_list/components/ci_group_variables_spec.js
index 7f65bd32f40..8a48e73eb9f 100644
--- a/spec/frontend/ci_variable_list/components/ci_group_variables_spec.js
+++ b/spec/frontend/ci_variable_list/components/ci_group_variables_spec.js
@@ -4,7 +4,7 @@ import { GlLoadingIcon, GlTable } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils';
import createMockApollo from 'helpers/mock_apollo_helper';
import waitForPromises from 'helpers/wait_for_promises';
-import createFlash from '~/flash';
+import { createAlert } from '~/flash';
import { resolvers } from '~/ci_variable_list/graphql/settings';
import { convertToGraphQLId } from '~/graphql_shared/utils';
@@ -95,8 +95,8 @@ describe('Ci Group Variable list', () => {
);
});
- it('createFlash was not called', () => {
- expect(createFlash).not.toHaveBeenCalled();
+ it('createAlert was not called', () => {
+ expect(createAlert).not.toHaveBeenCalled();
});
});
@@ -107,8 +107,8 @@ describe('Ci Group Variable list', () => {
await createComponentWithApollo();
});
- it('calls createFlash with the expected error message', () => {
- expect(createFlash).toHaveBeenCalledWith({ message: variableFetchErrorText });
+ it('calls createAlert with the expected error message', () => {
+ expect(createAlert).toHaveBeenCalledWith({ message: variableFetchErrorText });
});
});
});
@@ -158,7 +158,7 @@ describe('Ci Group Variable list', () => {
await nextTick();
expect(wrapper.vm.$apollo.mutate).toHaveBeenCalled();
- expect(createFlash).toHaveBeenCalledWith({ message: graphQLErrorMessage });
+ expect(createAlert).toHaveBeenCalledWith({ message: graphQLErrorMessage });
},
);
@@ -176,7 +176,7 @@ describe('Ci Group Variable list', () => {
await findCiSettings().vm.$emit(event, newVariable);
expect(wrapper.vm.$apollo.mutate).toHaveBeenCalled();
- expect(createFlash).toHaveBeenCalledWith({ message: genericMutationErrorText });
+ expect(createAlert).toHaveBeenCalledWith({ message: genericMutationErrorText });
},
);
});
diff --git a/spec/frontend/ci_variable_list/components/ci_project_variables_spec.js b/spec/frontend/ci_variable_list/components/ci_project_variables_spec.js
index aa6cb12271a..c630278fbde 100644
--- a/spec/frontend/ci_variable_list/components/ci_project_variables_spec.js
+++ b/spec/frontend/ci_variable_list/components/ci_project_variables_spec.js
@@ -4,7 +4,7 @@ import { GlLoadingIcon, GlTable } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils';
import createMockApollo from 'helpers/mock_apollo_helper';
import waitForPromises from 'helpers/wait_for_promises';
-import createFlash from '~/flash';
+import { createAlert } from '~/flash';
import { resolvers } from '~/ci_variable_list/graphql/settings';
import { convertToGraphQLId } from '~/graphql_shared/utils';
@@ -112,8 +112,8 @@ describe('Ci Project Variable list', () => {
);
});
- it('createFlash was not called', () => {
- expect(createFlash).not.toHaveBeenCalled();
+ it('createAlert was not called', () => {
+ expect(createAlert).not.toHaveBeenCalled();
});
});
@@ -125,8 +125,8 @@ describe('Ci Project Variable list', () => {
await createComponentWithApollo();
});
- it('calls createFlash with the expected error message', () => {
- expect(createFlash).toHaveBeenCalledWith({ message: variableFetchErrorText });
+ it('calls createAlert with the expected error message', () => {
+ expect(createAlert).toHaveBeenCalledWith({ message: variableFetchErrorText });
});
});
@@ -138,8 +138,8 @@ describe('Ci Project Variable list', () => {
await createComponentWithApollo();
});
- it('calls createFlash with the expected error message', () => {
- expect(createFlash).toHaveBeenCalledWith({ message: environmentFetchErrorText });
+ it('calls createAlert with the expected error message', () => {
+ expect(createAlert).toHaveBeenCalledWith({ message: environmentFetchErrorText });
});
});
});
@@ -190,7 +190,7 @@ describe('Ci Project Variable list', () => {
await nextTick();
expect(wrapper.vm.$apollo.mutate).toHaveBeenCalled();
- expect(createFlash).toHaveBeenCalledWith({ message: graphQLErrorMessage });
+ expect(createAlert).toHaveBeenCalledWith({ message: graphQLErrorMessage });
},
);
@@ -208,7 +208,7 @@ describe('Ci Project Variable list', () => {
await findCiSettings().vm.$emit(event, newVariable);
expect(wrapper.vm.$apollo.mutate).toHaveBeenCalled();
- expect(createFlash).toHaveBeenCalledWith({ message: genericMutationErrorText });
+ expect(createAlert).toHaveBeenCalledWith({ message: genericMutationErrorText });
},
);
});
diff --git a/spec/frontend/ci_variable_list/store/actions_spec.js b/spec/frontend/ci_variable_list/store/actions_spec.js
index eb31fcd3ef4..e8c81a53a55 100644
--- a/spec/frontend/ci_variable_list/store/actions_spec.js
+++ b/spec/frontend/ci_variable_list/store/actions_spec.js
@@ -5,7 +5,7 @@ import * as actions from '~/ci_variable_list/store/actions';
import * as types from '~/ci_variable_list/store/mutation_types';
import getInitialState from '~/ci_variable_list/store/state';
import { prepareDataForDisplay, prepareEnvironments } from '~/ci_variable_list/store/utils';
-import createFlash from '~/flash';
+import { createAlert } from '~/flash';
import axios from '~/lib/utils/axios_utils';
import mockData from '../services/mock_data';
@@ -118,7 +118,7 @@ describe('CI variable list store actions', () => {
},
],
);
- expect(createFlash).toHaveBeenCalled();
+ expect(createAlert).toHaveBeenCalled();
});
});
@@ -155,7 +155,7 @@ describe('CI variable list store actions', () => {
},
],
);
- expect(createFlash).toHaveBeenCalled();
+ expect(createAlert).toHaveBeenCalled();
});
});
@@ -192,7 +192,7 @@ describe('CI variable list store actions', () => {
},
],
);
- expect(createFlash).toHaveBeenCalled();
+ expect(createAlert).toHaveBeenCalled();
});
});
@@ -219,7 +219,7 @@ describe('CI variable list store actions', () => {
mock.onGet(state.endpoint).reply(500);
await testAction(actions.fetchVariables, {}, state, [], [{ type: 'requestVariables' }]);
- expect(createFlash).toHaveBeenCalledWith({
+ expect(createAlert).toHaveBeenCalledWith({
message: 'There was an error fetching the variables.',
});
});
@@ -249,7 +249,7 @@ describe('CI variable list store actions', () => {
await testAction(actions.fetchEnvironments, {}, state, [], [{ type: 'requestEnvironments' }]);
- expect(createFlash).toHaveBeenCalledWith({
+ expect(createAlert).toHaveBeenCalledWith({
message: 'There was an error fetching the environments information.',
});
});