Commit 947d0787 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'xanf-fix-misc-failures' into 'master'

Fix misc tests which are failing in @vue/test-utils 1.x

See merge request gitlab-org/gitlab!40211
parents 924a8664 71d9844d
......@@ -61,13 +61,14 @@ describe('CommaSeparatedListTokenSelector', () => {
input.setAttribute('type', 'text');
input.id = 'comma-separated-list';
document.body.appendChild(div);
div.appendChild(input);
document.body.appendChild(input);
});
afterEach(() => {
wrapper.destroy();
wrapper = null;
div.remove();
input.remove();
});
describe('when component is mounted', () => {
......
......@@ -41,6 +41,13 @@ const documentationPath = '/';
const noop = () => {};
const transitionStub = () => ({
render() {
// eslint-disable-next-line no-underscore-dangle
return this.$options._renderChildren;
},
});
const createComponent = ({ state, props, options }) => {
const fakeStore = new Vuex.Store({
modules: {
......@@ -88,6 +95,7 @@ const createComponent = ({ state, props, options }) => {
},
...options,
store: fakeStore,
stubs: { transition: transitionStub() },
});
};
......
......@@ -645,7 +645,7 @@ describe('Dashboard', () => {
it('it enables draggables', () => {
expect(findRearrangeButton().attributes('pressed')).toBeTruthy();
expect(findEnabledDraggables()).toEqual(findDraggables());
expect(findEnabledDraggables().wrappers).toEqual(findDraggables().wrappers);
});
it('metrics can be swapped', () => {
......
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