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 @@
* css-class="btn-transparent"
* />
*/
import { GlButton, GlTooltipDirective } from '@gitlab/ui';
import Icon from '../components/icon.vue';
import { GlButton, GlTooltipDirective, GlIcon } from '@gitlab/ui';
export default {
name: 'ClipboardButton',
......@@ -22,7 +21,7 @@ export default {
},
components: {
GlButton,
Icon,
GlIcon,
},
props: {
text: {
......@@ -72,6 +71,6 @@ export default {
:title="title"
:data-clipboard-text="clipboardText"
>
<icon name="duplicate" />
<gl-icon name="copy-to-clipboard" />
</gl-button>
</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`]
type="button"
>
<svg
aria-hidden="true"
class="s16 ic-duplicate"
class="gl-icon s16"
>
<use
xlink:href="#duplicate"
href="#copy-to-clipboard"
/>
</svg>
</button>
......
......@@ -90,11 +90,10 @@ exports[`Registry Project Empty state to match the default snapshot 1`] = `
type="button"
>
<svg
aria-hidden="true"
class="s16 ic-duplicate"
class="gl-icon s16"
>
<use
xlink:href="#duplicate"
href="#copy-to-clipboard"
/>
</svg>
</button>
......@@ -128,11 +127,10 @@ exports[`Registry Project Empty state to match the default snapshot 1`] = `
type="button"
>
<svg
aria-hidden="true"
class="s16 ic-duplicate"
class="gl-icon s16"
>
<use
xlink:href="#duplicate"
href="#copy-to-clipboard"
/>
</svg>
</button>
......@@ -158,11 +156,10 @@ exports[`Registry Project Empty state to match the default snapshot 1`] = `
type="button"
>
<svg
aria-hidden="true"
class="s16 ic-duplicate"
class="gl-icon s16"
>
<use
xlink:href="#duplicate"
href="#copy-to-clipboard"
/>
</svg>
</button>
......
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 Icon from '~/vue_shared/components/icon.vue';
describe('clipboard button', () => {
let wrapper;
......@@ -29,7 +28,7 @@ describe('clipboard button', () => {
it('renders a button for clipboard', () => {
expect(wrapper.find(GlButton).exists()).toBe(true);
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', () => {
......
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