Commit 22f2879b authored by Fatih Acet's avatar Fatih Acet

Merge branch 'MaxWinterstein-unify-copy-comit-sha' into 'master'

Unify behaviour of 'Copy commit SHA to clipboard' on job view

Closes #58343

See merge request gitlab-org/gitlab-ce!25829
parents 61b2f70f fbf638a4
...@@ -39,7 +39,7 @@ export default { ...@@ -39,7 +39,7 @@ export default {
</gl-link> </gl-link>
<clipboard-button <clipboard-button
:text="commit.short_id" :text="commit.id"
:title="__('Copy commit SHA to clipboard')" :title="__('Copy commit SHA to clipboard')"
css-class="btn btn-clipboard btn-transparent" css-class="btn btn-clipboard btn-transparent"
/> />
......
---
title: Unify behaviour of 'Copy commit SHA to clipboard' to use full commit SHA.
merge_request: 25829
author: Max Winterstein
type: changed
...@@ -9,6 +9,7 @@ describe('Commit block', () => { ...@@ -9,6 +9,7 @@ describe('Commit block', () => {
const props = { const props = {
commit: { commit: {
short_id: '1f0fb84f', short_id: '1f0fb84f',
id: '1f0fb84fb6770d74d97eee58118fd3909cd4f48c',
commit_path: 'commit/1f0fb84fb6770d74d97eee58118fd3909cd4f48c', commit_path: 'commit/1f0fb84fb6770d74d97eee58118fd3909cd4f48c',
title: 'Update README.md', title: 'Update README.md',
}, },
...@@ -42,7 +43,7 @@ describe('Commit block', () => { ...@@ -42,7 +43,7 @@ describe('Commit block', () => {
it('renders clipboard button', () => { it('renders clipboard button', () => {
expect(vm.$el.querySelector('button').getAttribute('data-clipboard-text')).toEqual( expect(vm.$el.querySelector('button').getAttribute('data-clipboard-text')).toEqual(
props.commit.short_id, props.commit.id,
); );
}); });
}); });
......
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