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

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

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

Closes #121737

See merge request gitlab-org/gitlab!22584
parents 5ce08382 b7fb3613
import { shallowMount, createLocalVue } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlLink } from '@gitlab/ui'; import { GlLink } from '@gitlab/ui';
import SecurityConfigurationApp from 'ee/security_configuration/components/app.vue'; import SecurityConfigurationApp from 'ee/security_configuration/components/app.vue';
const localVue = createLocalVue();
describe('Security Configuration App', () => { describe('Security Configuration App', () => {
let wrapper; let wrapper;
const createComponent = (props = {}) => { const createComponent = (props = {}) => {
wrapper = shallowMount(SecurityConfigurationApp, { wrapper = shallowMount(SecurityConfigurationApp, {
localVue,
propsData: { propsData: {
features: [], features: [],
autoDevopsEnabled: false, autoDevopsEnabled: false,
......
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 { TEST_HOST } from 'helpers/test_constants'; import { TEST_HOST } from 'helpers/test_constants';
...@@ -13,8 +13,6 @@ import createStore from 'ee/security_dashboard/store'; ...@@ -13,8 +13,6 @@ import createStore from 'ee/security_dashboard/store';
import { getParameterValues } from '~/lib/utils/url_utility'; import { getParameterValues } from '~/lib/utils/url_utility';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
const localVue = createLocalVue();
const pipelineId = 123; const pipelineId = 123;
const vulnerabilitiesEndpoint = `${TEST_HOST}/vulnerabilities`; const vulnerabilitiesEndpoint = `${TEST_HOST}/vulnerabilities`;
const vulnerabilitiesCountEndpoint = `${TEST_HOST}/vulnerabilities_summary`; const vulnerabilitiesCountEndpoint = `${TEST_HOST}/vulnerabilities_summary`;
...@@ -41,7 +39,6 @@ describe('Security Dashboard app', () => { ...@@ -41,7 +39,6 @@ describe('Security Dashboard app', () => {
const createComponent = props => { const createComponent = props => {
store = createStore(); store = createStore();
wrapper = shallowMount(SecurityDashboardApp, { wrapper = shallowMount(SecurityDashboardApp, {
localVue,
store, store,
sync: false, sync: false,
methods: { methods: {
...@@ -104,7 +101,7 @@ describe('Security Dashboard app', () => { ...@@ -104,7 +101,7 @@ describe('Security Dashboard app', () => {
const newCount = 3; const newCount = 3;
beforeEach(() => { beforeEach(() => {
localVue.set(store.state.vulnerabilities.pageInfo, 'total', newCount); store.state.vulnerabilities.pageInfo = { total: newCount };
}); });
it('emits a vulnerabilitiesCountChanged event', () => { it('emits a vulnerabilitiesCountChanged event', () => {
......
import { shallowMount, createLocalVue } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlBadge, GlButton, GlLoadingIcon } from '@gitlab/ui'; import { GlBadge, GlButton, GlLoadingIcon } from '@gitlab/ui';
import ProjectList from 'ee/security_dashboard/components/project_list.vue'; import ProjectList from 'ee/security_dashboard/components/project_list.vue';
import ProjectAvatar from '~/vue_shared/components/project_avatar/default.vue'; import ProjectAvatar from '~/vue_shared/components/project_avatar/default.vue';
const localVue = createLocalVue();
const getArrayWithLength = n => [...Array(n).keys()]; const getArrayWithLength = n => [...Array(n).keys()];
const generateMockProjects = (projectsCount, mockProject = {}) => const generateMockProjects = (projectsCount, mockProject = {}) =>
getArrayWithLength(projectsCount).map(id => ({ id, ...mockProject })); getArrayWithLength(projectsCount).map(id => ({ id, ...mockProject }));
...@@ -16,7 +14,6 @@ describe('Project List component', () => { ...@@ -16,7 +14,6 @@ describe('Project List component', () => {
const factory = ({ projects = [], stubs = {}, showLoadingIndicator = false } = {}) => { const factory = ({ projects = [], stubs = {}, showLoadingIndicator = false } = {}) => {
wrapper = shallowMount(ProjectList, { wrapper = shallowMount(ProjectList, {
stubs, stubs,
localVue,
propsData: { propsData: {
projects, projects,
showLoadingIndicator, showLoadingIndicator,
......
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