Commit 4dc9e439 authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch 'slashmanov/remove-local-vue-ee' into 'master'

Remove localVue usage from EE tests without VueApollo

See merge request gitlab-org/gitlab!78871
parents 3317eabf 0c6a3dcb
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import SubscriptionApp from 'ee/billings/subscriptions/components/app.vue';
import initialStore from 'ee/billings/subscriptions/store';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('SubscriptionApp component', () => {
let store;
......@@ -26,7 +26,6 @@ describe('SubscriptionApp component', () => {
provide: {
...providedFields,
},
localVue,
});
};
......
import { GlIcon } from '@gitlab/ui';
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import SubscriptionTableRow from 'ee/billings/subscriptions/components/subscription_table_row.vue';
import initialStore from 'ee/billings/subscriptions/store';
import { dateInWords } from '~/lib/utils/datetime_utility';
import Popover from '~/vue_shared/components/help_popover.vue';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('subscription table row', () => {
let store;
......@@ -49,7 +49,6 @@ describe('subscription table row', () => {
billableSeatsHref,
},
store,
localVue,
});
};
......
import { GlLoadingIcon } from '@gitlab/ui';
import { createLocalVue, mount } from '@vue/test-utils';
import { mount } from '@vue/test-utils';
import Vue from 'vue';
import MockAdapter from 'axios-mock-adapter';
import Vuex from 'vuex';
import SubscriptionTable from 'ee/billings/subscriptions/components/subscription_table.vue';
......@@ -21,8 +22,7 @@ const defaultInjectedProps = {
planName: 'Gold',
};
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('SubscriptionTable component', () => {
let store;
......@@ -40,7 +40,6 @@ describe('SubscriptionTable component', () => {
wrapper = extendedWrapper(
mount(SubscriptionTable, {
store,
localVue,
provide: {
...defaultInjectedProps,
...provide,
......
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import BoardNewEpic from 'ee/boards/components/board_new_epic.vue';
......@@ -8,16 +9,13 @@ import { mockList } from 'jest/boards/mock_data';
import BoardNewItem from '~/boards/components/board_new_item.vue';
import eventHub from '~/boards/eventhub';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
const addListNewEpicSpy = jest.fn().mockResolvedValue();
const mockActions = { addListNewEpic: addListNewEpicSpy };
const createComponent = ({ actions = mockActions, getters = { isGroupBoard: () => true } } = {}) =>
shallowMount(BoardNewEpic, {
localVue,
store: new Vuex.Store({
actions,
getters,
......
import { GlToggle } from '@gitlab/ui';
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import ToggleLabels from 'ee/boards/components/toggle_labels.vue';
import LocalStorageSync from '~/vue_shared/components/local_storage_sync.vue';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('ToggleLabels component', () => {
let wrapper;
......@@ -14,7 +14,6 @@ describe('ToggleLabels component', () => {
function createComponent(state = {}) {
setShowLabels = jest.fn();
return shallowMount(ToggleLabels, {
localVue,
store: new Vuex.Store({
state: {
isShowingLabels: true,
......
import { mount, createLocalVue } from '@vue/test-utils';
import { mount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import CodequalityReportApp from 'ee/codequality_report/codequality_report.vue';
import PaginationLinks from '~/vue_shared/components/pagination_links.vue';
......@@ -6,8 +7,7 @@ import { parsedIssues } from './mock_data';
jest.mock('~/flash');
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('Codequality report app', () => {
let wrapper;
......@@ -27,7 +27,6 @@ describe('Codequality report app', () => {
});
wrapper = mountFn(CodequalityReportApp, {
localVue,
store,
provide: {
glFeatures,
......
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import diffFileMockData from 'jest/diffs/mock_data/diff_file';
import note from 'jest/notes/mock_data';
import DiffLineNoteForm from '~/diffs/components/diff_line_note_form.vue';
import NoteForm from '~/notes/components/note_form.vue';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('EE DiffLineNoteForm', () => {
let storeOptions;
......@@ -66,7 +66,6 @@ describe('EE DiffLineNoteForm', () => {
...props,
},
store,
localVue,
});
};
......
import { mount, createLocalVue } from '@vue/test-utils';
import { mount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import diffFileMockDataReadable from 'jest/diffs/mock_data/diff_file';
......@@ -10,9 +11,8 @@ const getReadableFile = () => JSON.parse(JSON.stringify(diffFileMockDataReadable
function createComponent({ withCodequality = true, provide = {} }) {
const diffFile = getReadableFile();
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
const store = new Vuex.Store({
modules: {
......@@ -39,7 +39,6 @@ function createComponent({ withCodequality = true, provide = {} }) {
const wrapper = mount(DiffViewComponent, {
store,
localVue,
propsData: {
diffFile,
diffLines: [],
......@@ -48,7 +47,6 @@ function createComponent({ withCodequality = true, provide = {} }) {
});
return {
localVue,
wrapper,
store,
};
......
import { GlLink } from '@gitlab/ui';
import { createLocalVue, mount } from '@vue/test-utils';
import { mount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import GeoNodeFormCapacities from 'ee/geo_node_form/components/geo_node_form_capacities.vue';
import {
......@@ -9,8 +10,7 @@ import {
} from 'ee/geo_node_form/constants';
import { MOCK_NODE } from '../mock_data';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('GeoNodeFormCapacities', () => {
let wrapper;
......@@ -36,7 +36,6 @@ describe('GeoNodeFormCapacities', () => {
});
wrapper = mount(GeoNodeFormCapacities, {
localVue,
store,
propsData: {
...defaultProps,
......
import { createLocalVue, mount } from '@vue/test-utils';
import { mount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import GeoNodeFormCore from 'ee/geo_node_form/components/geo_node_form_core.vue';
import {
......@@ -8,8 +9,7 @@ import {
} from 'ee/geo_node_form/constants';
import { MOCK_NODE, STRING_OVER_255 } from '../mock_data';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('GeoNodeFormCore', () => {
let wrapper;
......@@ -35,7 +35,6 @@ describe('GeoNodeFormCore', () => {
});
wrapper = mount(GeoNodeFormCore, {
localVue,
store,
propsData: {
...defaultProps,
......
import { GlIcon, GlSearchBoxByType, GlDropdown } from '@gitlab/ui';
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import GeoNodeFormNamespaces from 'ee/geo_node_form/components/geo_node_form_namespaces.vue';
import { MOCK_SYNC_NAMESPACES } from '../mock_data';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
jest.mock('~/flash');
......@@ -32,7 +32,6 @@ describe('GeoNodeFormNamespaces', () => {
});
wrapper = shallowMount(GeoNodeFormNamespaces, {
localVue,
store: fakeStore,
propsData: {
...defaultProps,
......
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import GeoNodeForm from 'ee/geo_node_form/components/geo_node_form.vue';
import GeoNodeFormCapacities from 'ee/geo_node_form/components/geo_node_form_capacities.vue';
......@@ -13,8 +14,7 @@ import {
MOCK_NODES_PATH,
} from '../mock_data';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
jest.mock('~/helpers/help_page_helper');
jest.mock('~/lib/utils/url_utility', () => ({
......
import { GlLoadingIcon } from '@gitlab/ui';
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import GeoReplicableApp from 'ee/geo_replicable/components/app.vue';
import GeoReplicable from 'ee/geo_replicable/components/geo_replicable.vue';
......@@ -14,8 +15,7 @@ import {
MOCK_GRAPHQL_REGISTRY,
} from '../mock_data';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('GeoReplicableApp', () => {
let wrapper;
......@@ -33,7 +33,6 @@ describe('GeoReplicableApp', () => {
const createComponent = () => {
wrapper = shallowMount(GeoReplicableApp, {
localVue,
store,
propsData,
});
......
import { getByRole } from '@testing-library/dom';
import { createLocalVue, mount } from '@vue/test-utils';
import { mount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import GeoReplicableEmptyState from 'ee/geo_replicable/components/geo_replicable_empty_state.vue';
import createStore from 'ee/geo_replicable/store';
......@@ -9,8 +10,7 @@ import {
MOCK_REPLICABLE_TYPE,
} from '../mock_data';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('GeoReplicableEmptyState', () => {
let wrapper;
......@@ -22,7 +22,6 @@ describe('GeoReplicableEmptyState', () => {
const createComponent = () => {
wrapper = mount(GeoReplicableEmptyState, {
localVue,
store: createStore({ replicableType: MOCK_REPLICABLE_TYPE, graphqlFieldName: null }),
propsData,
});
......
import { GlLink, GlButton } from '@gitlab/ui';
import { createLocalVue, mount } from '@vue/test-utils';
import { mount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import GeoReplicableItem from 'ee/geo_replicable/components/geo_replicable_item.vue';
import { ACTION_TYPES } from 'ee/geo_replicable/constants';
import { getStoreConfig } from 'ee/geo_replicable/store';
import { MOCK_BASIC_FETCH_DATA_MAP, MOCK_REPLICABLE_TYPE } from '../mock_data';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('GeoReplicableItem', () => {
let wrapper;
......@@ -33,7 +33,6 @@ describe('GeoReplicableItem', () => {
});
wrapper = mount(GeoReplicableItem, {
localVue,
store: fakeStore,
propsData: {
...defaultProps,
......
import { GlPagination } from '@gitlab/ui';
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import GeoReplicable from 'ee/geo_replicable/components/geo_replicable.vue';
import GeoReplicableItem from 'ee/geo_replicable/components/geo_replicable_item.vue';
......@@ -14,8 +15,7 @@ import {
MOCK_GRAPHQL_REGISTRY,
} from '../mock_data';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('GeoReplicable', () => {
let wrapper;
......@@ -28,7 +28,6 @@ describe('GeoReplicable', () => {
const createComponent = () => {
wrapper = shallowMount(GeoReplicable, {
localVue,
store,
});
};
......
import { GlIcon } from '@gitlab/ui';
import { createLocalVue, mount } from '@vue/test-utils';
import { mount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import GeoReplicableStatus from 'ee/geo_replicable/components/geo_replicable_status.vue';
import {
......@@ -11,8 +12,7 @@ import {
import createStore from 'ee/geo_replicable/store';
import { MOCK_REPLICABLE_TYPE } from '../mock_data';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('GeoReplicableStatus', () => {
let wrapper;
......@@ -23,7 +23,6 @@ describe('GeoReplicableStatus', () => {
const createComponent = () => {
wrapper = mount(GeoReplicableStatus, {
localVue,
store: createStore({ replicableType: MOCK_REPLICABLE_TYPE, graphqlFieldName: null }),
propsData,
});
......
import { createLocalVue, mount } from '@vue/test-utils';
import { mount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import GeoReplicableTimeAgo from 'ee/geo_replicable/components/geo_replicable_time_ago.vue';
import createStore from 'ee/geo_replicable/store';
......@@ -6,8 +7,7 @@ import { useFakeDate } from 'helpers/fake_date';
import TimeAgo from '~/vue_shared/components/time_ago_tooltip.vue';
import { MOCK_REPLICABLE_TYPE } from '../mock_data';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('GeoReplicableTimeAgo', () => {
let wrapper;
......@@ -20,7 +20,6 @@ describe('GeoReplicableTimeAgo', () => {
const createComponent = () => {
wrapper = mount(GeoReplicableTimeAgo, {
localVue,
store: createStore({ replicableType: MOCK_REPLICABLE_TYPE, graphqlFieldName: null }),
propsData,
});
......
import { GlLoadingIcon } from '@gitlab/ui';
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import GeoSettingsApp from 'ee/geo_settings/components/app.vue';
......@@ -7,8 +8,7 @@ import GeoSettingsForm from 'ee/geo_settings/components/geo_settings_form.vue';
import initStore from 'ee/geo_settings/store';
import * as types from 'ee/geo_settings/store/mutation_types';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('GeoSettingsApp', () => {
let wrapper;
......
import { createLocalVue, mount } from '@vue/test-utils';
import { mount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import GeoSettingsForm from 'ee/geo_settings/components/geo_settings_form.vue';
import initStore from 'ee/geo_settings/store';
......@@ -6,8 +7,7 @@ import * as types from 'ee/geo_settings/store/mutation_types';
import { visitUrl } from '~/lib/utils/url_utility';
import { STRING_OVER_255, MOCK_NODES_PATH } from '../mock_data';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
jest.mock('~/lib/utils/url_utility', () => ({
visitUrl: jest.fn().mockName('visitUrlMock'),
......
import { GlEmptyState } from '@gitlab/ui';
import { GlColumnChart } from '@gitlab/ui/dist/charts';
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import InsightsChart from 'ee/insights/components/insights_chart.vue';
......@@ -9,8 +10,7 @@ import { createStore } from 'ee/insights/stores';
import { chartInfo, pageInfo, pageInfoNoCharts, barChartData } from 'ee_jest/insights/mock_data';
import { TEST_HOST } from 'helpers/test_constants';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('Insights page component', () => {
let store;
......@@ -18,7 +18,6 @@ describe('Insights page component', () => {
const createComponent = (props = {}) => {
wrapper = shallowMount(InsightsPage, {
localVue,
store,
propsData: {
queryEndpoint: `${TEST_HOST}/query`,
......
import { GlAlert, GlDropdown, GlDropdownItem, GlEmptyState } from '@gitlab/ui';
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import axios from 'axios';
import MockAdapter from 'axios-mock-adapter';
import Vuex from 'vuex';
......@@ -8,8 +9,7 @@ import { createStore } from 'ee/insights/stores';
import { pageInfo } from 'ee_jest/insights/mock_data';
import { TEST_HOST } from 'helpers/test_constants';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
const defaultMocks = {
$route: {
params: {},
......@@ -23,7 +23,6 @@ const defaultMocks = {
const createComponent = (store, options = {}) => {
const { mocks = defaultMocks } = options;
return shallowMount(Insights, {
localVue,
store,
propsData: {
endpoint: TEST_HOST,
......
import { GlLink, GlModal } from '@gitlab/ui';
import { createLocalVue, shallowMount, mount } from '@vue/test-utils';
import { shallowMount, mount } from '@vue/test-utils';
import Vue from 'vue';
import merge from 'lodash/merge';
import Vuex from 'vuex';
import MetricsImage from 'ee/issues/show/components/incidents/metrics_image.vue';
......@@ -14,8 +15,7 @@ const defaultProps = {
const mockEvent = { preventDefault: jest.fn() };
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('Metrics upload item', () => {
let wrapper;
......@@ -28,7 +28,6 @@ describe('Metrics upload item', () => {
MetricsImage,
merge(
{
localVue,
store,
propsData: {
...defaultProps,
......
import { GlFormInput, GlModal } from '@gitlab/ui';
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import merge from 'lodash/merge';
import Vuex from 'vuex';
import MetricsImage from 'ee/issues/show/components/incidents/metrics_image.vue';
......@@ -16,8 +17,7 @@ jest.mock('ee/issues/show/components/incidents/service', () => ({
const mockEvent = { preventDefault: jest.fn() };
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('Metrics tab', () => {
let wrapper;
......@@ -30,7 +30,6 @@ describe('Metrics tab', () => {
MetricsTab,
merge(
{
localVue,
store,
provide: {
canUpdate: true,
......
import { createLocalVue } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import {
getMetricImages,
......@@ -25,8 +25,7 @@ const defaultState = {
projectId: '2',
};
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('Metrics tab store actions', () => {
let store;
......
import { GlEmptyState, GlLoadingIcon } from '@gitlab/ui';
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import axios from 'axios';
import MockAdapter from 'axios-mock-adapter';
import Vuex from 'vuex';
......@@ -15,8 +16,7 @@ jest.mock('ee/issues_analytics/filtered_search_issues_analytics', () =>
})),
);
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('Issue Analytics component', () => {
let wrapper;
......@@ -42,7 +42,6 @@ describe('Issue Analytics component', () => {
};
return shallowMount(IssuesAnalytics, {
localVue,
propsData,
stubs: {
GlColumnChart: true,
......
import { GlToggle, GlFormTextarea, GlForm, GlLoadingIcon } from '@gitlab/ui';
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import MaintenanceModeSettingsApp from 'ee/maintenance_mode_settings/components/app.vue';
import { MOCK_BASIC_SETTINGS_DATA } from '../mock_data';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('MaintenanceModeSettingsApp', () => {
let wrapper;
......@@ -26,7 +26,6 @@ describe('MaintenanceModeSettingsApp', () => {
});
wrapper = shallowMount(MaintenanceModeSettingsApp, {
localVue,
store,
});
};
......
import { GlDropdownItem } from '@gitlab/ui';
import { mount, createLocalVue } from '@vue/test-utils';
import { mount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import LdapDropdownItem from 'ee/members/components/ldap/ldap_dropdown_item.vue';
import waitForPromises from 'helpers/wait_for_promises';
import { MEMBER_TYPES } from '~/members/constants';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('LdapDropdownItem', () => {
let wrapper;
......@@ -36,7 +36,6 @@ describe('LdapDropdownItem', () => {
memberId: 1,
...propsData,
},
localVue,
store: createStore(),
provide: {
namespace: MEMBER_TYPES.user,
......
import { GlButton } from '@gitlab/ui';
import { mount, createLocalVue } from '@vue/test-utils';
import { mount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import LdapOverrideButton from 'ee/members/components/ldap/ldap_override_button.vue';
import { createMockDirective, getBinding } from 'helpers/vue_mock_directive';
import { member } from 'jest/members/mock_data';
import { MEMBER_TYPES } from '~/members/constants';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('LdapOverrideButton', () => {
let wrapper;
......@@ -30,7 +30,6 @@ describe('LdapOverrideButton', () => {
const createComponent = (propsData = {}) => {
wrapper = mount(LdapOverrideButton, {
localVue,
propsData: {
member,
...propsData,
......
import { GlModal } from '@gitlab/ui';
import { within } from '@testing-library/dom';
import { mount, createLocalVue, createWrapper } from '@vue/test-utils';
import { nextTick } from 'vue';
import { mount, createWrapper } from '@vue/test-utils';
import Vue, { nextTick } from 'vue';
import Vuex from 'vuex';
import LdapOverrideConfirmationModal from 'ee/members/components/ldap/ldap_override_confirmation_modal.vue';
import { LDAP_OVERRIDE_CONFIRMATION_MODAL_ID } from 'ee/members/constants';
......@@ -9,8 +9,7 @@ import waitForPromises from 'helpers/wait_for_promises';
import { member } from 'jest/members/mock_data';
import { MEMBER_TYPES } from '~/members/constants';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('LdapOverrideConfirmationModal', () => {
let wrapper;
......@@ -48,7 +47,6 @@ describe('LdapOverrideConfirmationModal', () => {
const createComponent = (state) => {
wrapper = mount(LdapOverrideConfirmationModal, {
localVue,
store: createStore(state),
provide: {
namespace: MEMBER_TYPES.user,
......
import { mount, createLocalVue } from '@vue/test-utils';
import { mount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import MembersTableCell from 'ee/members/components/table/members_table_cell.vue';
import { member as memberMock, directMember } from 'jest/members/mock_data';
......@@ -28,9 +29,8 @@ describe('MemberTableCell', () => {
},
};
const localVue = createLocalVue();
localVue.use(Vuex);
localVue.component('WrappedComponent', WrappedComponent);
Vue.use(Vuex);
Vue.component('WrappedComponent', WrappedComponent);
const createStore = (state = {}) => {
return new Vuex.Store({
......@@ -42,7 +42,6 @@ describe('MemberTableCell', () => {
const createComponent = (propsData, state = {}) => {
wrapper = mount(MembersTableCell, {
localVue,
propsData,
store: createStore(state),
provide: {
......
import { within } from '@testing-library/dom';
import { mount, createLocalVue, createWrapper } from '@vue/test-utils';
import { mount, createWrapper } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import { member as memberMock, directMember, members } from 'jest/members/mock_data';
import MembersTable from '~/members/components/table/members_table.vue';
import { MEMBER_TYPES } from '~/members/constants';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('MemberList', () => {
let wrapper;
......@@ -33,7 +33,6 @@ describe('MemberList', () => {
const createComponent = (state) => {
wrapper = mount(MembersTable, {
localVue,
store: createStore(state),
provide: {
sourceId: 1,
......
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import GitlabTeamMemberBadge from 'ee/vue_shared/components/user_avatar/badges/gitlab_team_member_badge.vue';
import NoteHeader from '~/notes/components/note_header.vue';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('NoteHeader component', () => {
let wrapper;
......@@ -20,7 +20,6 @@ describe('NoteHeader component', () => {
const createComponent = (props) => {
wrapper = shallowMount(NoteHeader, {
localVue,
store: new Vuex.Store(),
propsData: { ...props },
});
......
import { GlEmptyState } from '@gitlab/ui';
import { mount, createLocalVue } from '@vue/test-utils';
import { mount } from '@vue/test-utils';
import Vue from 'vue';
import MockAdapter from 'axios-mock-adapter';
import Vuex from 'vuex';
import Dashboard from 'ee/operations/components/dashboard/dashboard.vue';
......@@ -9,8 +10,7 @@ import waitForPromises from 'helpers/wait_for_promises';
import axios from '~/lib/utils/axios_utils';
import { mockProjectData, mockText } from '../../mock_data';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('dashboard component', () => {
const mockAddEndpoint = 'mock-addPath';
......@@ -25,7 +25,6 @@ describe('dashboard component', () => {
const mountComponent = ({ stubs = {}, state = {} } = {}) =>
mount(Dashboard, {
store,
localVue,
propsData: {
addPath: mockAddEndpoint,
listPath: mockListEndpoint,
......
import { GlSprintf, GlLink } from '@gitlab/ui';
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import Project from 'ee/operations/components/dashboard/project.vue';
import ProjectHeader from 'ee/operations/components/dashboard/project_header.vue';
......@@ -8,8 +9,7 @@ import store from 'ee/vue_shared/dashboards/store';
import Commit from '~/vue_shared/components/commit.vue';
import { mockOneProject } from '../../mock_data';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('project component', () => {
let wrapper;
......@@ -17,7 +17,6 @@ describe('project component', () => {
const createComponent = (props = {}) => {
wrapper = shallowMount(Project, {
store,
localVue,
propsData: {
project: mockOneProject,
...props,
......
import { GlTable, GlDeprecatedSkeletonLoading as GlSkeletonLoading } from '@gitlab/ui';
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import MembersApp from 'ee/pages/groups/saml_providers/saml_members/index.vue';
import createInitialState from 'ee/pages/groups/saml_providers/saml_members/store/state';
import TablePagination from '~/vue_shared/components/pagination/table_pagination.vue';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('SAML providers members app', () => {
let wrapper;
......@@ -25,7 +25,6 @@ describe('SAML providers members app', () => {
wrapper = shallowMount(MembersApp, {
store,
localVue,
});
};
......
import { GlFormInput, GlButton, GlDropdownItem } from '@gitlab/ui';
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import axios from 'axios';
import MockAdapter from 'axios-mock-adapter';
import Vuex from 'vuex';
......@@ -9,8 +10,7 @@ import createDefaultStore from 'ee/related_items_tree/store';
import { mockInitialConfig, mockParentItem } from '../mock_data';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
const createComponent = (isSubmitting = false) => {
const store = createDefaultStore();
......@@ -19,7 +19,6 @@ const createComponent = (isSubmitting = false) => {
store.dispatch('setInitialParentItem', mockParentItem);
return shallowMount(CreateEpicForm, {
localVue,
store,
propsData: {
isSubmitting,
......
......@@ -8,7 +8,8 @@ import {
GlDropdownDivider,
GlDropdownSectionHeader,
} from '@gitlab/ui';
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import mockProjects from 'test_fixtures_static/projects.json';
......@@ -23,8 +24,7 @@ import {
mockMixedFrequentlyUsedProjects,
} from '../mock_data';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
const createComponent = () => {
const store = createDefaultStore();
......@@ -33,7 +33,6 @@ const createComponent = () => {
store.dispatch('setInitialParentItem', mockParentItem);
return shallowMount(CreateIssueForm, {
localVue,
store,
});
};
......
import { GlLoadingIcon } from '@gitlab/ui';
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import AxiosMockAdapter from 'axios-mock-adapter';
import Vuex from 'vuex';
......@@ -15,8 +16,7 @@ import { issuableTypesMap } from '~/related_issues/constants';
import { mockInitialConfig, mockParentItem, mockEpics, mockIssues } from '../mock_data';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
const createComponent = () => {
const store = createDefaultStore();
......@@ -29,7 +29,6 @@ const createComponent = () => {
});
return shallowMount(RelatedItemsTreeApp, {
localVue,
store,
stubs: {
SlotSwitch,
......
import { GlTooltip, GlIcon } from '@gitlab/ui';
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import EpicHealthStatus from 'ee/related_items_tree/components/epic_health_status.vue';
......@@ -12,8 +13,7 @@ import * as epicUtils from 'ee/related_items_tree/utils/epic_utils';
import { issuableTypesMap } from '~/related_issues/constants';
import { mockInitialConfig, mockParentItem, mockQueryResponse } from '../mock_data';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
const createComponent = ({ slots } = {}) => {
const store = createDefaultStore();
......@@ -37,7 +37,6 @@ const createComponent = ({ slots } = {}) => {
store.dispatch('setChildrenCount', mockParentItem.descendantCounts);
return shallowMount(RelatedItemsTreeHeader, {
localVue,
store,
slots,
});
......
import { GlModal } from '@gitlab/ui';
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import TreeItemRemoveModal from 'ee/related_items_tree/components/tree_item_remove_modal.vue';
......@@ -11,8 +12,7 @@ import { PathIdSeparator } from '~/related_issues/constants';
import { mockParentItem, mockQueryResponse, mockIssue1 } from '../mock_data';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
const mockItem = {
...mockIssue1,
......@@ -41,7 +41,6 @@ const createComponent = (parentItem = mockParentItem, item = mockItem) => {
});
return shallowMount(TreeItemRemoveModal, {
localVue,
store,
});
};
......
import { GlButton, GlLoadingIcon, GlIcon } from '@gitlab/ui';
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import TreeItem from 'ee/related_items_tree/components/tree_item.vue';
......@@ -15,8 +16,7 @@ import { mockParentItem, mockQueryResponse, mockEpic1 } from '../mock_data';
const mockItem = { ...mockEpic1, type: ChildType.Epic, pathIdSeparator: PathIdSeparator.Epic };
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
const createComponent = (parentItem = mockParentItem, item = mockItem) => {
const store = createDefaultStore();
......@@ -39,7 +39,6 @@ const createComponent = (parentItem = mockParentItem, item = mockItem) => {
});
return shallowMount(TreeItem, {
localVue,
store,
stubs: {
'tree-root': TreeRoot,
......
import { GlButton } from '@gitlab/ui';
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import Draggable from 'vuedraggable';
import Vuex from 'vuex';
......@@ -19,8 +20,7 @@ import {
const { epic } = mockQueryResponse.data.group;
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
const createComponent = ({
parentItem = mockParentItem,
......@@ -48,7 +48,6 @@ const createComponent = ({
});
return shallowMount(TreeRoot, {
localVue,
store,
stubs: {
'tree-item': true,
......
import { mount, createLocalVue } from '@vue/test-utils';
import { mount } from '@vue/test-utils';
import GroupedBrowserPerformanceReportsApp from 'ee/reports/browser_performance_report/grouped_browser_performance_reports_app.vue';
import Api from '~/api';
jest.mock('~/api.js');
const localVue = createLocalVue();
describe('Grouped test reports app', () => {
let wrapper;
const mountComponent = () => {
wrapper = mount(GroupedBrowserPerformanceReportsApp, {
localVue,
propsData: {
status: '',
loadingText: '',
......
import { mount, createLocalVue } from '@vue/test-utils';
import { mount } from '@vue/test-utils';
import GroupedLoadPerformanceReportsApp from 'ee/reports/load_performance_report/grouped_load_performance_reports_app.vue';
import Api from '~/api';
jest.mock('~/api.js');
const localVue = createLocalVue();
describe('Grouped load performance reports app', () => {
let wrapper;
const mountComponent = () => {
wrapper = mount(GroupedLoadPerformanceReportsApp, {
localVue,
propsData: {
status: '',
loadingText: '',
......
import { GlIntersectionObserver, GlLoadingIcon } from '@gitlab/ui';
import { createLocalVue } from '@vue/test-utils';
import EpicItem from 'ee/roadmap/components/epic_item.vue';
import EpicsListSection from 'ee/roadmap/components/epics_list_section.vue';
import {
......@@ -56,8 +55,6 @@ const mockEpics = store.state.epics;
store.state.childrenEpics[mockEpics[0].id] = [mockFormattedChildEpic1, mockFormattedChildEpic2];
const localVue = createLocalVue();
const createComponent = ({
epics = mockEpics,
timeframe = mockTimeframeMonths,
......@@ -66,7 +63,6 @@ const createComponent = ({
hasFiltersApplied = false,
} = {}) => {
return shallowMountExtended(EpicsListSection, {
localVue,
store,
stubs: {
EpicItem: false,
......
import { GlIcon, GlButton } from '@gitlab/ui';
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import MilestoneTimeline from 'ee/roadmap/components/milestone_timeline.vue';
import milestonesListSectionComponent from 'ee/roadmap/components/milestones_list_section.vue';
import {
......@@ -56,9 +56,7 @@ describe('MilestonesListSectionComponent', () => {
};
const createWrapper = (props = {}) => {
const localVue = createLocalVue();
wrapper = shallowMount(milestonesListSectionComponent, {
localVue,
store,
stubs: {
MilestoneTimeline: false,
......
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import EpicsListSection from 'ee/roadmap/components/epics_list_section.vue';
......@@ -26,8 +27,7 @@ const mockTimeframeMonths = getTimeframeForRangeType({
});
describe('RoadmapShell', () => {
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
let store;
let wrapper;
......@@ -51,7 +51,6 @@ describe('RoadmapShell', () => {
el,
) => {
wrapper = shallowMount(RoadmapShell, {
localVue,
store,
attachTo: el,
propsData: {
......
import { GlSprintf } from '@gitlab/ui';
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { nextTick } from 'vue';
import { shallowMount } from '@vue/test-utils';
import Vue, { nextTick } from 'vue';
import Vuex from 'vuex';
import RemoveBillableMemberModal from 'ee/seat_usage/components/remove_billable_member_modal.vue';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('RemoveBillableMemberModal', () => {
let wrapper;
......@@ -32,7 +31,6 @@ describe('RemoveBillableMemberModal', () => {
stubs: {
GlSprintf,
},
localVue,
});
};
......
import { GlTable } from '@gitlab/ui';
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import Api from 'ee/api';
import SubscriptionSeatDetails from 'ee/seat_usage/components/subscription_seat_details.vue';
......@@ -9,8 +10,7 @@ import initState from 'ee/seat_usage/store/state';
import { mockMemberDetails } from 'ee_jest/seat_usage/mock_data';
import { stubComponent } from 'helpers/stub_component';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('SubscriptionSeatDetails', () => {
let wrapper;
......@@ -26,7 +26,6 @@ describe('SubscriptionSeatDetails', () => {
seatMemberId: 1,
},
store: new Vuex.Store({ ...store, actions }),
localVue,
stubs: {
GlTable: stubComponent(GlTable),
},
......
......@@ -8,7 +8,8 @@ import {
GlBadge,
GlModal,
} from '@gitlab/ui';
import { mount, shallowMount, createLocalVue } from '@vue/test-utils';
import { mount, shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import SubscriptionSeats from 'ee/seat_usage/components/subscription_seats.vue';
import { CANNOT_REMOVE_BILLABLE_MEMBER_MODAL_CONTENT } from 'ee/seat_usage/constants';
......@@ -16,8 +17,7 @@ import { mockDataSeats, mockTableItems } from 'ee_jest/seat_usage/mock_data';
import { extendedWrapper } from 'helpers/vue_test_utils_helper';
import FilterSortContainerRoot from '~/vue_shared/components/filtered_search_bar/filtered_search_bar_root.vue';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
const actionSpies = {
fetchBillableMembersList: jest.fn(),
......@@ -64,7 +64,6 @@ describe('Subscription Seats', () => {
return extendedWrapper(
mountFn(SubscriptionSeats, {
store: fakeStore({ initialState, initialGetters }),
localVue,
}),
);
};
......
import { GlToggle } from '@gitlab/ui';
import { shallowMount, mount, createLocalVue } from '@vue/test-utils';
import { shallowMount, mount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import Filters from 'ee/security_dashboard/components/pipeline/filters.vue';
import { simpleScannerFilter } from 'ee/security_dashboard/helpers';
......@@ -7,8 +8,7 @@ import createStore from 'ee/security_dashboard/store';
import state from 'ee/security_dashboard/store/modules/filters/state';
import { extendedWrapper } from 'helpers/vue_test_utils_helper';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('Filter component', () => {
let wrapper;
......@@ -17,7 +17,6 @@ describe('Filter component', () => {
const createWrapper = ({ mountFn = shallowMount } = {}) => {
wrapper = extendedWrapper(
mountFn(Filters, {
localVue,
store,
slots: {
buttons: '<div class="button-slot"></div>',
......
import { GlFormCheckbox } from '@gitlab/ui';
import { mount, shallowMount, createLocalVue } from '@vue/test-utils';
import { mount, shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import SecurityDashboardTableRow from 'ee/security_dashboard/components/pipeline/security_dashboard_table_row.vue';
import VulnerabilityActionButtons from 'ee/security_dashboard/components/pipeline/vulnerability_action_buttons.vue';
......@@ -11,8 +12,7 @@ import { trimText } from 'helpers/text_helper';
import { BV_SHOW_MODAL } from '~/lib/utils/constants';
import mockDataVulnerabilities from '../../store/modules/vulnerabilities/data/mock_data_vulnerabilities';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('Security Dashboard Table Row', () => {
let wrapper;
......@@ -20,7 +20,6 @@ describe('Security Dashboard Table Row', () => {
const createComponent = (mountFunc, { props = {} } = {}) => {
wrapper = mountFunc(SecurityDashboardTableRow, {
localVue,
store,
propsData: {
...props,
......
import { GlEmptyState, GlFormCheckbox } from '@gitlab/ui';
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import SecurityDashboardTable from 'ee/security_dashboard/components/pipeline/security_dashboard_table.vue';
import SecurityDashboardTableRow from 'ee/security_dashboard/components/pipeline/security_dashboard_table_row.vue';
......@@ -12,8 +13,7 @@ import {
import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
import mockDataVulnerabilities from '../../store/modules/vulnerabilities/data/mock_data_vulnerabilities';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
describe('Security Dashboard Table', () => {
const vulnerabilitiesEndpoint = '/vulnerabilitiesEndpoint.json';
......@@ -23,7 +23,6 @@ describe('Security Dashboard Table', () => {
beforeEach(() => {
store = createStore();
wrapper = shallowMountExtended(SecurityDashboardTable, {
localVue,
store,
});
store.state.vulnerabilities.vulnerabilitiesEndpoint = vulnerabilitiesEndpoint;
......@@ -113,7 +112,6 @@ describe('Security Dashboard Table', () => {
describe('with a custom empty state', () => {
beforeEach(() => {
wrapper = shallowMount(SecurityDashboardTable, {
localVue,
store,
slots: {
'empty-state': '<div class="customEmptyState">Hello World</div>',
......
import { GlButton, GlFormSelect } from '@gitlab/ui';
import { mount, createLocalVue } from '@vue/test-utils';
import { mount } from '@vue/test-utils';
import Vue from 'vue';
import axios from 'axios';
import MockAdapter from 'axios-mock-adapter';
import Vuex from 'vuex';
......@@ -13,8 +14,7 @@ import waitForPromises from 'helpers/wait_for_promises';
import httpStatus from '~/lib/utils/http_status';
import mockDataVulnerabilities from '../../store/modules/vulnerabilities/data/mock_data_vulnerabilities';
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
jest.mock('~/vue_shared/plugins/global_toast');
......@@ -26,7 +26,6 @@ describe('Selection Summary', () => {
const createComponent = () => {
store = createStore();
wrapper = mount(SelectionSummary, {
localVue,
store,
});
......
import { GlDropdownItem, GlDropdownDivider } from '@gitlab/ui';
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import { sampleSize, cloneDeep } from 'lodash';
import VueRouter from 'vue-router';
import FilterItem from 'ee/security_dashboard/components/shared/filters/filter_item.vue';
......@@ -7,8 +8,7 @@ import ScannerFilter from 'ee/security_dashboard/components/shared/filters/scann
import { DEFAULT_SCANNER, SCANNER_ID_PREFIX } from 'ee/security_dashboard/constants';
import { vendorScannerFilterNoClusterImage } from 'ee/security_dashboard/helpers';
const localVue = createLocalVue();
localVue.use(VueRouter);
Vue.use(VueRouter);
const router = new VueRouter();
const createScannerConfig = (vendor, reportType, id) => ({
......@@ -44,7 +44,6 @@ describe('Scanner Filter component', () => {
filter = cloneDeep(vendorScannerFilterNoClusterImage);
wrapper = shallowMount(ScannerFilter, {
localVue,
router,
propsData: { filter },
provide: { scanners },
......
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import VueRouter from 'vue-router';
import SimpleFilter from 'ee/security_dashboard/components/shared/filters/simple_filter.vue';
const localVue = createLocalVue();
localVue.use(VueRouter);
Vue.use(VueRouter);
const router = new VueRouter();
const generateOptions = (length) =>
......@@ -24,7 +24,6 @@ describe('Simple Filter component', () => {
const createWrapper = (filterOptions, props) => {
wrapper = shallowMount(SimpleFilter, {
localVue,
router,
propsData: { filter: { ...filter, ...filterOptions }, ...props },
});
......
import { createLocalVue } from '@vue/test-utils';
import { GlTabs, GlTab, GlBadge } from '@gitlab/ui';
import { nextTick } from 'vue';
import Vue, { nextTick } from 'vue';
import VueRouter from 'vue-router';
import VulnerabilityReportTabs from 'ee/security_dashboard/components/shared/vulnerability_report/vulnerability_report_tabs.vue';
import VulnerabilityReport from 'ee/security_dashboard/components/shared/vulnerability_report/vulnerability_report.vue';
......@@ -11,8 +10,7 @@ import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
import { DASHBOARD_TYPES } from 'ee/security_dashboard/store/constants';
import { REPORT_TAB } from 'ee/security_dashboard/components/shared/vulnerability_report/constants';
const localVue = createLocalVue();
localVue.use(VueRouter);
Vue.use(VueRouter);
const router = new VueRouter();
const countsDevelopment = [
......@@ -37,7 +35,6 @@ describe('Vulnerability report tabs component', () => {
const createWrapper = ({ showProjectFilter = false } = {}) => {
wrapper = shallowMountExtended(VulnerabilityReportTabs, {
localVue,
router,
provide: {
fullPath: '/full/path',
......
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Cookies from 'js-cookie';
import { PortalTarget } from 'portal-vue';
import { nextTick } from 'vue';
......@@ -36,10 +36,7 @@ describe('Vulnerability Report', () => {
const findHeader = () => wrapper.find('h2');
const createWrapper = ({ data = {}, mocks, provide }) => {
const localVue = createLocalVue();
return shallowMount(VulnerabilityReport, {
localVue,
data: () => data,
mocks,
provide: {
......
import { createLocalVue } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import Component from 'ee/subscriptions/new/components/order_summary.vue';
import createStore from 'ee/subscriptions/new/store';
......@@ -6,8 +6,7 @@ import * as types from 'ee/subscriptions/new/store/mutation_types';
import { mountExtended } from 'helpers/vue_test_utils_helper';
describe('Order Summary', () => {
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
let wrapper;
......@@ -30,7 +29,6 @@ describe('Order Summary', () => {
const store = createStore(initialData);
const createComponent = (opts = {}) => {
wrapper = mountExtended(Component, {
localVue,
store,
...opts,
});
......
import { GlLoadingIcon } from '@gitlab/ui';
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Vue, { nextTick } from 'vue';
import Vuex from 'vuex';
import Component from 'ee/subscriptions/new/components/checkout/zuora.vue';
import { getStoreConfig } from 'ee/subscriptions/new/store';
import * as types from 'ee/subscriptions/new/store/mutation_types';
describe('Zuora', () => {
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
let store;
let wrapper;
......@@ -34,7 +34,6 @@ describe('Zuora', () => {
active: true,
...props,
},
localVue,
store,
});
};
......@@ -81,7 +80,7 @@ describe('Zuora', () => {
beforeEach(() => {
store.commit(types.UPDATE_IS_LOADING_PAYMENT_METHOD, true);
return localVue.nextTick();
return nextTick();
});
it('shows the loading icon', () => {
......@@ -116,7 +115,7 @@ describe('Zuora', () => {
store.commit(types.UPDATE_PAYMENT_FORM_PARAMS, {});
return localVue.nextTick().then(() => {
return nextTick().then(() => {
expect(actionMocks.zuoraIframeRendered).toHaveBeenCalled();
});
});
......
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
import ProgressBar from 'ee/registrations/components/progress_bar.vue';
import Component from 'ee/subscriptions/new/components/checkout.vue';
import createStore from 'ee/subscriptions/new/store';
describe('Checkout', () => {
const localVue = createLocalVue();
localVue.use(Vuex);
Vue.use(Vuex);
let store;
let wrapper;
......
import { GlAreaChart } from '@gitlab/ui/dist/charts';
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import { TOTAL_REQUESTS, ANOMALOUS_REQUESTS } from 'ee/threat_monitoring/components/constants';
import StatisticsHistory from 'ee/threat_monitoring/components/statistics_history.vue';
import { mockNominalHistory, mockAnomalousHistory } from '../mocks/mock_data';
......@@ -20,15 +21,13 @@ const MockResizeObserverDirective = {
},
};
const localVue = createLocalVue();
localVue.directive('gl-resize-observer-directive', MockResizeObserverDirective);
Vue.directive('gl-resize-observer-directive', MockResizeObserverDirective);
describe('StatisticsHistory component', () => {
let wrapper;
const factory = ({ options } = {}) => {
wrapper = shallowMount(StatisticsHistory, {
localVue,
propsData: {
data: {
anomalous: { title: 'Anomoulous', values: mockAnomalousHistory },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment