Commit c914e755 authored by Robert Hunt's avatar Robert Hunt

Replace epics add clear button FA icon with GlIcon close

parent a8ce0ddb
......@@ -9,12 +9,13 @@ export default {
</script>
<template>
<div class="dropdown-title">
<span>{{ __('Assign epic') }}</span>
<div class="dropdown-title gl-display-flex gl-align-items-center">
<span class="gl-ml-auto">{{ __('Assign epic') }}</span>
<gl-button
:aria-label="__('Close')"
category="tertiary"
class="dropdown-title-button dropdown-menu-close"
class="dropdown-title-button dropdown-menu-close gl-ml-auto"
size="small"
icon="close"
/>
</div>
......
<script>
import { debounce } from 'lodash';
import { GlDeprecatedButton, GlIcon } from '@gitlab/ui';
import { GlButton, GlIcon } from '@gitlab/ui';
import autofocusonshow from '~/vue_shared/directives/autofocusonshow';
export default {
components: {
GlDeprecatedButton,
GlButton,
GlIcon,
},
directives: {
......@@ -40,9 +40,10 @@ export default {
@keyup="handleKeyUp"
/>
<gl-icon v-show="!query" name="search" />
<gl-deprecated-button
<gl-button
variant="link"
class="fa fa-times dropdown-input-clear js-dropdown-input-clear"
icon="close"
class="dropdown-input-clear js-dropdown-input-clear"
data-hidden="true"
@click.stop="handleInputClear"
/>
......
import { shallowMount } from '@vue/test-utils';
import { GlDeprecatedButton, GlIcon } from '@gitlab/ui';
import { GlButton, GlIcon } from '@gitlab/ui';
import DropdownSearchInput from 'ee/vue_shared/components/sidebar/epics_select/dropdown_search_input.vue';
const createComponent = () =>
......@@ -96,16 +96,11 @@ describe('EpicsSelect', () => {
});
it('should render input clear button', () => {
const clearButtonEl = wrapper.find(GlDeprecatedButton);
const clearButtonEl = wrapper.find(GlButton);
expect(clearButtonEl.exists()).toBe(true);
expect(clearButtonEl.classes()).toEqual(
expect.arrayContaining([
'fa',
'fa-times',
'dropdown-input-clear',
'js-dropdown-input-clear',
]),
expect.arrayContaining(['dropdown-input-clear', 'js-dropdown-input-clear']),
);
});
});
......
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