correct unittest front-end #1776

This commit is contained in:
Laurent GAY
2025-06-25 12:00:26 +02:00
parent 7ceb631518
commit 469f43f417
6 changed files with 27 additions and 54 deletions

View File

@@ -139,9 +139,9 @@ describe("ParticipationWithoutAccount", () => {
await flushPromises();
expect(requestHandlers.joinEventMutationHandler).toHaveBeenCalledWith({
...joinEventMock,
});
expect(requestHandlers.joinEventMutationHandler).toHaveBeenCalledWith(
expect.objectContaining(joinEventMock)
);
const cachedData = mockClient?.cache.readQuery<{ event: IEvent }>({
query: FETCH_EVENT_BASIC,
@@ -216,9 +216,9 @@ describe("ParticipationWithoutAccount", () => {
await flushPromises();
expect(requestHandlers.joinEventMutationHandler).toHaveBeenCalledWith({
...joinEventMock,
});
expect(requestHandlers.joinEventMutationHandler).toHaveBeenCalledWith(
expect.objectContaining(joinEventMock)
);
const cachedData = mockClient?.cache.readQuery<{ event: IEvent }>({
query: FETCH_EVENT_BASIC,
@@ -260,9 +260,9 @@ describe("ParticipationWithoutAccount", () => {
await flushPromises();
expect(requestHandlers.joinEventMutationHandler).toHaveBeenCalledWith({
...joinEventMock,
});
expect(requestHandlers.joinEventMutationHandler).toHaveBeenCalledWith(
expect.objectContaining(joinEventMock)
);
await flushPromises();
expect(wrapper.find("form").exists()).toBeTruthy();
expect(wrapper.find(".o-notification--danger").text()).toContain(