Skip to content

Commit 590a991

Browse files
committed
test(web): await attachment source preview module
1 parent c389e88 commit 590a991

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎apps/web/src/components/files/AttachmentFilePreview.browser.test.tsx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ describe("attachment HTML preview recovery", () => {
6969
expect(container.querySelector("iframe")?.getAttribute("src")).toBe(originalUrl);
7070
now = 61 * 60_000;
7171
await toggleMode("Show HTML source");
72+
await act(async () => {
73+
await import("./ReadOnlySourcePreview");
74+
});
7275
expect(fetch).toHaveBeenCalledExactlyOnceWith(renewedUrl, expect.any(Object));
7376
await vi.waitFor(() =>
7477
expect(container.querySelector("pre")?.textContent).toBe("<p>Captured HTML</p>"),

0 commit comments

Comments
 (0)