Commit 5055a201 authored by Nathan Friend's avatar Nathan Friend

Merge branch 'ar-deprecated-strategy-button-with-gl-button-feature-flags' into 'master'

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

Closes #219825

See merge request gitlab-org/gitlab!38966
parents d7d65763 64764dc9
......@@ -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,
......@@ -212,7 +212,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([[]]);
});
});
......
......@@ -10684,9 +10684,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