Fix commit SHA not showing in merge request compare dropdown
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/17011 in GitLab 11.1 refactored the merge request diff comparison functionality but omitted the commit SHA due to a change in the API (truncated_commit_sha -> short_commit_sha). Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/55822
This commit is contained in:
parent
4d875a2bc3
commit
ef304611ad
3 changed files with 17 additions and 1 deletions
|
@ -129,7 +129,7 @@ export default {
|
||||||
</strong>
|
</strong>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<small class="commit-sha"> {{ version.truncated_commit_sha }} </small>
|
<small class="commit-sha"> {{ version.short_commit_sha }} </small>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<small>
|
<small>
|
||||||
|
|
5
changelogs/unreleased/sh-fix-issue-55822.yml
Normal file
5
changelogs/unreleased/sh-fix-issue-55822.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Fix commit SHA not showing in merge request compare dropdown
|
||||||
|
merge_request: 24084
|
||||||
|
author:
|
||||||
|
type: fixed
|
|
@ -64,6 +64,17 @@ describe 'Merge request > User sees versions', :js do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'shows the commit SHAs for every version in the dropdown' do
|
||||||
|
page.within '.mr-version-dropdown' do
|
||||||
|
find('.btn-default').click
|
||||||
|
|
||||||
|
page.within('.dropdown-content') do
|
||||||
|
shas = merge_request.merge_request_diffs.map { |diff| Commit.truncate_sha(diff.head_commit_sha) }
|
||||||
|
shas.each { |sha| expect(page).to have_content(sha) }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
it 'shows comments that were last relevant at that version' do
|
it 'shows comments that were last relevant at that version' do
|
||||||
expect(page).to have_content '5 changed files'
|
expect(page).to have_content '5 changed files'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue