Commit 221bf1d4 authored by Mike Jang's avatar Mike Jang Committed by Sarah Groff Hennigh-Palermo

Update deprecated button for project.vue

parent f2c27366
<script>
import { GlDeprecatedButton, GlLink, GlIcon } from '@gitlab/ui';
import { GlButton, GlLink, GlIcon } from '@gitlab/ui';
import ProjectAvatar from '~/vue_shared/components/project_avatar/default.vue';
import { numberToHumanSize, isOdd } from '~/lib/utils/number_utils';
import { s__ } from '~/locale';
......@@ -8,7 +8,7 @@ import StorageRow from './storage_row.vue';
export default {
components: {
GlIcon,
GlDeprecatedButton,
GlButton,
GlLink,
ProjectAvatar,
StorageRow,
......@@ -87,13 +87,14 @@ export default {
<div class="table-section section-wrap section-70 text-truncate" role="gridcell">
<div class="table-mobile-header font-weight-bold" role="rowheader">{{ __('Project') }}</div>
<div class="table-mobile-content">
<gl-deprecated-button
<gl-button
class="btn-transparent float-left p-0 mr-2"
:aria-label="__('Toggle project')"
category="tertiary"
@click="toggleProject"
>
<gl-icon :name="iconName" class="folder-icon" />
</gl-deprecated-button>
</gl-button>
<project-avatar :project="projectAvatar" :size="20" />
......
import { shallowMount } from '@vue/test-utils';
import { GlDeprecatedButton } from '@gitlab/ui';
import { GlButton } from '@gitlab/ui';
import Project from 'ee/storage_counter/components/project.vue';
import ProjectAvatar from '~/vue_shared/components/project_avatar/default.vue';
import { numberToHumanSize } from '~/lib/utils/number_utils';
......@@ -54,11 +54,11 @@ describe('Storage Counter project component', () => {
it('toggles isOpen', () => {
expect(wrapper.vm.isOpen).toEqual(false);
wrapper.find(GlDeprecatedButton).vm.$emit('click');
wrapper.find(GlButton).vm.$emit('click');
expect(wrapper.vm.isOpen).toEqual(true);
wrapper.find(GlDeprecatedButton).vm.$emit('click');
wrapper.find(GlButton).vm.$emit('click');
expect(wrapper.vm.isOpen).toEqual(false);
});
......
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