Commit 1e64d9a0 authored by Savas Vedova's avatar Savas Vedova

Add loading spinner to submit button

parent 5e885455
......@@ -225,7 +225,7 @@ export default {
type="submit"
variant="confirm"
class="js-no-auto-disable gl-mr-3"
:disabled="submitting"
:loading="submitting"
>{{ $options.i18n.submitVulnerability }}</gl-button
>
<gl-button
......
......@@ -123,6 +123,8 @@ describe('New vulnerability component', () => {
findSectionDetails().vm.$emit('change', inputs.sectionDetails);
findSectionSolution().vm.$emit('change', inputs.sectionSolution);
findForm().vm.$emit('submit', { preventDefault: jest.fn() });
await nextTick();
expect(findSubmitButton().props('loading')).toBe(true);
await waitForPromises();
};
......
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