Commit d02138fb authored by Paul Slaughter's avatar Paul Slaughter

Fix broken shallowMount with GlModal

**How?**
Making this spec a full mount instead.

**Why?**
The test was failing with an error in our
GlModal that `$refs.modal.show` was not
a function. This is because shallowMount
will stub the internal b-modal. So that we're
not messing with internals too much, let's just
do a full mount here :)
parent 50b50fbe
import { shallowMount } from '@vue/test-utils'; import { mount } from '@vue/test-utils';
import { GlModal } from '@gitlab/ui';
import MarkdownField from '~/vue_shared/components/markdown/field.vue';
import DesignReplyForm from 'ee/design_management/components/design_notes/design_reply_form.vue'; import DesignReplyForm from 'ee/design_management/components/design_notes/design_reply_form.vue';
describe('Design reply form component', () => { describe('Design reply form component', () => {
...@@ -13,13 +10,12 @@ describe('Design reply form component', () => { ...@@ -13,13 +10,12 @@ describe('Design reply form component', () => {
const findModal = () => wrapper.find({ ref: 'cancelCommentModal' }); const findModal = () => wrapper.find({ ref: 'cancelCommentModal' });
function createComponent(props = {}) { function createComponent(props = {}) {
wrapper = shallowMount(DesignReplyForm, { wrapper = mount(DesignReplyForm, {
propsData: { propsData: {
value: '', value: '',
isSaving: false, isSaving: false,
...props, ...props,
}, },
stubs: { MarkdownField, GlModal },
}); });
} }
......
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