Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz@gitlab.com>2017-10-06 13:08:00 +0300
committerGrzegorz Bizon <grzegorz@gitlab.com>2017-10-06 13:08:00 +0300
commit6cd7ce33240f8984f5c835123c5e7a96b4abb167 (patch)
tree3dd95fa21ddde156e3c858a84c57f96f0ba577c5 /spec/javascripts
parentcbc7d62c2982135d5edd8e1ea1c32d35cc60d46f (diff)
parent83059f130e9049939e3e8251b7ede5fa128073fd (diff)
Merge branch 'backstage/gb/move-some-pipelines-code-from-ee-to-ee' into 'master'
Move to CE some EE pipelines-related code that belongs to CE Closes gitlab-ee#3616 See merge request gitlab-org/gitlab-ce!14699
Diffstat (limited to 'spec/javascripts')
-rw-r--r--spec/javascripts/pipelines/pipeline_url_spec.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/javascripts/pipelines/pipeline_url_spec.js b/spec/javascripts/pipelines/pipeline_url_spec.js
index 256fdbe743c..4a4f2259d23 100644
--- a/spec/javascripts/pipelines/pipeline_url_spec.js
+++ b/spec/javascripts/pipelines/pipeline_url_spec.js
@@ -125,4 +125,23 @@ describe('Pipeline Url Component', () => {
component.$el.querySelector('.js-pipeline-url-autodevops').textContent.trim(),
).toEqual('Auto DevOps');
});
+
+ it('should render error badge when pipeline has a failure reason set', () => {
+ const component = new PipelineUrlComponent({
+ propsData: {
+ pipeline: {
+ id: 1,
+ path: 'foo',
+ flags: {
+ failure_reason: true,
+ },
+ failure_reason: 'some reason',
+ },
+ autoDevopsHelpPath: 'foo',
+ },
+ }).$mount();
+
+ expect(component.$el.querySelector('.js-pipeline-url-failure').textContent).toContain('error');
+ expect(component.$el.querySelector('.js-pipeline-url-failure').getAttribute('data-original-title')).toContain('some reason');
+ });
});