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 {
<gl-button @click="onCancel">{{ s__('Cancel') }}</gl-button>
<gl-button
:disabled="!canSubmit"
category="primary"
variant="warning"
category="secondary"
variant="danger"
@click="onSecondaryAction"
>
{{ 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`]
<gl-button-stub
buttontextclasses=""
category="primary"
category="secondary"
disabled="true"
icon=""
size="medium"
variant="warning"
variant="danger"
>
secondaryAction
......
......@@ -11,15 +11,15 @@ describe('User Operation confirmation modal', () => {
let wrapper;
let formSubmitSpy;
const findButton = (variant) =>
const findButton = (variant, category) =>
wrapper
.findAll(GlButton)
.filter((w) => w.attributes('variant') === variant)
.filter((w) => w.attributes('variant') === variant && w.attributes('category') === category)
.at(0);
const findForm = () => wrapper.find('form');
const findUsernameInput = () => wrapper.find(GlFormInput);
const findPrimaryButton = () => findButton('danger');
const findSecondaryButton = () => findButton('warning');
const findPrimaryButton = () => findButton('danger', 'primary');
const findSecondaryButton = () => findButton('danger', 'secondary');
const findAuthenticityToken = () => new FormData(findForm().element).get('authenticity_token');
const getUsername = () => findUsernameInput().attributes('value');
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