Commit 6c824a4b authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray

Convert gl-deprecated-button to gl-button in dropdown_header.vue

parent 881661c2
<script>
import { GlDeprecatedButton, GlIcon } from '@gitlab/ui';
import { GlButton } from '@gitlab/ui';
export default {
components: {
GlDeprecatedButton,
GlIcon,
GlButton,
},
};
</script>
......@@ -12,12 +11,11 @@ export default {
<template>
<div class="dropdown-title">
<span>{{ __('Assign epic') }}</span>
<gl-deprecated-button
<gl-button
:aria-label="__('Close')"
variant="link"
category="tertiary"
class="dropdown-title-button dropdown-menu-close"
>
<gl-icon name="close" />
</gl-deprecated-button>
icon="close"
/>
</div>
</template>
import { shallowMount } from '@vue/test-utils';
import { GlDeprecatedButton, GlIcon } from '@gitlab/ui';
import { GlButton } from '@gitlab/ui';
import DropdownHeader from 'ee/vue_shared/components/sidebar/epics_select/dropdown_header.vue';
describe('EpicsSelect', () => {
......@@ -25,20 +25,14 @@ describe('EpicsSelect', () => {
});
it('should render close button', () => {
const buttonEl = wrapper.find(GlDeprecatedButton);
const buttonEl = wrapper.find(GlButton);
expect(buttonEl.exists()).toBe(true);
expect(buttonEl.attributes('aria-label')).toBe('Close');
expect(buttonEl.classes()).toEqual(
expect.arrayContaining(['dropdown-title-button', 'dropdown-menu-close']),
);
});
it('should render close button icon', () => {
const iconEl = wrapper.find(GlDeprecatedButton).find(GlIcon);
expect(iconEl.exists()).toBe(true);
expect(iconEl.attributes('name')).toBe('close');
expect(buttonEl.props('icon')).toBe('close');
});
});
});
......
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