diff options
Diffstat (limited to 'spec/frontend/vue_mr_widget')
-rw-r--r-- | spec/frontend/vue_mr_widget/components/mr_widget_suggest_pipeline_spec.js | 3 | ||||
-rw-r--r-- | spec/frontend/vue_mr_widget/components/states/mr_widget_pipeline_tour_spec.js | 12 |
2 files changed, 13 insertions, 2 deletions
diff --git a/spec/frontend/vue_mr_widget/components/mr_widget_suggest_pipeline_spec.js b/spec/frontend/vue_mr_widget/components/mr_widget_suggest_pipeline_spec.js index 8b0253dc01a..b77305277ea 100644 --- a/spec/frontend/vue_mr_widget/components/mr_widget_suggest_pipeline_spec.js +++ b/spec/frontend/vue_mr_widget/components/mr_widget_suggest_pipeline_spec.js @@ -1,5 +1,5 @@ import { mount } from '@vue/test-utils'; -import { GlLink } from '@gitlab/ui'; +import { GlLink, GlSprintf } from '@gitlab/ui'; import suggestPipelineComponent from '~/vue_merge_request_widget/components/mr_widget_suggest_pipeline.vue'; import stubChildren from 'helpers/stub_children'; import PipelineTourState from '~/vue_merge_request_widget/components/states/mr_widget_pipeline_tour.vue'; @@ -18,6 +18,7 @@ describe('MRWidgetHeader', () => { propsData: { pipelinePath, pipelineSvgPath, humanAccess }, stubs: { ...stubChildren(PipelineTourState), + GlSprintf, }, }); }); diff --git a/spec/frontend/vue_mr_widget/components/states/mr_widget_pipeline_tour_spec.js b/spec/frontend/vue_mr_widget/components/states/mr_widget_pipeline_tour_spec.js index e8f95e099cc..acb7316ae27 100644 --- a/spec/frontend/vue_mr_widget/components/states/mr_widget_pipeline_tour_spec.js +++ b/spec/frontend/vue_mr_widget/components/states/mr_widget_pipeline_tour_spec.js @@ -1,5 +1,5 @@ import { shallowMount } from '@vue/test-utils'; -import { GlPopover } from '@gitlab/ui'; +import { GlPopover, GlLink, GlSprintf } from '@gitlab/ui'; import Cookies from 'js-cookie'; import { mockTracking, triggerEvent, unmockTracking } from 'helpers/tracking_helper'; import pipelineTourState from '~/vue_merge_request_widget/components/states/mr_widget_pipeline_tour.vue'; @@ -51,6 +51,9 @@ describe('MRWidgetPipelineTour', () => { Cookies.remove(cookieKey); wrapper = shallowMount(pipelineTourState, { propsData: popoverProps, + stubs: { + GlSprintf, + }, }); }); @@ -60,6 +63,13 @@ describe('MRWidgetPipelineTour', () => { expect(popover.exists()).toBe(true); }); + it('renders the help link', () => { + const link = wrapper.find(GlLink); + + expect(link.exists()).toBe(true); + expect(link.attributes('href')).toBe(wrapper.vm.$options.helpURL); + }); + it('renders the show me how button', () => { const button = findOkBtn(); |