Commit 398087f2 authored by Natalia Tepluhina's avatar Natalia Tepluhina

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

Remove incorrect localVue usage in spec/frontend/monitoring

Closes #195867

See merge request gitlab-org/gitlab!22618
parents 3528c71b 4658cdaa
......@@ -23,13 +23,12 @@ const localVue = createLocalVue();
const expectedPanelCount = 2;
describe('Dashboard', () => {
let DashboardComponent;
let store;
let wrapper;
let mock;
const createShallowWrapper = (props = {}, options = {}) => {
wrapper = shallowMount(localVue.extend(DashboardComponent), {
wrapper = shallowMount(Dashboard, {
localVue,
sync: false,
propsData: { ...propsData, ...props },
......@@ -39,7 +38,7 @@ describe('Dashboard', () => {
};
const createMountedWrapper = (props = {}, options = {}) => {
wrapper = mount(localVue.extend(DashboardComponent), {
wrapper = mount(Dashboard, {
localVue,
sync: false,
propsData: { ...propsData, ...props },
......@@ -50,7 +49,6 @@ describe('Dashboard', () => {
beforeEach(() => {
store = createStore();
DashboardComponent = localVue.extend(Dashboard);
mock = new MockAdapter(axios);
});
......
import { mount, createLocalVue } from '@vue/test-utils';
import { mount } from '@vue/test-utils';
import createFlash from '~/flash';
import MockAdapter from 'axios-mock-adapter';
import Dashboard from '~/monitoring/components/dashboard.vue';
......@@ -6,8 +6,6 @@ import { createStore } from '~/monitoring/stores';
import { propsData } from '../init_utils';
import axios from '~/lib/utils/axios_utils';
const localVue = createLocalVue();
jest.mock('~/flash');
jest.mock('~/lib/utils/url_utility', () => ({
......@@ -20,8 +18,7 @@ describe('dashboard invalid url parameters', () => {
let mock;
const createMountedWrapper = (props = {}, options = {}) => {
wrapper = mount(localVue.extend(Dashboard), {
localVue,
wrapper = mount(Dashboard, {
sync: false,
propsData: { ...propsData, ...props },
store,
......
import { mount, createLocalVue } from '@vue/test-utils';
import { mount } from '@vue/test-utils';
import { GlDropdownItem } from '@gitlab/ui';
import MockAdapter from 'axios-mock-adapter';
import axios from '~/lib/utils/axios_utils';
......@@ -8,8 +8,6 @@ import { createStore } from '~/monitoring/stores';
import { propsData, setupComponentStore } from '../init_utils';
import { metricsGroupsAPIResponse, mockApiEndpoint } from '../mock_data';
const localVue = createLocalVue();
jest.mock('~/lib/utils/url_utility', () => ({
getParameterValues: jest.fn().mockImplementation(param => {
if (param === 'start') return ['2019-10-01T18:27:47.000Z'];
......@@ -25,8 +23,7 @@ describe('dashboard time window', () => {
let mock;
const createComponentWrapperMounted = (props = {}, options = {}) => {
wrapper = mount(localVue.extend(Dashboard), {
localVue,
wrapper = mount(Dashboard, {
sync: false,
propsData: { ...propsData, ...props },
store,
......
import { shallowMount, createLocalVue } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import GraphGroup from '~/monitoring/components/graph_group.vue';
import Icon from '~/vue_shared/components/icon.vue';
const localVue = createLocalVue();
describe('Graph group component', () => {
let wrapper;
......@@ -12,10 +10,9 @@ describe('Graph group component', () => {
const findCaretIcon = () => wrapper.find(Icon);
const createComponent = propsData => {
wrapper = shallowMount(localVue.extend(GraphGroup), {
wrapper = shallowMount(GraphGroup, {
propsData,
sync: false,
localVue,
});
};
......
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