Commit 7c540670 authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Merge branch '222346-fix-delete-button-spinner' into 'master'

Fix vulnerability comment delete button spinner position

See merge request gitlab-org/gitlab!40681
parents 4b56bc52 93b7ce26
<script> <script>
/* eslint-disable vue/no-v-html */ /* eslint-disable vue/no-v-html */
import { GlDeprecatedButton, GlButton, GlLoadingIcon } from '@gitlab/ui'; import { GlDeprecatedButton, GlButton } from '@gitlab/ui';
import EventItem from 'ee/vue_shared/security_reports/components/event_item.vue'; import EventItem from 'ee/vue_shared/security_reports/components/event_item.vue';
import { deprecatedCreateFlash as createFlash } from '~/flash'; import { deprecatedCreateFlash as createFlash } from '~/flash';
import { __, s__ } from '~/locale'; import { __, s__ } from '~/locale';
...@@ -13,7 +13,6 @@ export default { ...@@ -13,7 +13,6 @@ export default {
GlButton, GlButton,
EventItem, EventItem,
HistoryCommentEditor, HistoryCommentEditor,
GlLoadingIcon,
}, },
props: { props: {
...@@ -161,10 +160,9 @@ export default { ...@@ -161,10 +160,9 @@ export default {
<gl-button <gl-button
ref="confirmDeleteButton" ref="confirmDeleteButton"
variant="danger" variant="danger"
:disabled="isDeletingComment" :loading="isDeletingComment"
@click="deleteComment" @click="deleteComment"
> >
<gl-loading-icon v-if="isDeletingComment" class="mr-1" />
{{ __('Delete') }} {{ __('Delete') }}
</gl-button> </gl-button>
<gl-button <gl-button
......
---
title: Fix vulnerability comment delete button spinner position
merge_request: 40681
author:
type: fixed
...@@ -196,8 +196,8 @@ describe('History Comment', () => { ...@@ -196,8 +196,8 @@ describe('History Comment', () => {
return wrapper.vm.$nextTick(); return wrapper.vm.$nextTick();
}) })
.then(() => { .then(() => {
expect(confirmDeleteButton().attributes('disabled')).toBeTruthy(); expect(confirmDeleteButton().props('loading')).toBe(true);
expect(cancelDeleteButton().attributes('disabled')).toBeTruthy(); expect(cancelDeleteButton().props('disabled')).toBe(true);
return axios.waitForAll(); return axios.waitForAll();
}) })
.then(() => { .then(() => {
......
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