Commit 7ff48a38 authored by Enrique Alcantara's avatar Enrique Alcantara

Prepare vue_shared specs for bv upgrade

- Set attachDocument as true
- Set sync as false
parent ad6f7e24
......@@ -19,6 +19,7 @@ describe('Changed file icon', () => {
...props,
},
sync: false,
attachToDocument: true,
});
};
......
......@@ -13,6 +13,7 @@ describe('Commit component', () => {
wrapper = shallowMount(CommitComponent, {
propsData,
sync: false,
attachToDocument: true,
});
};
......
......@@ -18,6 +18,7 @@ describe('IssueAssigneesComponent', () => {
...props,
},
sync: false,
attachToDocument: true,
});
vm = wrapper.vm; // eslint-disable-line
};
......
import Vue from 'vue';
import { mount } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import IssueMilestone from '~/vue_shared/components/issue/issue_milestone.vue';
import Icon from '~/vue_shared/components/icon.vue';
import { mockMilestone } from '../../../../javascripts/boards/mock_data';
const createComponent = (milestone = mockMilestone) => {
const Component = Vue.extend(IssueMilestone);
return mount(Component, {
return shallowMount(Component, {
propsData: {
milestone,
},
sync: false,
attachToDocument: true,
});
};
......@@ -156,7 +158,7 @@ describe('IssueMilestoneComponent', () => {
});
it('renders milestone icon', () => {
expect(vm.$el.querySelector('svg use').getAttribute('xlink:href')).toContain('clock');
expect(wrapper.find(Icon).props('name')).toBe('clock');
});
it('renders milestone title', () => {
......
......@@ -35,6 +35,7 @@ describe('RelatedIssuableItem', () => {
localVue,
slots,
sync: false,
attachToDocument: true,
propsData: props,
});
});
......
......@@ -21,6 +21,7 @@ describe('Suggestion Diff component', () => {
},
localVue,
sync: false,
attachToDocument: true,
});
};
......
......@@ -16,6 +16,8 @@ describe('modal copy button', () => {
text: 'copy me',
title: 'Copy this value',
},
attachToDocument: true,
sync: false,
});
});
......
......@@ -26,6 +26,8 @@ describe('Pagination links component', () => {
list: [{ id: 'foo' }, { id: 'bar' }],
props,
},
attachToDocument: true,
sync: false,
});
[glPaginatedList] = wrapper.vm.$children;
......
import Vue from 'vue';
import LabelsSelect from '~/labels_select';
import baseComponent from '~/vue_shared/components/sidebar/labels_select/base.vue';
import BaseComponent from '~/vue_shared/components/sidebar/labels_select/base.vue';
import { mount } from '@vue/test-utils';
import { shallowMount } from '@vue/test-utils';
import {
mockConfig,
mockLabels,
} from '../../../../../javascripts/vue_shared/components/sidebar/labels_select/mock_data';
const createComponent = (config = mockConfig) => {
const Component = Vue.extend(baseComponent);
return mount(Component, {
const createComponent = (config = mockConfig) =>
shallowMount(BaseComponent, {
propsData: config,
sync: false,
attachToDocument: true,
});
};
describe('BaseComponent', () => {
let wrapper;
......
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