Commit 39a7ee12 authored by Scott Hampton's avatar Scott Hampton

Merge branch '326038-delete-user-modal' into 'master'

Deprecate btn-warning on admin area delete user modal

See merge request gitlab-org/gitlab!57761
parents 849b2a76 b5222c4a
...@@ -119,8 +119,8 @@ export default { ...@@ -119,8 +119,8 @@ export default {
<gl-button @click="onCancel">{{ s__('Cancel') }}</gl-button> <gl-button @click="onCancel">{{ s__('Cancel') }}</gl-button>
<gl-button <gl-button
:disabled="!canSubmit" :disabled="!canSubmit"
category="primary" category="secondary"
variant="warning" variant="danger"
@click="onSecondaryAction" @click="onSecondaryAction"
> >
{{ secondaryAction }} {{ secondaryAction }}
......
---
title: Deprecate btn-warning on admin area delete user modal
merge_request: 57761
author:
type: changed
...@@ -50,11 +50,11 @@ exports[`User Operation confirmation modal renders modal with form included 1`] ...@@ -50,11 +50,11 @@ exports[`User Operation confirmation modal renders modal with form included 1`]
<gl-button-stub <gl-button-stub
buttontextclasses="" buttontextclasses=""
category="primary" category="secondary"
disabled="true" disabled="true"
icon="" icon=""
size="medium" size="medium"
variant="warning" variant="danger"
> >
secondaryAction secondaryAction
......
...@@ -11,15 +11,15 @@ describe('User Operation confirmation modal', () => { ...@@ -11,15 +11,15 @@ describe('User Operation confirmation modal', () => {
let wrapper; let wrapper;
let formSubmitSpy; let formSubmitSpy;
const findButton = (variant) => const findButton = (variant, category) =>
wrapper wrapper
.findAll(GlButton) .findAll(GlButton)
.filter((w) => w.attributes('variant') === variant) .filter((w) => w.attributes('variant') === variant && w.attributes('category') === category)
.at(0); .at(0);
const findForm = () => wrapper.find('form'); const findForm = () => wrapper.find('form');
const findUsernameInput = () => wrapper.find(GlFormInput); const findUsernameInput = () => wrapper.find(GlFormInput);
const findPrimaryButton = () => findButton('danger'); const findPrimaryButton = () => findButton('danger', 'primary');
const findSecondaryButton = () => findButton('warning'); const findSecondaryButton = () => findButton('danger', 'secondary');
const findAuthenticityToken = () => new FormData(findForm().element).get('authenticity_token'); const findAuthenticityToken = () => new FormData(findForm().element).get('authenticity_token');
const getUsername = () => findUsernameInput().attributes('value'); const getUsername = () => findUsernameInput().attributes('value');
const getMethodParam = () => new FormData(findForm().element).get('_method'); const getMethodParam = () => new FormData(findForm().element).get('_method');
......
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