Commit 0d2b59a5 authored by Emily Ring's avatar Emily Ring Committed by Enrique Alcántara

Removed GlDeprecatedButton from enviro rollback

parent 2a6b4e45
...@@ -5,21 +5,13 @@ ...@@ -5,21 +5,13 @@
* *
* Makes a post request when the button is clicked. * Makes a post request when the button is clicked.
*/ */
import { import { GlTooltipDirective, GlModalDirective, GlButton } from '@gitlab/ui';
GlTooltipDirective,
GlLoadingIcon,
GlModalDirective,
GlDeprecatedButton,
GlIcon,
} from '@gitlab/ui';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import eventHub from '../event_hub'; import eventHub from '../event_hub';
export default { export default {
components: { components: {
GlIcon, GlButton,
GlLoadingIcon,
GlDeprecatedButton,
}, },
directives: { directives: {
GlTooltip: GlTooltipDirective, GlTooltip: GlTooltipDirective,
...@@ -73,15 +65,13 @@ export default { ...@@ -73,15 +65,13 @@ export default {
}; };
</script> </script>
<template> <template>
<gl-deprecated-button <gl-button
v-gl-tooltip v-gl-tooltip
v-gl-modal.confirm-rollback-modal v-gl-modal.confirm-rollback-modal
:disabled="isLoading" class="gl-display-none gl-display-md-block text-secondary"
:loading="isLoading"
:title="title" :title="title"
class="d-none d-md-block text-secondary" :icon="isLastDeployment ? 'repeat' : 'redo'"
@click="onClick" @click="onClick"
> />
<gl-icon v-if="isLastDeployment" name="repeat" /> <gl-icon v-else name="redo" />
<gl-loading-icon v-if="isLoading" />
</gl-deprecated-button>
</template> </template>
import { shallowMount, mount } from '@vue/test-utils'; import { shallowMount, mount } from '@vue/test-utils';
import { GlDeprecatedButton } from '@gitlab/ui'; import { GlButton } from '@gitlab/ui';
import eventHub from '~/environments/event_hub'; import eventHub from '~/environments/event_hub';
import RollbackComponent from '~/environments/components/environment_rollback.vue'; import RollbackComponent from '~/environments/components/environment_rollback.vue';
...@@ -40,7 +40,7 @@ describe('Rollback Component', () => { ...@@ -40,7 +40,7 @@ describe('Rollback Component', () => {
}, },
}, },
}); });
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