Commit 07de12a9 authored by Natalia Tepluhina's avatar Natalia Tepluhina

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

Remove incorrect localVue usage in ee/spec

Closes #196067

See merge request gitlab-org/gitlab!22703
parents b00f74fc e10da575
import axios from 'axios'; import axios from 'axios';
import MockAdapter from 'axios-mock-adapter'; import MockAdapter from 'axios-mock-adapter';
import { shallowMount, createLocalVue } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlModal } from '@gitlab/ui'; import { GlModal } from '@gitlab/ui';
import AlertsServiceForm from 'ee/alerts_service_settings/components/alerts_service_form.vue'; import AlertsServiceForm from 'ee/alerts_service_settings/components/alerts_service_form.vue';
import ToggleButton from '~/vue_shared/components/toggle_button.vue'; import ToggleButton from '~/vue_shared/components/toggle_button.vue';
...@@ -8,8 +8,6 @@ import createFlash from '~/flash'; ...@@ -8,8 +8,6 @@ import createFlash from '~/flash';
jest.mock('~/flash'); jest.mock('~/flash');
const localVue = createLocalVue();
const defaultProps = { const defaultProps = {
initialAuthorizationKey: 'abcedfg123', initialAuthorizationKey: 'abcedfg123',
formPath: 'http://invalid', formPath: 'http://invalid',
...@@ -24,7 +22,6 @@ describe('AlertsServiceForm', () => { ...@@ -24,7 +22,6 @@ describe('AlertsServiceForm', () => {
const createComponent = (props = defaultProps, { methods } = {}) => { const createComponent = (props = defaultProps, { methods } = {}) => {
wrapper = shallowMount(AlertsServiceForm, { wrapper = shallowMount(AlertsServiceForm, {
localVue,
propsData: { propsData: {
...defaultProps, ...defaultProps,
...props, ...props,
......
import { createLocalVue, mount } from '@vue/test-utils'; import { mount } from '@vue/test-utils';
import Environments from 'ee/clusters/components/environments.vue'; import Environments from 'ee/clusters/components/environments.vue';
import { GlTable, GlEmptyState, GlLoadingIcon } from '@gitlab/ui'; import { GlTable, GlEmptyState, GlLoadingIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue'; import Icon from '~/vue_shared/components/icon.vue';
import environments from './mock_data'; import environments from './mock_data';
const localVue = createLocalVue();
describe('Environments', () => { describe('Environments', () => {
let wrapper; let wrapper;
let propsData; let propsData;
...@@ -21,7 +19,6 @@ describe('Environments', () => { ...@@ -21,7 +19,6 @@ describe('Environments', () => {
wrapper = mount(Environments, { wrapper = mount(Environments, {
propsData, propsData,
localVue,
}); });
}); });
...@@ -44,7 +41,6 @@ describe('Environments', () => { ...@@ -44,7 +41,6 @@ describe('Environments', () => {
beforeAll(() => { beforeAll(() => {
wrapper = mount(Environments, { wrapper = mount(Environments, {
propsData: { ...propsData, environments }, propsData: { ...propsData, environments },
localVue,
stubs: { deploymentInstance: '<div class="js-deployment-instance"></div>' }, stubs: { deploymentInstance: '<div class="js-deployment-instance"></div>' },
sync: false, sync: false,
}); });
......
import { shallowMount, createLocalVue } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { TEST_HOST } from 'spec/test_constants'; import { TEST_HOST } from 'spec/test_constants';
import createStore from '~/notes/stores'; import createStore from '~/notes/stores';
import noteActions from '~/notes/components/note_actions.vue'; import noteActions from '~/notes/components/note_actions.vue';
import { userDataMock } from '../../../../spec/frontend/notes/mock_data'; import { userDataMock } from '../../../../spec/frontend/notes/mock_data';
const localVue = createLocalVue();
describe('noteActions', () => { describe('noteActions', () => {
let wrapper; let wrapper;
let store; let store;
...@@ -15,7 +13,6 @@ describe('noteActions', () => { ...@@ -15,7 +13,6 @@ describe('noteActions', () => {
shallowMount(noteActions, { shallowMount(noteActions, {
store, store,
propsData, propsData,
localVue,
sync: false, sync: false,
attachToDocument: true, attachToDocument: true,
}); });
......
import { shallowMount, createLocalVue } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import ProjectHeader from 'ee/operations/components/dashboard/project_header.vue'; import ProjectHeader from 'ee/operations/components/dashboard/project_header.vue';
import { trimText } from 'helpers/text_helper'; import { trimText } from 'helpers/text_helper';
import ProjectAvatar from '~/vue_shared/components/project_avatar/default.vue'; import ProjectAvatar from '~/vue_shared/components/project_avatar/default.vue';
import { mockOneProject } from '../../mock_data'; import { mockOneProject } from '../../mock_data';
const localVue = createLocalVue();
describe('project header component', () => { describe('project header component', () => {
let wrapper; let wrapper;
...@@ -14,7 +12,6 @@ describe('project header component', () => { ...@@ -14,7 +12,6 @@ describe('project header component', () => {
propsData: { propsData: {
project: mockOneProject, project: mockOneProject,
}, },
localVue,
sync: false, sync: false,
attachToDocument: true, attachToDocument: true,
}); });
......
import { shallowMount, createLocalVue } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import component from 'ee/subscriptions/new/components/checkout/progress_bar.vue'; import component from 'ee/subscriptions/new/components/checkout/progress_bar.vue';
describe('Progress Bar', () => { describe('Progress Bar', () => {
const localVue = createLocalVue();
let wrapper; let wrapper;
const factory = propsData => { const factory = propsData => {
wrapper = shallowMount(component, { wrapper = shallowMount(component, {
propsData, propsData,
localVue,
sync: false, sync: false,
}); });
}; };
......
...@@ -94,7 +94,7 @@ describe('Subscription Details', () => { ...@@ -94,7 +94,7 @@ describe('Subscription Details', () => {
store.commit(types.UPDATE_ORGANIZATION_NAME, 'My Organization'); store.commit(types.UPDATE_ORGANIZATION_NAME, 'My Organization');
store.commit(types.UPDATE_NUMBER_OF_USERS, 2); store.commit(types.UPDATE_NUMBER_OF_USERS, 2);
return localVue.nextTick().then(() => { return wrapper.vm.$nextTick().then(() => {
expect(isStepValid()).toBe(true); expect(isStepValid()).toBe(true);
}); });
}); });
......
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