Commit 893ac87f authored by Nathan Friend's avatar Nathan Friend

Merge branch '219835-migrate-admin-delete-user-buttons' into 'master'

Migrate deprecated buttons from admin delete user modal

Closes #219835

See merge request gitlab-org/gitlab!39132
parents 92a6b48c 87bf67c5
<script>
import { escape } from 'lodash';
import { GlModal, GlDeprecatedButton, GlFormInput } from '@gitlab/ui';
import { GlModal, GlButton, GlFormInput } from '@gitlab/ui';
import { s__, sprintf } from '~/locale';
export default {
components: {
GlModal,
GlDeprecatedButton,
GlButton,
GlFormInput,
},
props: {
......@@ -122,15 +122,18 @@ export default {
</form>
</template>
<template #modal-footer>
<gl-deprecated-button variant="secondary" @click="onCancel">{{
s__('Cancel')
}}</gl-deprecated-button>
<gl-deprecated-button :disabled="!canSubmit" variant="warning" @click="onSecondaryAction">
<gl-button @click="onCancel">{{ s__('Cancel') }}</gl-button>
<gl-button
:disabled="!canSubmit"
category="primary"
variant="warning"
@click="onSecondaryAction"
>
{{ secondaryAction }}
</gl-deprecated-button>
<gl-deprecated-button :disabled="!canSubmit" variant="danger" @click="onSubmit">{{
</gl-button>
<gl-button :disabled="!canSubmit" category="primary" variant="danger" @click="onSubmit">{{
action
}}</gl-deprecated-button>
}}</gl-button>
</template>
</gl-modal>
</template>
......@@ -37,29 +37,35 @@ exports[`User Operation confirmation modal renders modal with form included 1`]
value=""
/>
</form>
<gl-deprecated-button-stub
size="md"
variant="secondary"
<gl-button-stub
category="tertiary"
icon=""
size="medium"
variant="default"
>
Cancel
</gl-deprecated-button-stub>
</gl-button-stub>
<gl-deprecated-button-stub
<gl-button-stub
category="primary"
disabled="true"
size="md"
icon=""
size="medium"
variant="warning"
>
secondaryAction
</gl-deprecated-button-stub>
</gl-button-stub>
<gl-deprecated-button-stub
<gl-button-stub
category="primary"
disabled="true"
size="md"
icon=""
size="medium"
variant="danger"
>
action
</gl-deprecated-button-stub>
</gl-button-stub>
</div>
`;
import { shallowMount } from '@vue/test-utils';
import { GlDeprecatedButton, GlFormInput } from '@gitlab/ui';
import { GlButton, GlFormInput } from '@gitlab/ui';
import DeleteUserModal from '~/pages/admin/users/components/delete_user_modal.vue';
import ModalStub from './stubs/modal_stub';
......@@ -13,7 +13,7 @@ describe('User Operation confirmation modal', () => {
const findButton = variant =>
wrapper
.findAll(GlDeprecatedButton)
.findAll(GlButton)
.filter(w => w.attributes('variant') === variant)
.at(0);
const findForm = () => wrapper.find('form');
......
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