Commit e2d24850 authored by Suzanne Selhorn's avatar Suzanne Selhorn Committed by Simon Knox

Updated gl-deprecated-button to gl-button

Related to: https://gitlab.com/gitlab-org/gitlab/-/issues/219815
parent 965ce095
<script> <script>
import { GlDeprecatedButton } from '@gitlab/ui'; import { GlButton } from '@gitlab/ui';
import { sprintf, __ } from '~/locale'; import { sprintf, __ } from '~/locale';
import UserAvatarLink from './user_avatar_link.vue'; import UserAvatarLink from './user_avatar_link.vue';
export default { export default {
components: { components: {
UserAvatarLink, UserAvatarLink,
GlDeprecatedButton, GlButton,
}, },
props: { props: {
items: { items: {
...@@ -82,12 +82,12 @@ export default { ...@@ -82,12 +82,12 @@ export default {
:img-size="imgSize" :img-size="imgSize"
/> />
<template v-if="hasBreakpoint"> <template v-if="hasBreakpoint">
<gl-deprecated-button v-if="hasHiddenItems" variant="link" @click="expand"> <gl-button v-if="hasHiddenItems" variant="link" @click="expand">
{{ expandText }} {{ expandText }}
</gl-deprecated-button> </gl-button>
<gl-deprecated-button v-else variant="link" @click="collapse"> <gl-button v-else variant="link" @click="collapse">
{{ __('show less') }} {{ __('show less') }}
</gl-deprecated-button> </gl-button>
</template> </template>
</div> </div>
</template> </template>
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlDeprecatedButton } from '@gitlab/ui'; import { GlButton } from '@gitlab/ui';
import { TEST_HOST } from 'spec/test_constants'; import { TEST_HOST } from 'spec/test_constants';
import UserAvatarList from '~/vue_shared/components/user_avatar/user_avatar_list.vue'; import UserAvatarList from '~/vue_shared/components/user_avatar/user_avatar_list.vue';
import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue'; import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue';
...@@ -37,7 +37,7 @@ describe('UserAvatarList', () => { ...@@ -37,7 +37,7 @@ describe('UserAvatarList', () => {
}; };
const clickButton = () => { const clickButton = () => {
const button = wrapper.find(GlDeprecatedButton); const button = wrapper.find(GlButton);
button.vm.$emit('click'); button.vm.$emit('click');
}; };
...@@ -112,7 +112,7 @@ describe('UserAvatarList', () => { ...@@ -112,7 +112,7 @@ describe('UserAvatarList', () => {
it('does not show button', () => { it('does not show button', () => {
factory(); factory();
expect(wrapper.find(GlDeprecatedButton).exists()).toBe(false); expect(wrapper.find(GlButton).exists()).toBe(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