diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-07 15:08:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-07 15:08:06 +0300 |
commit | ebe0e306bbd6e913763bf1865b7778c001994e31 (patch) | |
tree | 49b9dc98391420a4c2a050e07bc5e6001bccdbbe /spec/frontend/packages_and_registries | |
parent | 47da68850624438b5b5b9ff9d648b1e83282c446 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/packages_and_registries')
10 files changed, 21 insertions, 21 deletions
diff --git a/spec/frontend/packages_and_registries/infrastructure_registry/components/details/store/actions_spec.js b/spec/frontend/packages_and_registries/infrastructure_registry/components/details/store/actions_spec.js index ae5742fdf6c..ea4d268d84e 100644 --- a/spec/frontend/packages_and_registries/infrastructure_registry/components/details/store/actions_spec.js +++ b/spec/frontend/packages_and_registries/infrastructure_registry/components/details/store/actions_spec.js @@ -1,6 +1,6 @@ import testAction from 'helpers/vuex_action_helper'; import Api from '~/api'; -import { createAlert, VARIANT_SUCCESS, VARIANT_WARNING } from '~/flash'; +import { createAlert, VARIANT_SUCCESS, VARIANT_WARNING } from '~/alert'; import { FETCH_PACKAGE_VERSIONS_ERROR } from '~/packages_and_registries/infrastructure_registry/details/constants'; import { fetchPackageVersions, @@ -15,7 +15,7 @@ import { } from '~/packages_and_registries/shared/constants'; import { npmPackage as packageEntity } from '../../mock_data'; -jest.mock('~/flash'); +jest.mock('~/alert'); jest.mock('~/api.js'); describe('Actions Package details store', () => { @@ -53,7 +53,7 @@ describe('Actions Package details store', () => { expect(Api.projectPackage).toHaveBeenCalledWith(packageEntity.project_id, packageEntity.id); }); - it('should create flash on API error', async () => { + it('should create alert on API error', async () => { Api.projectPackage = jest.fn().mockRejectedValue(); await testAction( @@ -83,7 +83,7 @@ describe('Actions Package details store', () => { packageEntity.id, ); }); - it('should create flash on API error', async () => { + it('should create alert on API error', async () => { Api.deleteProjectPackage = jest.fn().mockRejectedValue(); await testAction(deletePackage, undefined, { packageEntity }, [], []); @@ -118,7 +118,7 @@ describe('Actions Package details store', () => { }); }); - it('should create flash on API error', async () => { + it('should create alert on API error', async () => { Api.deleteProjectPackageFile = jest.fn().mockRejectedValue(); await testAction(deletePackageFile, fileId, { packageEntity }, [], []); expect(createAlert).toHaveBeenCalledWith({ diff --git a/spec/frontend/packages_and_registries/infrastructure_registry/components/list/components/packages_list_app_spec.js b/spec/frontend/packages_and_registries/infrastructure_registry/components/list/components/packages_list_app_spec.js index d237023d0cd..36763bdcbac 100644 --- a/spec/frontend/packages_and_registries/infrastructure_registry/components/list/components/packages_list_app_spec.js +++ b/spec/frontend/packages_and_registries/infrastructure_registry/components/list/components/packages_list_app_spec.js @@ -3,7 +3,7 @@ import { shallowMount } from '@vue/test-utils'; import Vue from 'vue'; import Vuex from 'vuex'; import setWindowLocation from 'helpers/set_window_location_helper'; -import { createAlert, VARIANT_INFO } from '~/flash'; +import { createAlert, VARIANT_INFO } from '~/alert'; import * as commonUtils from '~/lib/utils/common_utils'; import PackageListApp from '~/packages_and_registries/infrastructure_registry/list/components/packages_list_app.vue'; import { DELETE_PACKAGE_SUCCESS_MESSAGE } from '~/packages_and_registries/infrastructure_registry/list/constants'; @@ -14,7 +14,7 @@ import InfrastructureSearch from '~/packages_and_registries/infrastructure_regis import { FILTERED_SEARCH_TERM } from '~/vue_shared/components/filtered_search_bar/constants'; jest.mock('~/lib/utils/common_utils'); -jest.mock('~/flash'); +jest.mock('~/alert'); Vue.use(Vuex); @@ -217,7 +217,7 @@ describe('packages_list_app', () => { setWindowLocation(originalLocation); }); - it(`creates a flash if the query string contains ${SHOW_DELETE_SUCCESS_ALERT}`, () => { + it(`creates an alert if the query string contains ${SHOW_DELETE_SUCCESS_ALERT}`, () => { mountComponent(); expect(createAlert).toHaveBeenCalledWith({ diff --git a/spec/frontend/packages_and_registries/infrastructure_registry/components/list/stores/actions_spec.js b/spec/frontend/packages_and_registries/infrastructure_registry/components/list/stores/actions_spec.js index b5251aba40f..4f051264172 100644 --- a/spec/frontend/packages_and_registries/infrastructure_registry/components/list/stores/actions_spec.js +++ b/spec/frontend/packages_and_registries/infrastructure_registry/components/list/stores/actions_spec.js @@ -2,14 +2,14 @@ import axios from 'axios'; import MockAdapter from 'axios-mock-adapter'; import testAction from 'helpers/vuex_action_helper'; import Api from '~/api'; -import { createAlert } from '~/flash'; +import { createAlert } from '~/alert'; import { HTTP_STATUS_BAD_REQUEST, HTTP_STATUS_OK } from '~/lib/utils/http_status'; import { MISSING_DELETE_PATH_ERROR } from '~/packages_and_registries/infrastructure_registry/list/constants'; import * as actions from '~/packages_and_registries/infrastructure_registry/list/stores/actions'; import * as types from '~/packages_and_registries/infrastructure_registry/list/stores/mutation_types'; import { DELETE_PACKAGE_ERROR_MESSAGE } from '~/packages_and_registries/shared/constants'; -jest.mock('~/flash'); +jest.mock('~/alert'); jest.mock('~/api.js'); describe('Actions Package list store', () => { @@ -96,7 +96,7 @@ describe('Actions Package list store', () => { }); }); - it('should create flash on API error', async () => { + it('should create alert on API error', async () => { Api.projectPackages = jest.fn().mockRejectedValue(); await testAction( actions.requestPackagesList, @@ -198,7 +198,7 @@ describe('Actions Package list store', () => { ); }); - it('should stop the loading and call create flash on api error', async () => { + it('should stop the loading and call create alert on api error', async () => { mock.onDelete(payload._links.delete_api_path).replyOnce(HTTP_STATUS_BAD_REQUEST); await testAction( actions.requestDeletePackage, diff --git a/spec/frontend/packages_and_registries/package_registry/components/functional/delete_packages_spec.js b/spec/frontend/packages_and_registries/package_registry/components/functional/delete_packages_spec.js index 689b53fa2a4..d21a7fcbeba 100644 --- a/spec/frontend/packages_and_registries/package_registry/components/functional/delete_packages_spec.js +++ b/spec/frontend/packages_and_registries/package_registry/components/functional/delete_packages_spec.js @@ -3,7 +3,7 @@ import VueApollo from 'vue-apollo'; import waitForPromises from 'helpers/wait_for_promises'; import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; import createMockApollo from 'helpers/mock_apollo_helper'; -import { createAlert, VARIANT_SUCCESS, VARIANT_WARNING } from '~/flash'; +import { createAlert, VARIANT_SUCCESS, VARIANT_WARNING } from '~/alert'; import DeletePackages from '~/packages_and_registries/package_registry/components/functional/delete_packages.vue'; import destroyPackagesMutation from '~/packages_and_registries/package_registry/graphql/mutations/destroy_packages.mutation.graphql'; @@ -14,7 +14,7 @@ import { packagesListQuery, } from '../../mock_data'; -jest.mock('~/flash'); +jest.mock('~/alert'); describe('DeletePackages', () => { let wrapper; diff --git a/spec/frontend/packages_and_registries/package_registry/pages/details_spec.js b/spec/frontend/packages_and_registries/package_registry/pages/details_spec.js index b494965a3cb..8d0718a2c3b 100644 --- a/spec/frontend/packages_and_registries/package_registry/pages/details_spec.js +++ b/spec/frontend/packages_and_registries/package_registry/pages/details_spec.js @@ -6,7 +6,7 @@ import createMockApollo from 'helpers/mock_apollo_helper'; import { useMockLocationHelper } from 'helpers/mock_window_location_helper'; import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; import waitForPromises from 'helpers/wait_for_promises'; -import { createAlert } from '~/flash'; +import { createAlert } from '~/alert'; import AdditionalMetadata from '~/packages_and_registries/package_registry/components/details/additional_metadata.vue'; import PackagesApp from '~/packages_and_registries/package_registry/pages/details.vue'; @@ -45,7 +45,7 @@ import { pagination, } from '../mock_data'; -jest.mock('~/flash'); +jest.mock('~/alert'); useMockLocationHelper(); describe('PackagesApp', () => { diff --git a/spec/frontend/packages_and_registries/package_registry/pages/list_spec.js b/spec/frontend/packages_and_registries/package_registry/pages/list_spec.js index a2bdba87980..33f009905a0 100644 --- a/spec/frontend/packages_and_registries/package_registry/pages/list_spec.js +++ b/spec/frontend/packages_and_registries/package_registry/pages/list_spec.js @@ -21,7 +21,7 @@ import getPackagesQuery from '~/packages_and_registries/package_registry/graphql import destroyPackagesMutation from '~/packages_and_registries/package_registry/graphql/mutations/destroy_packages.mutation.graphql'; import { packagesListQuery, packageData, pagination } from '../mock_data'; -jest.mock('~/flash'); +jest.mock('~/alert'); describe('PackagesListApp', () => { let wrapper; diff --git a/spec/frontend/packages_and_registries/settings/group/components/dependency_proxy_settings_spec.js b/spec/frontend/packages_and_registries/settings/group/components/dependency_proxy_settings_spec.js index 796d89231f4..7836fe0ace9 100644 --- a/spec/frontend/packages_and_registries/settings/group/components/dependency_proxy_settings_spec.js +++ b/spec/frontend/packages_and_registries/settings/group/components/dependency_proxy_settings_spec.js @@ -28,7 +28,7 @@ import { dependencyProxyUpdateTllPolicyMutationMock, } from '../mock_data'; -jest.mock('~/flash'); +jest.mock('~/alert'); jest.mock('~/packages_and_registries/settings/group/graphql/utils/optimistic_responses'); describe('DependencyProxySettings', () => { diff --git a/spec/frontend/packages_and_registries/settings/group/components/group_settings_app_spec.js b/spec/frontend/packages_and_registries/settings/group/components/group_settings_app_spec.js index 7edc321867c..6274fbdbb0c 100644 --- a/spec/frontend/packages_and_registries/settings/group/components/group_settings_app_spec.js +++ b/spec/frontend/packages_and_registries/settings/group/components/group_settings_app_spec.js @@ -19,7 +19,7 @@ import { dependencyProxyImageTtlPolicy, } from '../mock_data'; -jest.mock('~/flash'); +jest.mock('~/alert'); describe('Group Settings App', () => { let wrapper; diff --git a/spec/frontend/packages_and_registries/settings/group/components/package_settings_spec.js b/spec/frontend/packages_and_registries/settings/group/components/package_settings_spec.js index 807f332f4d3..7966fd40907 100644 --- a/spec/frontend/packages_and_registries/settings/group/components/package_settings_spec.js +++ b/spec/frontend/packages_and_registries/settings/group/components/package_settings_spec.js @@ -23,7 +23,7 @@ import { groupPackageSettingsMutationErrorMock, } from '../mock_data'; -jest.mock('~/flash'); +jest.mock('~/alert'); jest.mock('~/packages_and_registries/settings/group/graphql/utils/optimistic_responses'); describe('Packages Settings', () => { diff --git a/spec/frontend/packages_and_registries/settings/group/components/packages_forwarding_settings_spec.js b/spec/frontend/packages_and_registries/settings/group/components/packages_forwarding_settings_spec.js index a0b257a9496..d57077b31c8 100644 --- a/spec/frontend/packages_and_registries/settings/group/components/packages_forwarding_settings_spec.js +++ b/spec/frontend/packages_and_registries/settings/group/components/packages_forwarding_settings_spec.js @@ -25,7 +25,7 @@ import { mavenProps, } from '../mock_data'; -jest.mock('~/flash'); +jest.mock('~/alert'); jest.mock('~/packages_and_registries/settings/group/graphql/utils/optimistic_responses'); describe('Packages Forwarding Settings', () => { |