Commit 7ae9d9c2 authored by Matej Latin's avatar Matej Latin Committed by Olena Horal-Koretska

Replace deprecated button on related items

parent 0cb7e8cb
......@@ -5,7 +5,7 @@ import {
GlModalDirective,
GlLink,
GlIcon,
GlDeprecatedButton,
GlButton,
GlTooltip,
} from '@gitlab/ui';
import { isEmpty } from 'lodash';
......@@ -30,7 +30,7 @@ export default {
GlIcon,
GlLink,
GlTooltip,
GlDeprecatedButton,
GlButton,
StateTooltip,
ItemMilestone,
ItemAssignees,
......@@ -284,17 +284,18 @@ export default {
</div>
</div>
<gl-deprecated-button
<gl-button
v-if="parentItem.userPermissions.adminEpic"
v-gl-tooltip.hover
v-gl-modal-directive="$options.itemRemoveModalId"
category="tertiary"
:title="__('Remove')"
:aria-label="__('Remove')"
:disabled="itemActionInProgress"
class="btn-svg btn-item-remove js-issue-item-remove-button qa-remove-issue-button gl-align-self-start"
icon="close"
class="js-issue-item-remove-button qa-remove-issue-button gl-align-self-start"
@click="handleRemoveClick"
>
<gl-icon name="close" class="btn-item-remove-icon" />
</gl-deprecated-button>
/>
<span v-if="showEmptySpacer" class="gl-p-3"></span>
</div>
</div>
......
import { shallowMount, createLocalVue } from '@vue/test-utils';
import Vuex from 'vuex';
import { GlDeprecatedButton, GlLink, GlIcon } from '@gitlab/ui';
import { GlButton, GlLink, GlIcon } from '@gitlab/ui';
import ItemWeight from 'ee/boards/components/issue_card_weight.vue';
......@@ -358,7 +358,7 @@ describe('RelatedItemsTree', () => {
});
it('renders item remove button when `item.userPermissions.adminEpic` is true', () => {
const removeButton = wrapper.find(GlDeprecatedButton);
const removeButton = wrapper.find(GlButton);
expect(removeButton.isVisible()).toBe(true);
expect(removeButton.attributes('title')).toBe('Remove');
......
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