Commit 8883c078 authored by Nathan Friend's avatar Nathan Friend

Merge branch...

Merge branch '219788-replace-gl-deprecated-button-with-gl-button-in-app-assets-javascripts-environments' into 'master'

Resolve "Migrate environments pin button"

Closes #219788

See merge request gitlab-org/gitlab!38891
parents 2fc53516 9fd28935
......@@ -3,14 +3,14 @@
* Renders a prevent auto-stop button.
* Used in environments table.
*/
import { GlDeprecatedButton, GlTooltipDirective, GlIcon } from '@gitlab/ui';
import { GlButton, GlTooltipDirective, GlIcon } from '@gitlab/ui';
import { __ } from '~/locale';
import eventHub from '../event_hub';
export default {
components: {
GlIcon,
GlDeprecatedButton,
GlButton,
},
directives: {
GlTooltip: GlTooltipDirective,
......@@ -30,12 +30,7 @@ export default {
};
</script>
<template>
<gl-deprecated-button
v-gl-tooltip
:title="$options.title"
:aria-label="$options.title"
@click="onPinClick"
>
<gl-button v-gl-tooltip :title="$options.title" :aria-label="$options.title" @click="onPinClick">
<gl-icon name="thumbtack" />
</gl-deprecated-button>
</gl-button>
</template>
---
title: Migrate environments pin button
merge_request: 38891
author: George Tsiolis
type: changed
import { shallowMount } from '@vue/test-utils';
import { GlDeprecatedButton, GlIcon } from '@gitlab/ui';
import { GlButton, GlIcon } from '@gitlab/ui';
import eventHub from '~/environments/event_hub';
import PinComponent from '~/environments/components/environment_pin.vue';
......@@ -36,7 +36,7 @@ describe('Pin Component', () => {
it('should emit onPinClick when clicked', () => {
const eventHubSpy = jest.spyOn(eventHub, '$emit');
const button = wrapper.find(GlDeprecatedButton);
const button = wrapper.find(GlButton);
button.vm.$emit('click');
......
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