Commit c036d7a2 authored by Natalia Tepluhina's avatar Natalia Tepluhina

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

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

Closes #121600

See merge request gitlab-org/gitlab!22586
parents 4ae97c82 63b94f9a
import { createLocalVue, shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlModal, GlLink, GlIntersperse } from '@gitlab/ui'; import { GlModal, GlLink, GlIntersperse } from '@gitlab/ui';
import LicenseComponentLinks, { import LicenseComponentLinks, {
...@@ -6,9 +6,6 @@ import LicenseComponentLinks, { ...@@ -6,9 +6,6 @@ import LicenseComponentLinks, {
} from 'ee/project_licenses/components/license_component_links.vue'; } from 'ee/project_licenses/components/license_component_links.vue';
describe('LicenseComponentLinks component', () => { describe('LicenseComponentLinks component', () => {
// local Vue
const localVue = createLocalVue();
// data helpers // data helpers
const createComponents = n => [...Array(n).keys()].map(i => ({ name: `component ${i + 1}` })); const createComponents = n => [...Array(n).keys()].map(i => ({ name: `component ${i + 1}` }));
const addUrls = (components, numComponentsWithUrls = Infinity) => const addUrls = (components, numComponentsWithUrls = Infinity) =>
...@@ -22,8 +19,7 @@ describe('LicenseComponentLinks component', () => { ...@@ -22,8 +19,7 @@ describe('LicenseComponentLinks component', () => {
const factory = ({ numComponents, numComponentsWithUrl = 0, title = 'test-component' } = {}) => { const factory = ({ numComponents, numComponentsWithUrl = 0, title = 'test-component' } = {}) => {
const components = addUrls(createComponents(numComponents), numComponentsWithUrl); const components = addUrls(createComponents(numComponents), numComponentsWithUrl);
wrapper = shallowMount(localVue.extend(LicenseComponentLinks), { wrapper = shallowMount(LicenseComponentLinks, {
localVue,
propsData: { propsData: {
components, components,
title, title,
......
import { createLocalVue, shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlLink, GlSkeletonLoading } from '@gitlab/ui'; import { GlLink, GlSkeletonLoading } from '@gitlab/ui';
import LicenseComponentLinks from 'ee/project_licenses/components/license_component_links.vue'; import LicenseComponentLinks from 'ee/project_licenses/components/license_component_links.vue';
import LicensesTableRow from 'ee/project_licenses/components/licenses_table_row.vue'; import LicensesTableRow from 'ee/project_licenses/components/licenses_table_row.vue';
import { makeLicense } from './utils'; import { makeLicense } from './utils';
describe('LicensesTableRow component', () => { describe('LicensesTableRow component', () => {
const localVue = createLocalVue();
let wrapper; let wrapper;
let license; let license;
const factory = (propsData = {}) => { const factory = (propsData = {}) => {
wrapper = shallowMount(localVue.extend(LicensesTableRow), { wrapper = shallowMount(LicensesTableRow, {
localVue,
sync: false, sync: false,
propsData, propsData,
}); });
......
import { createLocalVue, shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import LicensesTable from 'ee/project_licenses/components/licenses_table.vue'; import LicensesTable from 'ee/project_licenses/components/licenses_table.vue';
import LicensesTableRow from 'ee/project_licenses/components/licenses_table_row.vue'; import LicensesTableRow from 'ee/project_licenses/components/licenses_table_row.vue';
import { makeLicense } from './utils'; import { makeLicense } from './utils';
describe('LicensesTable component', () => { describe('LicensesTable component', () => {
const localVue = createLocalVue();
let wrapper; let wrapper;
const factory = (propsData = {}) => { const factory = (propsData = {}) => {
wrapper = shallowMount(localVue.extend(LicensesTable), { wrapper = shallowMount(LicensesTable, {
localVue,
sync: false, sync: false,
propsData: { ...propsData }, propsData: { ...propsData },
}); });
......
import { createLocalVue, shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import createStore from 'ee/project_licenses/store'; import createStore from 'ee/project_licenses/store';
import LicensesTable from 'ee/project_licenses/components/licenses_table.vue'; import LicensesTable from 'ee/project_licenses/components/licenses_table.vue';
import { toLicenseObject } from 'ee/project_licenses/utils/mappers'; import { toLicenseObject } from 'ee/project_licenses/utils/mappers';
...@@ -12,7 +12,6 @@ jest.mock('underscore', () => ({ ...@@ -12,7 +12,6 @@ jest.mock('underscore', () => ({
})); }));
describe('PaginatedLicensesTable component', () => { describe('PaginatedLicensesTable component', () => {
const localVue = createLocalVue();
const namespace = LICENSE_LIST; const namespace = LICENSE_LIST;
let store; let store;
...@@ -21,8 +20,7 @@ describe('PaginatedLicensesTable component', () => { ...@@ -21,8 +20,7 @@ describe('PaginatedLicensesTable component', () => {
const factory = () => { const factory = () => {
store = createStore(); store = createStore();
wrapper = shallowMount(localVue.extend(PaginatedLicensesTable), { wrapper = shallowMount(PaginatedLicensesTable, {
localVue,
store, store,
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