Commit bf3ddd20 authored by Sarah Groff Hennigh-Palermo's avatar Sarah Groff Hennigh-Palermo

Merge branch 'mjang-update-deprecated-project-vue' into 'master'

Update deprecated button for project.vue

Closes #219826

See merge request gitlab-org/gitlab!40168
parents 1d927563 221bf1d4
<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