Commit 6e88bebc authored by Natalia Tepluhina's avatar Natalia Tepluhina

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

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

Closes #196065

See merge request gitlab-org/gitlab!22702
parents 07de12a9 dd7e95ea
import { createLocalVue, shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlDropdownItem } from '@gitlab/ui'; import { GlDropdownItem } from '@gitlab/ui';
import { TEST_HOST } from 'helpers/test_constants'; import { TEST_HOST } from 'helpers/test_constants';
import createStore from 'ee/dependencies/store'; import createStore from 'ee/dependencies/store';
...@@ -12,14 +12,11 @@ describe('DependenciesActions component', () => { ...@@ -12,14 +12,11 @@ describe('DependenciesActions component', () => {
const { namespace } = DEPENDENCY_LIST_TYPES.all; const { namespace } = DEPENDENCY_LIST_TYPES.all;
const factory = ({ propsData, ...options } = {}) => { const factory = ({ propsData, ...options } = {}) => {
const localVue = createLocalVue();
store = createStore(); store = createStore();
jest.spyOn(store, 'dispatch').mockImplementation(); jest.spyOn(store, 'dispatch').mockImplementation();
wrapper = shallowMount(DependenciesActions, { wrapper = shallowMount(DependenciesActions, {
...options, ...options,
localVue,
store, store,
sync: false, sync: false,
attachToDocument: true, attachToDocument: true,
......
import { createLocalVue, shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import DependenciesTableRow from 'ee/dependencies/components/dependencies_table_row.vue'; import DependenciesTableRow from 'ee/dependencies/components/dependencies_table_row.vue';
import DependencyVulnerability from 'ee/dependencies/components/dependency_vulnerability.vue'; import DependencyVulnerability from 'ee/dependencies/components/dependency_vulnerability.vue';
import { MAX_DISPLAYED_VULNERABILITIES_PER_DEPENDENCY } from 'ee/dependencies/components/constants'; import { MAX_DISPLAYED_VULNERABILITIES_PER_DEPENDENCY } from 'ee/dependencies/components/constants';
...@@ -9,11 +9,8 @@ describe('DependenciesTableRow component', () => { ...@@ -9,11 +9,8 @@ describe('DependenciesTableRow component', () => {
let wrapper; let wrapper;
const factory = ({ propsData, ...options } = {}) => { const factory = ({ propsData, ...options } = {}) => {
const localVue = createLocalVue();
wrapper = shallowMount(DependenciesTableRow, { wrapper = shallowMount(DependenciesTableRow, {
...options, ...options,
localVue,
sync: false, sync: false,
propsData: { ...propsData }, propsData: { ...propsData },
}); });
......
import { createLocalVue, shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import DependenciesTable from 'ee/dependencies/components/dependencies_table.vue'; import DependenciesTable from 'ee/dependencies/components/dependencies_table.vue';
import DependenciesTableRow from 'ee/dependencies/components/dependencies_table_row.vue'; import DependenciesTableRow from 'ee/dependencies/components/dependencies_table_row.vue';
import { makeDependency } from './utils'; import { makeDependency } from './utils';
...@@ -7,11 +7,8 @@ describe('DependenciesTable component', () => { ...@@ -7,11 +7,8 @@ describe('DependenciesTable component', () => {
let wrapper; let wrapper;
const factory = ({ propsData, ...options } = {}) => { const factory = ({ propsData, ...options } = {}) => {
const localVue = createLocalVue();
wrapper = shallowMount(DependenciesTable, { wrapper = shallowMount(DependenciesTable, {
...options, ...options,
localVue,
sync: false, sync: false,
propsData: { ...propsData }, propsData: { ...propsData },
}); });
......
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 DependenciesLicenseLinks from 'ee/dependencies/components/dependency_license_links.vue'; import DependenciesLicenseLinks from 'ee/dependencies/components/dependency_license_links.vue';
...@@ -17,11 +17,9 @@ describe('DependencyLicenseLinks component', () => { ...@@ -17,11 +17,9 @@ describe('DependencyLicenseLinks component', () => {
const factory = ({ numLicenses, numLicensesWithUrl = 0, title = 'test-dependency' } = {}) => { const factory = ({ numLicenses, numLicensesWithUrl = 0, title = 'test-dependency' } = {}) => {
const licenses = addUrls(createLicenses(numLicenses), numLicensesWithUrl); const licenses = addUrls(createLicenses(numLicenses), numLicensesWithUrl);
const localVue = createLocalVue();
wrapper = shallowMount(DependenciesLicenseLinks, { wrapper = shallowMount(DependenciesLicenseLinks, {
sync: false, sync: false,
attachToDocument: true, attachToDocument: true,
localVue,
propsData: { propsData: {
licenses, licenses,
title, title,
......
import { createLocalVue, shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlAlert } from '@gitlab/ui'; import { GlAlert } from '@gitlab/ui';
import DependencyListIncompleteAlert from 'ee/dependencies/components/dependency_list_incomplete_alert.vue'; import DependencyListIncompleteAlert from 'ee/dependencies/components/dependency_list_incomplete_alert.vue';
...@@ -6,10 +6,7 @@ describe('DependencyListIncompleteAlert component', () => { ...@@ -6,10 +6,7 @@ describe('DependencyListIncompleteAlert component', () => {
let wrapper; let wrapper;
const factory = (options = {}) => { const factory = (options = {}) => {
const localVue = createLocalVue();
wrapper = shallowMount(DependencyListIncompleteAlert, { wrapper = shallowMount(DependencyListIncompleteAlert, {
localVue,
sync: false, sync: false,
...options, ...options,
}); });
......
import { createLocalVue, shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlAlert } from '@gitlab/ui'; import { GlAlert } from '@gitlab/ui';
import DependencyListJobFailedAlert from 'ee/dependencies/components/dependency_list_job_failed_alert.vue'; import DependencyListJobFailedAlert from 'ee/dependencies/components/dependency_list_job_failed_alert.vue';
...@@ -11,10 +11,7 @@ describe('DependencyListJobFailedAlert component', () => { ...@@ -11,10 +11,7 @@ describe('DependencyListJobFailedAlert component', () => {
let wrapper; let wrapper;
const factory = (options = {}) => { const factory = (options = {}) => {
const localVue = createLocalVue();
wrapper = shallowMount(DependencyListJobFailedAlert, { wrapper = shallowMount(DependencyListJobFailedAlert, {
localVue,
sync: false, sync: false,
...options, ...options,
}); });
......
import { createLocalVue, shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import DependencyVulnerability from 'ee/dependencies/components/dependency_vulnerability.vue'; import DependencyVulnerability from 'ee/dependencies/components/dependency_vulnerability.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';
import mockDataVulnerabilities from '../../../javascripts/security_dashboard/store/vulnerabilities/data/mock_data_vulnerabilities.json'; import mockDataVulnerabilities from '../../../javascripts/security_dashboard/store/vulnerabilities/data/mock_data_vulnerabilities.json';
...@@ -7,11 +7,8 @@ describe('DependencyVulnerability component', () => { ...@@ -7,11 +7,8 @@ describe('DependencyVulnerability component', () => {
let wrapper; let wrapper;
const factory = ({ propsData, ...options } = {}) => { const factory = ({ propsData, ...options } = {}) => {
const localVue = createLocalVue();
wrapper = shallowMount(DependencyVulnerability, { wrapper = shallowMount(DependencyVulnerability, {
...options, ...options,
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/dependencies/store'; import createStore from 'ee/dependencies/store';
import DependenciesTable from 'ee/dependencies/components/dependencies_table.vue'; import DependenciesTable from 'ee/dependencies/components/dependencies_table.vue';
import PaginatedDependenciesTable from 'ee/dependencies/components/paginated_dependencies_table.vue'; import PaginatedDependenciesTable from 'ee/dependencies/components/paginated_dependencies_table.vue';
...@@ -12,12 +12,9 @@ describe('PaginatedDependenciesTable component', () => { ...@@ -12,12 +12,9 @@ describe('PaginatedDependenciesTable component', () => {
const { namespace } = DEPENDENCY_LIST_TYPES.all; const { namespace } = DEPENDENCY_LIST_TYPES.all;
const factory = (props = {}) => { const factory = (props = {}) => {
const localVue = createLocalVue();
store = createStore(); store = createStore();
wrapper = shallowMount(PaginatedDependenciesTable, { wrapper = shallowMount(PaginatedDependenciesTable, {
localVue,
store, store,
sync: false, sync: false,
propsData: { ...props }, propsData: { ...props },
......
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