Commit 79569d65 authored by Natalia Tepluhina's avatar Natalia Tepluhina

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

Remove incorrect localVue usage in spec/frontend/vue_mr_widget

Closes #121745

See merge request gitlab-org/gitlab!22577
parents e66fd303 76870d67
...@@ -29,7 +29,7 @@ describe('Merge Requests Artifacts list app', () => { ...@@ -29,7 +29,7 @@ describe('Merge Requests Artifacts list app', () => {
}); });
const createComponent = () => { const createComponent = () => {
wrapper = mount(localVue.extend(ArtifactsListApp), { wrapper = mount(ArtifactsListApp, {
propsData: { propsData: {
endpoint: TEST_HOST, endpoint: TEST_HOST,
}, },
......
import { shallowMount, createLocalVue } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlLink } from '@gitlab/ui'; import { GlLink } from '@gitlab/ui';
import ArtifactsList from '~/vue_merge_request_widget/components/artifacts_list.vue'; import ArtifactsList from '~/vue_merge_request_widget/components/artifacts_list.vue';
import { artifactsList } from './mock_data'; import { artifactsList } from './mock_data';
describe('Artifacts List', () => { describe('Artifacts List', () => {
let wrapper; let wrapper;
const localVue = createLocalVue();
const data = { const data = {
artifacts: artifactsList, artifacts: artifactsList,
}; };
const mountComponent = props => { const mountComponent = props => {
wrapper = shallowMount(localVue.extend(ArtifactsList), { wrapper = shallowMount(ArtifactsList, {
propsData: { propsData: {
...props, ...props,
}, },
sync: false, sync: false,
localVue,
}); });
}; };
......
import { shallowMount, createLocalVue } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import MrWidgetContainer from '~/vue_merge_request_widget/components/mr_widget_container.vue'; import MrWidgetContainer from '~/vue_merge_request_widget/components/mr_widget_container.vue';
const BODY_HTML = '<div class="test-body">Hello World</div>'; const BODY_HTML = '<div class="test-body">Hello World</div>';
...@@ -8,10 +8,7 @@ describe('MrWidgetContainer', () => { ...@@ -8,10 +8,7 @@ describe('MrWidgetContainer', () => {
let wrapper; let wrapper;
const factory = (options = {}) => { const factory = (options = {}) => {
const localVue = createLocalVue(); wrapper = shallowMount(MrWidgetContainer, {
wrapper = shallowMount(localVue.extend(MrWidgetContainer), {
localVue,
...options, ...options,
}); });
}; };
......
import { shallowMount, createLocalVue } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import MrWidgetIcon from '~/vue_merge_request_widget/components/mr_widget_icon.vue'; import MrWidgetIcon from '~/vue_merge_request_widget/components/mr_widget_icon.vue';
import Icon from '~/vue_shared/components/icon.vue'; import Icon from '~/vue_shared/components/icon.vue';
...@@ -8,14 +8,11 @@ describe('MrWidgetIcon', () => { ...@@ -8,14 +8,11 @@ describe('MrWidgetIcon', () => {
let wrapper; let wrapper;
beforeEach(() => { beforeEach(() => {
const localVue = createLocalVue(); wrapper = shallowMount(MrWidgetIcon, {
wrapper = shallowMount(localVue.extend(MrWidgetIcon), {
propsData: { propsData: {
name: TEST_ICON, name: TEST_ICON,
}, },
sync: false, sync: false,
localVue,
}); });
}); });
......
import { createLocalVue, shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import CommitEdit from '~/vue_merge_request_widget/components/states/commit_edit.vue'; import CommitEdit from '~/vue_merge_request_widget/components/states/commit_edit.vue';
const localVue = createLocalVue();
const testCommitMessage = 'Test commit message'; const testCommitMessage = 'Test commit message';
const testLabel = 'Test label'; const testLabel = 'Test label';
const testInputId = 'test-input-id'; const testInputId = 'test-input-id';
...@@ -10,8 +9,7 @@ describe('Commits edit component', () => { ...@@ -10,8 +9,7 @@ describe('Commits edit component', () => {
let wrapper; let wrapper;
const createComponent = (slots = {}) => { const createComponent = (slots = {}) => {
wrapper = shallowMount(localVue.extend(CommitEdit), { wrapper = shallowMount(CommitEdit, {
localVue,
sync: false, sync: false,
propsData: { propsData: {
value: testCommitMessage, value: testCommitMessage,
......
import { createLocalVue, shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlDropdownItem } from '@gitlab/ui'; import { GlDropdownItem } from '@gitlab/ui';
import CommitMessageDropdown from '~/vue_merge_request_widget/components/states/commit_message_dropdown.vue'; import CommitMessageDropdown from '~/vue_merge_request_widget/components/states/commit_message_dropdown.vue';
const localVue = createLocalVue();
const commits = [ const commits = [
{ {
title: 'Commit 1', title: 'Commit 1',
...@@ -25,8 +24,7 @@ describe('Commits message dropdown component', () => { ...@@ -25,8 +24,7 @@ describe('Commits message dropdown component', () => {
let wrapper; let wrapper;
const createComponent = () => { const createComponent = () => {
wrapper = shallowMount(localVue.extend(CommitMessageDropdown), { wrapper = shallowMount(CommitMessageDropdown, {
localVue,
sync: false, sync: false,
propsData: { propsData: {
commits, commits,
......
import { createLocalVue, shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import CommitsHeader from '~/vue_merge_request_widget/components/states/commits_header.vue'; import CommitsHeader from '~/vue_merge_request_widget/components/states/commits_header.vue';
import Icon from '~/vue_shared/components/icon.vue'; import Icon from '~/vue_shared/components/icon.vue';
const localVue = createLocalVue();
describe('Commits header component', () => { describe('Commits header component', () => {
let wrapper; let wrapper;
const createComponent = props => { const createComponent = props => {
wrapper = shallowMount(localVue.extend(CommitsHeader), { wrapper = shallowMount(CommitsHeader, {
localVue,
sync: false, sync: false,
propsData: { propsData: {
isSquashEnabled: false, isSquashEnabled: false,
......
import { mount, createLocalVue } from '@vue/test-utils'; import { mount } from '@vue/test-utils';
import DeploymentViewButton from '~/vue_merge_request_widget/components/deployment/deployment_view_button.vue'; import DeploymentViewButton from '~/vue_merge_request_widget/components/deployment/deployment_view_button.vue';
import ReviewAppLink from '~/vue_merge_request_widget/components/review_app_link.vue'; import ReviewAppLink from '~/vue_merge_request_widget/components/review_app_link.vue';
import deploymentMockData from './deployment_mock_data'; import deploymentMockData from './deployment_mock_data';
...@@ -7,10 +7,7 @@ describe('Deployment View App button', () => { ...@@ -7,10 +7,7 @@ describe('Deployment View App button', () => {
let wrapper; let wrapper;
const factory = (options = {}) => { const factory = (options = {}) => {
const localVue = createLocalVue(); wrapper = mount(DeploymentViewButton, {
wrapper = mount(localVue.extend(DeploymentViewButton), {
localVue,
...options, ...options,
}); });
}; };
......
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