summaryrefslogtreecommitdiff
path: root/spec/frontend/repository/components
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-03 18:06:11 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-03 18:06:11 +0000
commit25521def84a6987fe9d4265b560e930bfb32c195 (patch)
tree711e001ea65f76a9c2eb034c4531bda325af84f3 /spec/frontend/repository/components
parent9a1c5456747a7b5b218b8b44e4b43396bf7fd705 (diff)
downloadgitlab-ce-25521def84a6987fe9d4265b560e930bfb32c195.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/repository/components')
-rw-r--r--spec/frontend/repository/components/__snapshots__/last_commit_spec.js.snap105
-rw-r--r--spec/frontend/repository/components/last_commit_spec.js6
2 files changed, 111 insertions, 0 deletions
diff --git a/spec/frontend/repository/components/__snapshots__/last_commit_spec.js.snap b/spec/frontend/repository/components/__snapshots__/last_commit_spec.js.snap
index cd8372a8800..0e04487cb20 100644
--- a/spec/frontend/repository/components/__snapshots__/last_commit_spec.js.snap
+++ b/spec/frontend/repository/components/__snapshots__/last_commit_spec.js.snap
@@ -60,6 +60,111 @@ exports[`Repository last commit component renders commit widget 1`] = `
<div
class="commit-actions flex-row"
>
+ <!---->
+
+ <gllink-stub
+ class="js-commit-pipeline"
+ data-original-title="Commit: failed"
+ href="https://test.com/pipeline"
+ title=""
+ >
+ <ciicon-stub
+ aria-label="Commit: failed"
+ cssclasses=""
+ size="24"
+ status="[object Object]"
+ />
+ </gllink-stub>
+
+ <div
+ class="commit-sha-group d-flex"
+ >
+ <div
+ class="label label-monospace monospace"
+ >
+
+ 12345678
+
+ </div>
+
+ <clipboardbutton-stub
+ cssclass="btn-default"
+ text="123456789"
+ title="Copy commit SHA to clipboard"
+ tooltipplacement="bottom"
+ />
+ </div>
+ </div>
+ </div>
+</div>
+`;
+
+exports[`Repository last commit component renders the signature HTML as returned by the backend 1`] = `
+<div
+ class="info-well d-none d-sm-flex project-last-commit commit p-3"
+>
+ <useravatarlink-stub
+ class="avatar-cell"
+ imgalt=""
+ imgcssclasses=""
+ imgsize="40"
+ imgsrc="https://test.com"
+ linkhref="https://test.com/test"
+ tooltipplacement="top"
+ tooltiptext=""
+ username=""
+ />
+
+ <div
+ class="commit-detail flex-list"
+ >
+ <div
+ class="commit-content qa-commit-content"
+ >
+ <gllink-stub
+ class="commit-row-message item-title"
+ href="https://test.com/commit/123"
+ >
+
+ Commit title
+
+ </gllink-stub>
+
+ <!---->
+
+ <div
+ class="committer"
+ >
+ <gllink-stub
+ class="commit-author-link js-user-link"
+ href="https://test.com/test"
+ >
+
+ Test
+
+ </gllink-stub>
+
+ authored
+
+ <timeagotooltip-stub
+ cssclass=""
+ time="2019-01-01"
+ tooltipplacement="bottom"
+ />
+ </div>
+
+ <!---->
+ </div>
+
+ <div
+ class="commit-actions flex-row"
+ >
+ <div>
+ <button>
+ Verified
+ </button>
+ </div>
+
<gllink-stub
class="js-commit-pipeline"
data-original-title="Commit: failed"
diff --git a/spec/frontend/repository/components/last_commit_spec.js b/spec/frontend/repository/components/last_commit_spec.js
index 14479f3c3a4..01b56d453e6 100644
--- a/spec/frontend/repository/components/last_commit_spec.js
+++ b/spec/frontend/repository/components/last_commit_spec.js
@@ -107,4 +107,10 @@ describe('Repository last commit component', () => {
expect(vm.find('.commit-row-description').isVisible()).toBe(true);
expect(vm.find('.text-expander').classes('open')).toBe(true);
});
+
+ it('renders the signature HTML as returned by the backend', () => {
+ factory(createCommitData({ signatureHtml: '<button>Verified</button>' }));
+
+ expect(vm.element).toMatchSnapshot();
+ });
});