Commit f17f5b39 authored by Doug Stull's avatar Doug Stull

Stub GlModal for testing modal footer button

parent a4a02d02
...@@ -95,7 +95,7 @@ export default { ...@@ -95,7 +95,7 @@ export default {
</gl-link> </gl-link>
</template> </template>
</gl-sprintf> </gl-sprintf>
<template slot="modal-footer"> <template #modal-footer>
<a <a
ref="goto" ref="goto"
:href="goToPipelinesPath" :href="goToPipelinesPath"
......
...@@ -16,6 +16,9 @@ describe('PipelineTourSuccessModal', () => { ...@@ -16,6 +16,9 @@ describe('PipelineTourSuccessModal', () => {
trackingSpy = mockTracking('_category_', undefined, jest.spyOn); trackingSpy = mockTracking('_category_', undefined, jest.spyOn);
wrapper = shallowMount(pipelineTourSuccess, { wrapper = shallowMount(pipelineTourSuccess, {
propsData: modalProps, propsData: modalProps,
stubs: {
GlModal,
},
}); });
cookieSpy = jest.spyOn(Cookies, 'remove'); cookieSpy = jest.spyOn(Cookies, 'remove');
...@@ -51,7 +54,6 @@ describe('PipelineTourSuccessModal', () => { ...@@ -51,7 +54,6 @@ describe('PipelineTourSuccessModal', () => {
it('send an event when go to pipelines is clicked', () => { it('send an event when go to pipelines is clicked', () => {
trackingSpy = mockTracking('_category_', wrapper.element, jest.spyOn); trackingSpy = mockTracking('_category_', wrapper.element, jest.spyOn);
const goToBtn = wrapper.find({ ref: 'goto' }); const goToBtn = wrapper.find({ ref: 'goto' });
triggerEvent(goToBtn.element); triggerEvent(goToBtn.element);
expect(trackingSpy).toHaveBeenCalledWith('_category_', 'click_button', { expect(trackingSpy).toHaveBeenCalledWith('_category_', 'click_button', {
......
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