Commit d3b50723 authored by Marcia Ramos's avatar Marcia Ramos Committed by Natalia Tepluhina

Migrate button in ingress_modsecurity_settings.vue

parent 19a0c69e
...@@ -5,7 +5,7 @@ import { ...@@ -5,7 +5,7 @@ import {
GlSprintf, GlSprintf,
GlLink, GlLink,
GlToggle, GlToggle,
GlDeprecatedButton, GlButton,
GlDeprecatedDropdown, GlDeprecatedDropdown,
GlDeprecatedDropdownItem, GlDeprecatedDropdownItem,
GlIcon, GlIcon,
...@@ -25,7 +25,7 @@ export default { ...@@ -25,7 +25,7 @@ export default {
GlSprintf, GlSprintf,
GlLink, GlLink,
GlToggle, GlToggle,
GlDeprecatedButton, GlButton,
GlDeprecatedDropdown, GlDeprecatedDropdown,
GlDeprecatedDropdownItem, GlDeprecatedDropdownItem,
GlIcon, GlIcon,
...@@ -232,18 +232,24 @@ export default { ...@@ -232,18 +232,24 @@ export default {
</gl-deprecated-dropdown> </gl-deprecated-dropdown>
</div> </div>
</div> </div>
<div v-if="showButtons" class="mt-3"> <div v-if="showButtons" class="gl-mt-5 gl-display-flex">
<gl-deprecated-button <gl-button
class="btn-success inline mr-1" variant="success"
category="primary"
data-qa-selector="save_ingress_modsecurity_settings"
:loading="saving" :loading="saving"
:disabled="saveButtonDisabled" :disabled="saveButtonDisabled"
@click="updateApplication" @click="updateApplication"
> >
{{ saveButtonLabel }} {{ saveButtonLabel }}
</gl-deprecated-button> </gl-button>
<gl-deprecated-button :disabled="saveButtonDisabled" @click="resetStatus"> <gl-button
data-qa-selector="cancel_ingress_modsecurity_settings"
:disabled="saveButtonDisabled"
@click="resetStatus"
>
{{ __('Cancel') }} {{ __('Cancel') }}
</gl-deprecated-button> </gl-button>
</div> </div>
</div> </div>
</div> </div>
......
---
title: Migrate deprecated button to GlButton in ingress_modsecurity_settings.vue
merge_request: 43717
author:
type: other
...@@ -28,8 +28,10 @@ describe('IngressModsecuritySettings', () => { ...@@ -28,8 +28,10 @@ describe('IngressModsecuritySettings', () => {
}); });
}; };
const findSaveButton = () => wrapper.find('.btn-success'); const findSaveButton = () =>
const findCancelButton = () => wrapper.find('[variant="secondary"]'); wrapper.find('[data-qa-selector="save_ingress_modsecurity_settings"]');
const findCancelButton = () =>
wrapper.find('[data-qa-selector="cancel_ingress_modsecurity_settings"]');
const findModSecurityToggle = () => wrapper.find(GlToggle); const findModSecurityToggle = () => wrapper.find(GlToggle);
const findModSecurityDropdown = () => wrapper.find(GlDeprecatedDropdown); const findModSecurityDropdown = () => wrapper.find(GlDeprecatedDropdown);
......
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