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