mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-23 11:29:54 +00:00
test(studio): the marquee-past-the-cap check waits as long as the frame takes to answer (#7757)
This commit is contained in:
@@ -195,15 +195,17 @@ describe("a marquee on an opaque frame matches a same-origin one", () => {
|
||||
return { picked, pointer };
|
||||
}
|
||||
|
||||
// Past the cap the frame describes over 2,048 elements, 1 to 3 s in happy-dom: longer than waitFor's 1 s default.
|
||||
const settled = { timeout: 15_000 };
|
||||
const ids = async (iframe: HTMLIFrameElement) => {
|
||||
const { picked, pointer } = band(iframe);
|
||||
pointer("pointerdown", 130, 70);
|
||||
pointer("pointermove", 500, 200);
|
||||
pointer("pointermove", 520, 220);
|
||||
await vi.waitFor(() => expect(picked.candidates).toBeGreaterThan(0));
|
||||
await vi.waitFor(() => expect(picked.candidates).toBeGreaterThan(0), settled);
|
||||
const candidates = picked.candidates;
|
||||
pointer("pointerup", 520, 220);
|
||||
await vi.waitFor(() => expect(picked.selections).not.toBeNull());
|
||||
await vi.waitFor(() => expect(picked.selections).not.toBeNull(), settled);
|
||||
return { candidates, ids: picked.selections!.map((s) => s.id ?? s.hfId), picked };
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user