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