Commit 64764dc9 authored by Austin Regnery's avatar Austin Regnery Committed by Nathan Friend

Replace <gl-deprecated-button> with <gl-button> in strategy.vue

parent bb1405a1
......@@ -7,8 +7,7 @@ import {
GlFormTextarea,
GlFormGroup,
GlToken,
GlDeprecatedButton,
GlIcon,
GlButton,
} from '@gitlab/ui';
import { s__, __ } from '~/locale';
import {
......@@ -28,8 +27,7 @@ export default {
GlFormTextarea,
GlFormSelect,
GlToken,
GlDeprecatedButton,
GlIcon,
GlButton,
NewEnvironmentsDropdown,
},
model: {
......@@ -64,7 +62,6 @@ export default {
translations: {
allEnvironments: __('All environments'),
environmentsLabel: __('Environments'),
removeLabel: s__('FeatureFlag|Delete strategy'),
rolloutPercentageDescription: __('Enter a whole number between 0 and 100'),
rolloutPercentageInvalid: s__(
'FeatureFlags|Percent rollout must be a whole number between 0 and 100',
......@@ -269,16 +266,12 @@ export default {
</div>
<div class="align-self-end align-self-md-stretch order-first offset-md-0 order-md-0 ml-auto">
<gl-deprecated-button
<gl-button
data-testid="delete-strategy-button"
variant="danger"
icon="remove"
@click="$emit('delete')"
>
<span class="d-md-none">
{{ $options.translations.removeLabel }}
</span>
<gl-icon class="d-none d-md-inline-flex" name="remove" />
</gl-deprecated-button>
/>
</div>
</div>
<div class="flex flex-column">
......
import { shallowMount } from '@vue/test-utils';
import { GlFormSelect, GlFormTextarea, GlFormInput, GlToken, GlDeprecatedButton } from '@gitlab/ui';
import { GlFormSelect, GlFormTextarea, GlFormInput, GlToken, GlButton } from '@gitlab/ui';
import {
PERCENT_ROLLOUT_GROUP_ID,
ROLLOUT_STRATEGY_ALL_USERS,
......@@ -204,7 +204,7 @@ describe('Feature flags strategy', () => {
});
it('should emit a delete if the delete button is clicked', () => {
wrapper.find(GlDeprecatedButton).vm.$emit('click');
wrapper.find(GlButton).vm.$emit('click');
expect(wrapper.emitted('delete')).toEqual([[]]);
});
});
......
......@@ -10639,9 +10639,6 @@ msgstr ""
msgid "FeatureFlags|User List"
msgstr ""
msgid "FeatureFlag|Delete strategy"
msgstr ""
msgid "FeatureFlag|List"
msgstr ""
......
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