Commit 2aab7082 authored by Olena Horal-Koretska's avatar Olena Horal-Koretska

Merge branch 'jl-fix-compliance-frameworks-edit-loading' into 'master'

Fix compliance framework edit button loading on delete

See merge request gitlab-org/gitlab!56222
parents 9435be0e b848cedc
...@@ -50,7 +50,6 @@ export default { ...@@ -50,7 +50,6 @@ export default {
<div class="gl-display-flex"> <div class="gl-display-flex">
<gl-button <gl-button
v-gl-tooltip="$options.i18n.editFramework" v-gl-tooltip="$options.i18n.editFramework"
:loading="loading"
:disabled="loading" :disabled="loading"
:aria-label="$options.i18n.editFramework" :aria-label="$options.i18n.editFramework"
:href="framework.editPath" :href="framework.editPath"
......
...@@ -50,11 +50,6 @@ describe('ListItem', () => { ...@@ -50,11 +50,6 @@ describe('ListItem', () => {
expect(button.attributes('aria-label')).toBe(ariaLabel); expect(button.attributes('aria-label')).toBe(ariaLabel);
}; };
const disablesTheButton = (button) => {
expect(button.props('disabled')).toBe(true);
expect(button.props('loading')).toBe(true);
};
it('displays the description defined by the framework', () => { it('displays the description defined by the framework', () => {
createComponent(); createComponent();
...@@ -115,11 +110,17 @@ describe('ListItem', () => { ...@@ -115,11 +110,17 @@ describe('ListItem', () => {
}); });
it('disables the delete button and shows loading', () => { it('disables the delete button and shows loading', () => {
disablesTheButton(findDeleteButton()); const button = findDeleteButton();
expect(button.props('disabled')).toBe(true);
expect(button.props('loading')).toBe(true);
}); });
it('disables the edit button and shows loading', () => { it('disables the edit button and does not show loading', () => {
disablesTheButton(findEditButton()); const button = findEditButton();
expect(button.props('disabled')).toBe(true);
expect(button.props('loading')).toBe(false);
}); });
}); });
}); });
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