1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-08-06 10:22:45 +03:00
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2024-08-02 09:04:32 +01:00
parent 50d1257463
commit 1daafdc7a3
8 changed files with 260 additions and 204 deletions

View File

@@ -80,9 +80,11 @@ describe("useUserOnboardingTasks", () => {
});
const { result, rerender } = renderHook(() => useUserOnboardingTasks(context.result.current));
expect(result.current[4].id).toBe("permission-notifications");
await waitFor(() => expect(result.current[4].completed).toBe(false));
expect(result.current[4].completed).toBe(false);
result.current[4].action!.onClick!({ type: "click" } as any);
rerender();
await waitFor(() => expect(result.current[4].completed).toBe(true));
await waitFor(() => {
rerender();
expect(result.current[4].completed).toBe(true);
});
});
});