Commit da5da758 authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch 'xanf-remove-localVue-121747' into 'master'

Remove incorrect localVue usage in various files

Closes #121747

See merge request gitlab-org/gitlab!22603
parents a1b5260e 6f2f9c15
...@@ -23,7 +23,7 @@ describe('AlertsServiceForm', () => { ...@@ -23,7 +23,7 @@ describe('AlertsServiceForm', () => {
let mockAxios; let mockAxios;
const createComponent = (props = defaultProps, { methods } = {}) => { const createComponent = (props = defaultProps, { methods } = {}) => {
wrapper = shallowMount(localVue.extend(AlertsServiceForm), { wrapper = shallowMount(AlertsServiceForm, {
localVue, localVue,
propsData: { propsData: {
...defaultProps, ...defaultProps,
......
import { createLocalVue, mount } from '@vue/test-utils'; import { mount } from '@vue/test-utils';
import BoardScope from 'ee/boards/components/board_scope.vue'; import BoardScope from 'ee/boards/components/board_scope.vue';
import { TEST_HOST } from 'helpers/test_constants'; import { TEST_HOST } from 'helpers/test_constants';
...@@ -7,8 +7,6 @@ describe('BoardScope', () => { ...@@ -7,8 +7,6 @@ describe('BoardScope', () => {
let vm; let vm;
beforeEach(() => { beforeEach(() => {
const localVue = createLocalVue();
const propsData = { const propsData = {
collapseScope: false, collapseScope: false,
canAdminBoard: false, canAdminBoard: false,
...@@ -22,7 +20,6 @@ describe('BoardScope', () => { ...@@ -22,7 +20,6 @@ describe('BoardScope', () => {
wrapper = mount(BoardScope, { wrapper = mount(BoardScope, {
propsData, propsData,
localVue,
sync: false, sync: false,
}); });
......
...@@ -7,7 +7,6 @@ import environments from './mock_data'; ...@@ -7,7 +7,6 @@ import environments from './mock_data';
const localVue = createLocalVue(); const localVue = createLocalVue();
describe('Environments', () => { describe('Environments', () => {
const Component = localVue.extend(Environments);
let wrapper; let wrapper;
let propsData; let propsData;
...@@ -20,7 +19,7 @@ describe('Environments', () => { ...@@ -20,7 +19,7 @@ describe('Environments', () => {
isFetching: false, isFetching: false,
}; };
wrapper = mount(Component, { wrapper = mount(Environments, {
propsData, propsData,
localVue, localVue,
}); });
...@@ -43,7 +42,7 @@ describe('Environments', () => { ...@@ -43,7 +42,7 @@ describe('Environments', () => {
let table; let table;
beforeAll(() => { beforeAll(() => {
wrapper = mount(Component, { wrapper = mount(Environments, {
propsData: { ...propsData, environments }, propsData: { ...propsData, environments },
localVue, localVue,
stubs: { deploymentInstance: '<div class="js-deployment-instance"></div>' }, stubs: { deploymentInstance: '<div class="js-deployment-instance"></div>' },
......
import { createLocalVue, shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import DesignVersionDropdown from 'ee/design_management/components/upload/design_version_dropdown.vue'; import DesignVersionDropdown from 'ee/design_management/components/upload/design_version_dropdown.vue';
import { GlDropdown, GlDropdownItem } from '@gitlab/ui'; import { GlDropdown, GlDropdownItem } from '@gitlab/ui';
import mockAllVersions from './mock_data/all_versions'; import mockAllVersions from './mock_data/all_versions';
...@@ -6,8 +6,6 @@ import mockAllVersions from './mock_data/all_versions'; ...@@ -6,8 +6,6 @@ import mockAllVersions from './mock_data/all_versions';
const LATEST_VERSION_ID = 3; const LATEST_VERSION_ID = 3;
const PREVIOUS_VERSION_ID = 2; const PREVIOUS_VERSION_ID = 2;
const localVue = createLocalVue();
const designRouteFactory = versionId => ({ const designRouteFactory = versionId => ({
path: `/designs?version=${versionId}`, path: `/designs?version=${versionId}`,
query: { query: {
...@@ -29,7 +27,6 @@ describe('Design management design version dropdown component', () => { ...@@ -29,7 +27,6 @@ describe('Design management design version dropdown component', () => {
projectPath: '', projectPath: '',
issueIid: '', issueIid: '',
}, },
localVue,
mocks: { mocks: {
$route, $route,
}, },
......
...@@ -12,7 +12,7 @@ describe('noteActions', () => { ...@@ -12,7 +12,7 @@ describe('noteActions', () => {
let props; let props;
const createWrapper = propsData => const createWrapper = propsData =>
shallowMount(localVue.extend(noteActions), { shallowMount(noteActions, {
store, store,
propsData, propsData,
localVue, localVue,
......
...@@ -10,7 +10,7 @@ describe('project header component', () => { ...@@ -10,7 +10,7 @@ describe('project header component', () => {
let wrapper; let wrapper;
const factory = () => { const factory = () => {
wrapper = shallowMount(localVue.extend(ProjectHeader), { wrapper = shallowMount(ProjectHeader, {
propsData: { propsData: {
project: mockOneProject, project: mockOneProject,
}, },
......
import { shallowMount, createLocalVue } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import MockAdapter from 'axios-mock-adapter'; import MockAdapter from 'axios-mock-adapter';
import ResetKey from 'ee/prometheus_alerts/components/reset_key.vue'; import ResetKey from 'ee/prometheus_alerts/components/reset_key.vue';
import { GlModal } from '@gitlab/ui'; import { GlModal } from '@gitlab/ui';
...@@ -7,10 +7,8 @@ import ClipboardButton from '~/vue_shared/components/clipboard_button.vue'; ...@@ -7,10 +7,8 @@ import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
describe('ResetKey', () => { describe('ResetKey', () => {
let Component;
let mock; let mock;
let vm; let vm;
const localVue = createLocalVue();
const propsData = { const propsData = {
initialAuthorizationKey: 'abcd1234', initialAuthorizationKey: 'abcd1234',
...@@ -21,7 +19,6 @@ describe('ResetKey', () => { ...@@ -21,7 +19,6 @@ describe('ResetKey', () => {
beforeEach(() => { beforeEach(() => {
mock = new MockAdapter(axios); mock = new MockAdapter(axios);
Component = localVue.extend(ResetKey);
setFixtures('<div class="flash-container"></div><div id="reset-key"></div>'); setFixtures('<div class="flash-container"></div><div id="reset-key"></div>');
}); });
...@@ -33,7 +30,7 @@ describe('ResetKey', () => { ...@@ -33,7 +30,7 @@ describe('ResetKey', () => {
describe('authorization key exists', () => { describe('authorization key exists', () => {
beforeEach(() => { beforeEach(() => {
propsData.initialAuthorizationKey = 'abcd1234'; propsData.initialAuthorizationKey = 'abcd1234';
vm = shallowMount(Component, { vm = shallowMount(ResetKey, {
propsData, propsData,
}); });
}); });
...@@ -85,7 +82,7 @@ describe('ResetKey', () => { ...@@ -85,7 +82,7 @@ describe('ResetKey', () => {
describe('authorization key has not been set', () => { describe('authorization key has not been set', () => {
beforeEach(() => { beforeEach(() => {
propsData.initialAuthorizationKey = ''; propsData.initialAuthorizationKey = '';
vm = shallowMount(Component, { vm = shallowMount(ResetKey, {
propsData, propsData,
}); });
}); });
......
...@@ -6,7 +6,7 @@ describe('Progress Bar', () => { ...@@ -6,7 +6,7 @@ describe('Progress Bar', () => {
let wrapper; let wrapper;
const factory = propsData => { const factory = propsData => {
wrapper = shallowMount(localVue.extend(component), { wrapper = shallowMount(component, {
propsData, propsData,
localVue, localVue,
sync: false, sync: false,
......
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