Commit 1858d57b authored by Vitaly Slobodin's avatar Vitaly Slobodin

Merge branch 'xanf-overstubbing' into 'master'

Remove useless stubs for components

See merge request gitlab-org/gitlab!40207
parents fed6814b 7ea054bd
...@@ -52,7 +52,6 @@ describe('Issuable component', () => { ...@@ -52,7 +52,6 @@ describe('Issuable component', () => {
}, },
stubs: { stubs: {
'gl-sprintf': GlSprintf, 'gl-sprintf': GlSprintf,
'gl-link': '<a><slot></slot></a>',
}, },
}); });
}; };
......
...@@ -18,7 +18,6 @@ describe('packages_list', () => { ...@@ -18,7 +18,6 @@ describe('packages_list', () => {
let wrapper; let wrapper;
let store; let store;
const GlSortingItem = { name: 'sorting-item-stub', template: '<div><slot></slot></div>' };
const EmptySlotStub = { name: 'empty-slot-stub', template: '<div>bar</div>' }; const EmptySlotStub = { name: 'empty-slot-stub', template: '<div>bar</div>' };
const findPackagesListLoader = () => wrapper.find(PackagesListLoader); const findPackagesListLoader = () => wrapper.find(PackagesListLoader);
...@@ -67,7 +66,6 @@ describe('packages_list', () => { ...@@ -67,7 +66,6 @@ describe('packages_list', () => {
stubs: { stubs: {
...stubChildren(PackagesList), ...stubChildren(PackagesList),
GlTable, GlTable,
GlSortingItem,
GlModal, GlModal,
}, },
...options, ...options,
......
import Vuex from 'vuex'; import Vuex from 'vuex';
import { GlSorting } from '@gitlab/ui'; import { GlSorting, GlSortingItem } from '@gitlab/ui';
import { mount, createLocalVue } from '@vue/test-utils'; import { mount, createLocalVue } from '@vue/test-utils';
import stubChildren from 'helpers/stub_children'; import stubChildren from 'helpers/stub_children';
import PackagesSort from '~/packages/list/components/packages_sort.vue'; import PackagesSort from '~/packages/list/components/packages_sort.vue';
...@@ -13,8 +13,6 @@ describe('packages_sort', () => { ...@@ -13,8 +13,6 @@ describe('packages_sort', () => {
let sorting; let sorting;
let sortingItems; let sortingItems;
const GlSortingItem = { name: 'sorting-item-stub', template: '<div><slot></slot></div>' };
const findPackageListSorting = () => wrapper.find(GlSorting); const findPackageListSorting = () => wrapper.find(GlSorting);
const findSortingItems = () => wrapper.findAll(GlSortingItem); const findSortingItems = () => wrapper.findAll(GlSortingItem);
......
...@@ -23,9 +23,7 @@ const createComponent = ({ config = mockAuthorToken, value = { data: '' }, activ ...@@ -23,9 +23,7 @@ const createComponent = ({ config = mockAuthorToken, value = { data: '' }, activ
alignSuggestions: function fakeAlignSuggestions() {}, alignSuggestions: function fakeAlignSuggestions() {},
}, },
stubs: { stubs: {
Portal: { Portal: true,
template: '<div><slot></slot></div>',
},
GlFilteredSearchSuggestionList: { GlFilteredSearchSuggestionList: {
template: '<div></div>', template: '<div></div>',
methods: { methods: {
......
...@@ -27,9 +27,7 @@ const createComponent = ({ config = mockLabelToken, value = { data: '' }, active ...@@ -27,9 +27,7 @@ const createComponent = ({ config = mockLabelToken, value = { data: '' }, active
alignSuggestions: function fakeAlignSuggestions() {}, alignSuggestions: function fakeAlignSuggestions() {},
}, },
stubs: { stubs: {
Portal: { Portal: true,
template: '<div><slot></slot></div>',
},
GlFilteredSearchSuggestionList: { GlFilteredSearchSuggestionList: {
template: '<div></div>', template: '<div></div>',
methods: { methods: {
......
...@@ -32,9 +32,7 @@ const createComponent = ({ ...@@ -32,9 +32,7 @@ const createComponent = ({
alignSuggestions: function fakeAlignSuggestions() {}, alignSuggestions: function fakeAlignSuggestions() {},
}, },
stubs: { stubs: {
Portal: { Portal: true,
template: '<div><slot></slot></div>',
},
GlFilteredSearchSuggestionList: { GlFilteredSearchSuggestionList: {
template: '<div></div>', template: '<div></div>',
methods: { methods: {
......
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