Commit 7a0db10f authored by Martin Wortschack's avatar Martin Wortschack

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

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

Closes #121592

See merge request gitlab-org/gitlab!22591
parents f00c2e89 0f360925
import Vue from 'vue'; import Vue from 'vue';
import { shallowMount, createLocalVue } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlPopover, GlLink } from '@gitlab/ui'; import { GlPopover, GlLink } from '@gitlab/ui';
import { TEST_HOST } from 'helpers/test_constants'; import { TEST_HOST } from 'helpers/test_constants';
import component from 'ee/approvals/components/approval_check_popover.vue'; import component from 'ee/approvals/components/approval_check_popover.vue';
const localVue = createLocalVue();
describe('Approval Check Popover', () => { describe('Approval Check Popover', () => {
let wrapper; let wrapper;
beforeEach(() => { beforeEach(() => {
wrapper = shallowMount(component, { wrapper = shallowMount(component, {
localVue,
propsData: { propsData: {
title: 'Title', title: 'Title',
}, },
......
import Vue from 'vue'; import Vue from 'vue';
import { shallowMount, createLocalVue } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { TEST_HOST } from 'helpers/test_constants'; import { TEST_HOST } from 'helpers/test_constants';
import component from 'ee/approvals/components/approval_check_rule_popover.vue'; import component from 'ee/approvals/components/approval_check_rule_popover.vue';
import { import {
...@@ -12,9 +12,7 @@ describe('Approval Check Popover', () => { ...@@ -12,9 +12,7 @@ describe('Approval Check Popover', () => {
let wrapper; let wrapper;
beforeEach(() => { beforeEach(() => {
const localVue = createLocalVue();
wrapper = shallowMount(component, { wrapper = shallowMount(component, {
localVue,
propsData: { rule: {} }, propsData: { rule: {} },
sync: false, sync: false,
}); });
......
import { shallowMount, createLocalVue } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlButton } from '@gitlab/ui'; import { GlButton } from '@gitlab/ui';
import { TYPE_USER, TYPE_GROUP, TYPE_HIDDEN_GROUPS } from 'ee/approvals/constants'; import { TYPE_USER, TYPE_GROUP, TYPE_HIDDEN_GROUPS } from 'ee/approvals/constants';
import ApproversListItem from 'ee/approvals/components/approvers_list_item.vue'; import ApproversListItem from 'ee/approvals/components/approvers_list_item.vue';
import HiddenGroupsItem from 'ee/approvals/components/hidden_groups_item.vue'; import HiddenGroupsItem from 'ee/approvals/components/hidden_groups_item.vue';
import Avatar from '~/vue_shared/components/project_avatar/default.vue'; import Avatar from '~/vue_shared/components/project_avatar/default.vue';
const localVue = createLocalVue();
const TEST_USER = { const TEST_USER = {
id: 1, id: 1,
type: TYPE_USER, type: TYPE_USER,
...@@ -22,9 +21,8 @@ describe('Approvals ApproversListItem', () => { ...@@ -22,9 +21,8 @@ describe('Approvals ApproversListItem', () => {
let wrapper; let wrapper;
const factory = (options = {}) => { const factory = (options = {}) => {
wrapper = shallowMount(localVue.extend(ApproversListItem), { wrapper = shallowMount(ApproversListItem, {
...options, ...options,
localVue,
sync: false, sync: false,
}); });
}; };
......
import { shallowMount, createLocalVue } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import ApproversListEmpty from 'ee/approvals/components/approvers_list_empty.vue'; import ApproversListEmpty from 'ee/approvals/components/approvers_list_empty.vue';
import ApproversListItem from 'ee/approvals/components/approvers_list_item.vue'; import ApproversListItem from 'ee/approvals/components/approvers_list_item.vue';
import ApproversList from 'ee/approvals/components/approvers_list.vue'; import ApproversList from 'ee/approvals/components/approvers_list.vue';
import { TYPE_USER, TYPE_GROUP } from 'ee/approvals/constants'; import { TYPE_USER, TYPE_GROUP } from 'ee/approvals/constants';
const localVue = createLocalVue();
const TEST_APPROVERS = [ const TEST_APPROVERS = [
{ id: 1, type: TYPE_GROUP }, { id: 1, type: TYPE_GROUP },
{ id: 1, type: TYPE_USER }, { id: 1, type: TYPE_USER },
...@@ -16,9 +15,8 @@ describe('ApproversList', () => { ...@@ -16,9 +15,8 @@ describe('ApproversList', () => {
let wrapper; let wrapper;
const factory = (options = {}) => { const factory = (options = {}) => {
wrapper = shallowMount(localVue.extend(ApproversList), { wrapper = shallowMount(ApproversList, {
...options, ...options,
localVue,
propsData, propsData,
}); });
}; };
......
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