Commit ef304611 authored by Stan Hu's avatar Stan Hu

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
parent 4d875a2b
......@@ -129,7 +129,7 @@ export default {
</strong>
</div>
<div>
<small class="commit-sha"> {{ version.truncated_commit_sha }} </small>
<small class="commit-sha"> {{ version.short_commit_sha }} </small>
</div>
<div>
<small>
......
---
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
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
expect(page).to have_content '5 changed files'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment