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
path: root/spec
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-12-12 12:22:37 +0300
committerPhil Hughes <me@iamphill.com>2017-12-12 12:22:37 +0300
commit8a29e0b07367e1d0cc071f0de189aafcae207bf8 (patch)
tree98d370dd7749c4d85207edd072cee32bf575a5d1 /spec
parentf2d44bcd4361572a8d32f6846a6fbf28a43c892d (diff)
parent5e4681372ad6384c56d82dc8582d80f6568a0dcf (diff)
Merge branch '40997-pipeline-null' into 'master'
Checks for null in job tooltip title Closes #40997 See merge request gitlab-org/gitlab-ce!15869
Diffstat (limited to 'spec')
-rw-r--r--spec/javascripts/pipelines/graph/job_component_spec.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/spec/javascripts/pipelines/graph/job_component_spec.js b/spec/javascripts/pipelines/graph/job_component_spec.js
index 23c87610d83..35e36e9c353 100644
--- a/spec/javascripts/pipelines/graph/job_component_spec.js
+++ b/spec/javascripts/pipelines/graph/job_component_spec.js
@@ -113,4 +113,35 @@ describe('pipeline graph job component', () => {
component.$el.querySelector('a').classList.contains('css-class-job-name'),
).toBe(true);
});
+
+ describe('status label', () => {
+ it('should not render status label when it is not provided', () => {
+ component = mountComponent(JobComponent, {
+ job: {
+ id: 4256,
+ name: 'test',
+ status: {
+ icon: 'icon_status_success',
+ },
+ },
+ });
+
+ expect(component.$el.querySelector('.js-job-component-tooltip').getAttribute('data-original-title')).toEqual('test');
+ });
+
+ it('should not render status label when it is provided', () => {
+ component = mountComponent(JobComponent, {
+ job: {
+ id: 4256,
+ name: 'test',
+ status: {
+ icon: 'icon_status_success',
+ label: 'success',
+ },
+ },
+ });
+
+ expect(component.$el.querySelector('.js-job-component-tooltip').getAttribute('data-original-title')).toEqual('test - success');
+ });
+ });
});