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