Ensure request is pending in specs

parent f3211f3d
......@@ -40,6 +40,8 @@ describe('DastSiteValidationModal', () => {
let wrapper;
let requestHandlers;
const pendingHandler = jest.fn(() => new Promise(() => {}));
const componentFactory = (mountFn = shallowMount) => ({
mountOptions = {},
handlers = {},
......@@ -109,7 +111,11 @@ describe('DastSiteValidationModal', () => {
describe('rendering', () => {
describe('loading', () => {
beforeEach(() => {
createFullComponent();
createFullComponent({
handlers: {
dastSiteTokenCreate: pendingHandler,
},
});
});
it('renders a skeleton loader, no alert and no form group while token is being created', () => {
......
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