summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-05-11 18:35:27 +0000
committerFilipa Lacerda <filipa@gitlab.com>2017-05-11 18:35:27 +0000
commite7e132529bff3af38175076b84c818b6dea4b05f (patch)
tree13a22ab5470a5fdb2923bafa229e8256d42e4816 /spec
parent88088921738079a31c072477082717e55db3e689 (diff)
parent6bcf316ed701620fa5ba654f2184a261650fd7b9 (diff)
downloadgitlab-ce-e7e132529bff3af38175076b84c818b6dea4b05f.tar.gz
Merge branch 'pipeline-schedules-callout-docs-url' into 'master'
Set correct docsUrl in pipeline schedules callout component. Closes #31957 See merge request !11216
Diffstat (limited to 'spec')
-rw-r--r--spec/javascripts/pipeline_schedules/pipeline_schedule_callout_spec.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/javascripts/pipeline_schedules/pipeline_schedule_callout_spec.js b/spec/javascripts/pipeline_schedules/pipeline_schedule_callout_spec.js
index 1d05f37cb36..6120d224ac0 100644
--- a/spec/javascripts/pipeline_schedules/pipeline_schedule_callout_spec.js
+++ b/spec/javascripts/pipeline_schedules/pipeline_schedule_callout_spec.js
@@ -4,8 +4,15 @@ import PipelineSchedulesCallout from '~/pipeline_schedules/components/pipeline_s
const PipelineSchedulesCalloutComponent = Vue.extend(PipelineSchedulesCallout);
const cookieKey = 'pipeline_schedules_callout_dismissed';
+const docsUrl = 'help/ci/scheduled_pipelines';
describe('Pipeline Schedule Callout', () => {
+ beforeEach(() => {
+ setFixtures(`
+ <div id='pipeline-schedules-callout' data-docs-url=${docsUrl}></div>
+ `);
+ });
+
describe('independent of cookies', () => {
beforeEach(() => {
this.calloutComponent = new PipelineSchedulesCalloutComponent().$mount();
@@ -18,6 +25,10 @@ describe('Pipeline Schedule Callout', () => {
it('correctly sets illustrationSvg', () => {
expect(this.calloutComponent.illustrationSvg).toContain('<svg');
});
+
+ it('correctly sets docsUrl', () => {
+ expect(this.calloutComponent.docsUrl).toContain(docsUrl);
+ });
});
describe(`when ${cookieKey} cookie is set`, () => {
@@ -61,6 +72,10 @@ describe('Pipeline Schedule Callout', () => {
expect(this.calloutComponent.$el.outerHTML).toContain('runs pipelines in the future');
});
+ it('renders the documentation url', () => {
+ expect(this.calloutComponent.$el.outerHTML).toContain(docsUrl);
+ });
+
it('updates calloutDismissed when close button is clicked', (done) => {
this.calloutComponent.$el.querySelector('#dismiss-callout-btn').click();