diff options
author | Phil Hughes <me@iamphill.com> | 2017-12-12 09:22:37 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-12-12 09:22:37 +0000 |
commit | 8a29e0b07367e1d0cc071f0de189aafcae207bf8 (patch) | |
tree | 98d370dd7749c4d85207edd072cee32bf575a5d1 /spec | |
parent | f2d44bcd4361572a8d32f6846a6fbf28a43c892d (diff) | |
parent | 5e4681372ad6384c56d82dc8582d80f6568a0dcf (diff) | |
download | gitlab-ce-8a29e0b07367e1d0cc071f0de189aafcae207bf8.tar.gz |
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.js | 31 |
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'); + }); + }); }); |