Commit db7fe1c6 authored by Natalia Tepluhina's avatar Natalia Tepluhina

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

Remove incorrect localVue usage in ee/spec/frontend/vue_shared

Closes #121740

See merge request gitlab-org/gitlab!22582
parents f4a9ac7b fe9d5660
import { shallowMount, createLocalVue } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { uniqueId } from 'underscore'; import { uniqueId } from 'underscore';
import { AccordionItem } from 'ee/vue_shared/components/accordion'; import { AccordionItem } from 'ee/vue_shared/components/accordion';
...@@ -12,8 +12,6 @@ jest.mock('ee/vue_shared/components/accordion/accordion_event_bus', () => ({ ...@@ -12,8 +12,6 @@ jest.mock('ee/vue_shared/components/accordion/accordion_event_bus', () => ({
jest.mock('underscore'); jest.mock('underscore');
const localVue = createLocalVue();
describe('AccordionItem component', () => { describe('AccordionItem component', () => {
const mockUniqueId = 'mockUniqueId'; const mockUniqueId = 'mockUniqueId';
const accordionId = 'accordionID'; const accordionId = 'accordionID';
...@@ -28,7 +26,6 @@ describe('AccordionItem component', () => { ...@@ -28,7 +26,6 @@ describe('AccordionItem component', () => {
}; };
wrapper = shallowMount(AccordionItem, { wrapper = shallowMount(AccordionItem, {
localVue,
sync: false, sync: false,
propsData: { propsData: {
...defaultPropsData, ...defaultPropsData,
......
import { shallowMount, createLocalVue } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { Accordion } from 'ee/vue_shared/components/accordion'; import { Accordion } from 'ee/vue_shared/components/accordion';
import { uniqueId } from 'underscore'; import { uniqueId } from 'underscore';
jest.mock('underscore'); jest.mock('underscore');
const localVue = createLocalVue();
describe('Accordion component', () => { describe('Accordion component', () => {
let wrapper; let wrapper;
const factory = ({ defaultSlot = '' } = {}) => { const factory = ({ defaultSlot = '' } = {}) => {
wrapper = shallowMount(Accordion, { wrapper = shallowMount(Accordion, {
localVue,
sync: false, sync: false,
scopedSlots: { scopedSlots: {
default: defaultSlot, default: defaultSlot,
......
import { shallowMount, createLocalVue } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlLoadingIcon } from '@gitlab/ui'; import { GlLoadingIcon } from '@gitlab/ui';
import EpicsSelectBase from 'ee/vue_shared/components/sidebar/epics_select/base.vue'; import EpicsSelectBase from 'ee/vue_shared/components/sidebar/epics_select/base.vue';
...@@ -32,7 +32,6 @@ describe('EpicsSelect', () => { ...@@ -32,7 +32,6 @@ describe('EpicsSelect', () => {
setFixtures('<div class="flash-container"></div>'); setFixtures('<div class="flash-container"></div>');
wrapper = shallowMount(EpicsSelectBase, { wrapper = shallowMount(EpicsSelectBase, {
store, store,
localVue: createLocalVue(),
propsData: { propsData: {
canEdit: true, canEdit: true,
blockTitle: 'Epic', blockTitle: 'Epic',
......
import { createLocalVue, shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlButton } from '@gitlab/ui'; import { GlButton } from '@gitlab/ui';
import DropdownSearchInput from 'ee/vue_shared/components/sidebar/epics_select/dropdown_search_input.vue'; import DropdownSearchInput from 'ee/vue_shared/components/sidebar/epics_select/dropdown_search_input.vue';
import Icon from '~/vue_shared/components/icon.vue'; import Icon from '~/vue_shared/components/icon.vue';
const createComponent = () => { const createComponent = () =>
const localVue = createLocalVue(); shallowMount(DropdownSearchInput, {
return shallowMount(DropdownSearchInput, {
localVue,
directives: { directives: {
/** /**
* We don't want any observers * We don't want any observers
...@@ -18,7 +15,6 @@ const createComponent = () => { ...@@ -18,7 +15,6 @@ const createComponent = () => {
autofocusonshow: {}, autofocusonshow: {},
}, },
}); });
};
describe('EpicsSelect', () => { describe('EpicsSelect', () => {
describe('DropdownSearchInput', () => { describe('DropdownSearchInput', () => {
......
import { mount, createLocalVue } from '@vue/test-utils'; import { mount } from '@vue/test-utils';
import { GlEmptyState } from '@gitlab/ui'; import { GlEmptyState } from '@gitlab/ui';
import MockAdapter from 'axios-mock-adapter'; import MockAdapter from 'axios-mock-adapter';
import { TEST_HOST } from 'helpers/test_constants'; import { TEST_HOST } from 'helpers/test_constants';
...@@ -8,8 +8,6 @@ import createStore from 'ee/security_dashboard/store'; ...@@ -8,8 +8,6 @@ import createStore from 'ee/security_dashboard/store';
import { trimText } from 'helpers/text_helper'; import { trimText } from 'helpers/text_helper';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
const localVue = createLocalVue();
const vulnerabilitiesEndpoint = `${TEST_HOST}/vulnerabilities`; const vulnerabilitiesEndpoint = `${TEST_HOST}/vulnerabilities`;
const vulnerabilitiesSummaryEndpoint = `${TEST_HOST}/vulnerabilities_summary`; const vulnerabilitiesSummaryEndpoint = `${TEST_HOST}/vulnerabilities_summary`;
...@@ -22,7 +20,6 @@ describe('Card security reports app', () => { ...@@ -22,7 +20,6 @@ describe('Card security reports app', () => {
const createComponent = props => { const createComponent = props => {
wrapper = mount(CardSecurityDashboardApp, { wrapper = mount(CardSecurityDashboardApp, {
localVue,
store: createStore(), store: createStore(),
sync: false, sync: false,
attachToDocument: true, attachToDocument: true,
......
import { createLocalVue, mount } from '@vue/test-utils'; import { mount } from '@vue/test-utils';
import createState from 'ee/vue_shared/security_reports/store/state'; import createState from 'ee/vue_shared/security_reports/store/state';
import VulnerabilityDetails from 'ee/vue_shared/security_reports/components/vulnerability_details.vue'; import VulnerabilityDetails from 'ee/vue_shared/security_reports/components/vulnerability_details.vue';
import SeverityBadge from 'ee/vue_shared/security_reports/components/severity_badge.vue'; import SeverityBadge from 'ee/vue_shared/security_reports/components/severity_badge.vue';
...@@ -7,12 +7,10 @@ import { TEST_HOST } from 'helpers/test_constants'; ...@@ -7,12 +7,10 @@ import { TEST_HOST } from 'helpers/test_constants';
describe('VulnerabilityDetails component', () => { describe('VulnerabilityDetails component', () => {
let wrapper; let wrapper;
const localVue = createLocalVue();
const componentFactory = (options = {}) => { const componentFactory = (options = {}) => {
wrapper = mount(localVue.extend(VulnerabilityDetails), { wrapper = mount(VulnerabilityDetails, {
...options, ...options,
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