diff options
author | Paul Slaughter <pslaughter@gitlab.com> | 2018-10-03 04:08:00 -0500 |
---|---|---|
committer | Paul Slaughter <pslaughter@gitlab.com> | 2018-10-03 13:18:21 -0500 |
commit | becb86ea4e8032788b151caac004b2635b57c6a4 (patch) | |
tree | fbad0bec9e69fb82d6a72967ccae2812bbd25eb9 /spec/javascripts/diffs | |
parent | 5a286eb7a3a0c395d35c722ce6a067aca47473f2 (diff) | |
download | gitlab-ce-becb86ea4e8032788b151caac004b2635b57c6a4.tar.gz |
Add pipeline status to diffs/commit_item49329-mr-show-commit-details
**Notes:**
- Also exposes commit.pipeline_status_path in diffs.json
Diffstat (limited to 'spec/javascripts/diffs')
-rw-r--r-- | spec/javascripts/diffs/components/commit_item_spec.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/javascripts/diffs/components/commit_item_spec.js b/spec/javascripts/diffs/components/commit_item_spec.js index 50651d67172..8c3376c0eb3 100644 --- a/spec/javascripts/diffs/components/commit_item_spec.js +++ b/spec/javascripts/diffs/components/commit_item_spec.js @@ -10,6 +10,7 @@ const TEST_AUTHOR_NAME = 'test'; const TEST_AUTHOR_EMAIL = 'test+test@gitlab.com'; const TEST_AUTHOR_GRAVATAR = `${TEST_HOST}/avatar/test?s=36`; const TEST_SIGNATURE_HTML = '<a>Legit commit</a>'; +const TEST_PIPELINE_STATUS_PATH = `${TEST_HOST}/pipeline/status`; const getTitleElement = vm => vm.$el.querySelector('.commit-row-message.item-title'); const getDescElement = vm => vm.$el.querySelector('pre.commit-row-description'); @@ -143,4 +144,20 @@ describe('diffs/components/commit_widget', () => { expect(actionsElement).toContainHtml(TEST_SIGNATURE_HTML); }); }); + + describe('with pipeline status', () => { + beforeEach(done => { + vm.commit.pipelineStatusPath = TEST_PIPELINE_STATUS_PATH; + + vm.$nextTick() + .then(done) + .catch(done.fail); + }); + + it('renders pipeline status', () => { + const actionsElement = getCommitActionsElement(vm); + + expect(actionsElement).toContainElement('.ci-status-link'); + }); + }); }); |