Commit 074cf0b8 authored by v_mishra's avatar v_mishra

Replacing deprecated button for showing tree items

parent a805355a
<script>
import { mapGetters, mapActions, mapState } from 'vuex';
import { GlTooltipDirective, GlLoadingIcon, GlDeprecatedButton, GlIcon } from '@gitlab/ui';
import { GlTooltipDirective, GlLoadingIcon, GlButton, GlIcon } from '@gitlab/ui';
import { __ } from '~/locale';
......@@ -15,7 +15,7 @@ export default {
GlIcon,
TreeItemBody,
GlLoadingIcon,
GlDeprecatedButton,
GlButton,
},
directives: {
GlTooltip: GlTooltipDirective,
......@@ -85,7 +85,7 @@ export default {
}"
>
<div class="list-item-body d-flex align-items-center">
<gl-deprecated-button
<gl-button
v-if="!childrenFetchInProgress && hasChildren"
v-gl-tooltip.viewport.hover
:title="chevronTooltip"
......@@ -95,7 +95,7 @@ export default {
@click="handleChevronClick"
>
<gl-icon :name="chevronType" />
</gl-deprecated-button>
</gl-button>
<gl-loading-icon v-if="childrenFetchInProgress" class="loading-icon" size="sm" />
<tree-item-body
class="tree-item-row"
......
import { shallowMount, createLocalVue } from '@vue/test-utils';
import Vuex from 'vuex';
import { GlDeprecatedButton, GlLoadingIcon, GlIcon } from '@gitlab/ui';
import { GlButton, GlLoadingIcon, GlIcon } from '@gitlab/ui';
import TreeItem from 'ee/related_items_tree/components/tree_item.vue';
import TreeItemBody from 'ee/related_items_tree/components/tree_item_body.vue';
......@@ -132,14 +132,14 @@ describe('RelatedItemsTree', () => {
});
it('renders expand/collapse button', () => {
const chevronButton = wrapper.find(GlDeprecatedButton);
const chevronButton = wrapper.find(GlButton);
expect(chevronButton.isVisible()).toBe(true);
expect(chevronButton.attributes('title')).toBe('Collapse');
});
it('has the proper class on the expand/collapse button to avoid dragging', () => {
const chevronButton = wrapper.find(GlDeprecatedButton);
const chevronButton = wrapper.find(GlButton);
expect(chevronButton.attributes('class')).toContain(treeItemChevronBtnClassName);
});
......
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