diff options
| author | Constance Okoghenun <cokoghenun@gitlab.com> | 2018-11-07 17:20:17 +0000 |
|---|---|---|
| committer | Phil Hughes <me@iamphill.com> | 2018-11-07 17:20:17 +0000 |
| commit | baa37edd93d47e836835617ef08d6fc85ad3a689 (patch) | |
| tree | 9241261a47917e76dc845eea5f47939d475d6685 /spec/javascripts/pipelines | |
| parent | 06e8cf58558cccc5a8556e94c93aa4bf25dc083e (diff) | |
| download | gitlab-ce-baa37edd93d47e836835617ef08d6fc85ad3a689.tar.gz | |
Resolve "Issue board card design"
Diffstat (limited to 'spec/javascripts/pipelines')
| -rw-r--r-- | spec/javascripts/pipelines/header_component_spec.js | 2 | ||||
| -rw-r--r-- | spec/javascripts/pipelines/pipeline_url_spec.js | 5 | ||||
| -rw-r--r-- | spec/javascripts/pipelines/pipelines_table_row_spec.js | 8 |
3 files changed, 9 insertions, 6 deletions
diff --git a/spec/javascripts/pipelines/header_component_spec.js b/spec/javascripts/pipelines/header_component_spec.js index 473a062fc40..556a0976b29 100644 --- a/spec/javascripts/pipelines/header_component_spec.js +++ b/spec/javascripts/pipelines/header_component_spec.js @@ -51,7 +51,7 @@ describe('Pipeline details header', () => { .querySelector('.header-main-content') .textContent.replace(/\s+/g, ' ') .trim(), - ).toEqual('failed Pipeline #123 triggered 3 weeks ago by Foo'); + ).toContain('failed Pipeline #123 triggered 3 weeks ago by Foo'); }); describe('action buttons', () => { diff --git a/spec/javascripts/pipelines/pipeline_url_spec.js b/spec/javascripts/pipelines/pipeline_url_spec.js index c9011b403b7..d6c44f4c976 100644 --- a/spec/javascripts/pipelines/pipeline_url_spec.js +++ b/spec/javascripts/pipelines/pipeline_url_spec.js @@ -63,12 +63,15 @@ describe('Pipeline Url Component', () => { }).$mount(); const image = component.$el.querySelector('.js-pipeline-url-user img'); + const tooltip = component.$el.querySelector( + '.js-pipeline-url-user .js-user-avatar-image-toolip', + ); expect(component.$el.querySelector('.js-pipeline-url-user').getAttribute('href')).toEqual( mockData.pipeline.user.web_url, ); - expect(image.getAttribute('data-original-title')).toEqual(mockData.pipeline.user.name); + expect(tooltip.textContent.trim()).toEqual(mockData.pipeline.user.name); expect(image.getAttribute('src')).toEqual(`${mockData.pipeline.user.avatar_url}?width=20`); }); diff --git a/spec/javascripts/pipelines/pipelines_table_row_spec.js b/spec/javascripts/pipelines/pipelines_table_row_spec.js index 506d01f5ec1..4c575536f0e 100644 --- a/spec/javascripts/pipelines/pipelines_table_row_spec.js +++ b/spec/javascripts/pipelines/pipelines_table_row_spec.js @@ -86,8 +86,8 @@ describe('Pipelines Table Row', () => { expect( component.$el - .querySelector('.table-section:nth-child(2) img') - .getAttribute('data-original-title'), + .querySelector('.table-section:nth-child(2) .js-user-avatar-image-toolip') + .textContent.trim(), ).toEqual(pipeline.user.name); }); }); @@ -112,8 +112,8 @@ describe('Pipelines Table Row', () => { const commitAuthorLink = commitAuthorElement.getAttribute('href'); const commitAuthorName = commitAuthorElement - .querySelector('img.avatar') - .getAttribute('data-original-title'); + .querySelector('.js-user-avatar-image-toolip') + .textContent.trim(); return { commitAuthorElement, commitAuthorLink, commitAuthorName }; }; |
