Commit 70266874 authored by Fernando Arias's avatar Fernando Arias

Add test assertions for testing corpus refetch on delete

* Add test assertions
parent 3c907b53
......@@ -203,11 +203,22 @@ describe('EE - CorpusManagement', () => {
});
await waitForPromises();
expect(getCorpusesQueryRequestHandler).toHaveBeenCalledTimes(1);
const corpusTable = wrapper.findComponent(CorpusTable);
corpusTable.vm.$emit('delete', mutationVars.input.id);
await waitForPromises();
expect(deleteCorpusMutationHandler).toHaveBeenCalledWith(mutationVars);
expect(getCorpusesQueryRequestHandler).toHaveBeenCalledTimes(2);
expect(getCorpusesQueryRequestHandler).toHaveBeenNthCalledWith(2, {
afterCursor: '',
beforeCursor: '',
firstPageSize: 10,
lastPageSize: null,
projectPath: '/namespace/project',
});
});
});
});
......
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