Commit 6f359a67 authored by Mark Florian's avatar Mark Florian

Merge branch 'dmishunov-update-clipboard-icon' into 'master'

Updated icon in copy-to-clipboard button

See merge request gitlab-org/gitlab!24146
parents 33ee7f25 58fd7975
...@@ -12,8 +12,7 @@ ...@@ -12,8 +12,7 @@
* css-class="btn-transparent" * css-class="btn-transparent"
* /> * />
*/ */
import { GlButton, GlTooltipDirective } from '@gitlab/ui'; import { GlButton, GlTooltipDirective, GlIcon } from '@gitlab/ui';
import Icon from '../components/icon.vue';
export default { export default {
name: 'ClipboardButton', name: 'ClipboardButton',
...@@ -22,7 +21,7 @@ export default { ...@@ -22,7 +21,7 @@ export default {
}, },
components: { components: {
GlButton, GlButton,
Icon, GlIcon,
}, },
props: { props: {
text: { text: {
...@@ -72,6 +71,6 @@ export default { ...@@ -72,6 +71,6 @@ export default {
:title="title" :title="title"
:data-clipboard-text="clipboardText" :data-clipboard-text="clipboardText"
> >
<icon name="duplicate" /> <gl-icon name="copy-to-clipboard" />
</gl-button> </gl-button>
</template> </template>
---
title: Updated icon for copy-to-clipboard button
merge_request: 24146
author:
type: other
...@@ -31,11 +31,10 @@ exports[`Package code instruction single line to match the default snapshot 1`] ...@@ -31,11 +31,10 @@ exports[`Package code instruction single line to match the default snapshot 1`]
type="button" type="button"
> >
<svg <svg
aria-hidden="true" class="gl-icon s16"
class="s16 ic-duplicate"
> >
<use <use
xlink:href="#duplicate" href="#copy-to-clipboard"
/> />
</svg> </svg>
</button> </button>
......
...@@ -90,11 +90,10 @@ exports[`Registry Project Empty state to match the default snapshot 1`] = ` ...@@ -90,11 +90,10 @@ exports[`Registry Project Empty state to match the default snapshot 1`] = `
type="button" type="button"
> >
<svg <svg
aria-hidden="true" class="gl-icon s16"
class="s16 ic-duplicate"
> >
<use <use
xlink:href="#duplicate" href="#copy-to-clipboard"
/> />
</svg> </svg>
</button> </button>
...@@ -128,11 +127,10 @@ exports[`Registry Project Empty state to match the default snapshot 1`] = ` ...@@ -128,11 +127,10 @@ exports[`Registry Project Empty state to match the default snapshot 1`] = `
type="button" type="button"
> >
<svg <svg
aria-hidden="true" class="gl-icon s16"
class="s16 ic-duplicate"
> >
<use <use
xlink:href="#duplicate" href="#copy-to-clipboard"
/> />
</svg> </svg>
</button> </button>
...@@ -158,11 +156,10 @@ exports[`Registry Project Empty state to match the default snapshot 1`] = ` ...@@ -158,11 +156,10 @@ exports[`Registry Project Empty state to match the default snapshot 1`] = `
type="button" type="button"
> >
<svg <svg
aria-hidden="true" class="gl-icon s16"
class="s16 ic-duplicate"
> >
<use <use
xlink:href="#duplicate" href="#copy-to-clipboard"
/> />
</svg> </svg>
</button> </button>
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlButton } from '@gitlab/ui'; import { GlButton, GlIcon } from '@gitlab/ui';
import ClipboardButton from '~/vue_shared/components/clipboard_button.vue'; import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
import Icon from '~/vue_shared/components/icon.vue';
describe('clipboard button', () => { describe('clipboard button', () => {
let wrapper; let wrapper;
...@@ -29,7 +28,7 @@ describe('clipboard button', () => { ...@@ -29,7 +28,7 @@ describe('clipboard button', () => {
it('renders a button for clipboard', () => { it('renders a button for clipboard', () => {
expect(wrapper.find(GlButton).exists()).toBe(true); expect(wrapper.find(GlButton).exists()).toBe(true);
expect(wrapper.attributes('data-clipboard-text')).toBe('copy me'); expect(wrapper.attributes('data-clipboard-text')).toBe('copy me');
expect(wrapper.find(Icon).props('name')).toBe('duplicate'); expect(wrapper.find(GlIcon).props('name')).toBe('copy-to-clipboard');
}); });
it('should have a tooltip with default values', () => { it('should have a tooltip with default values', () => {
......
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