Commit b848cedc authored by Jiaan Louw's avatar Jiaan Louw Committed by Olena Horal-Koretska

Fix compliance framework edit btn loading

This resolves a small bug where the compliance frameworks
edit button would show loading when the framework is
being deleted.
parent eb17d3ce
......@@ -50,7 +50,6 @@ export default {
<div class="gl-display-flex">
<gl-button
v-gl-tooltip="$options.i18n.editFramework"
:loading="loading"
:disabled="loading"
:aria-label="$options.i18n.editFramework"
:href="framework.editPath"
......
......@@ -50,11 +50,6 @@ describe('ListItem', () => {
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', () => {
createComponent();
......@@ -115,11 +110,17 @@ describe('ListItem', () => {
});
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', () => {
disablesTheButton(findEditButton());
it('disables the edit button and does not show loading', () => {
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