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