test: wait for export bytes in e2e

This commit is contained in:
AjTheSpidey
2026-05-20 04:07:38 +08:00
parent 94e848452e
commit fd2bf21e7e
+7 -5
View File
@@ -88,11 +88,13 @@ async function exportFromLoadedVideo(format: "gif" | "mp4"): Promise<Buffer> {
await editorWindow.getByTestId(`testId-${format}-format-button`).click();
await editorWindow.getByTestId("testId-export-button").click();
await expect(
editorWindow.getByText(`${format === "gif" ? "GIF" : "Video"} exported successfully`),
).toBeVisible({
timeout: 90_000,
});
await expect
.poll(
() =>
app.evaluate(() => Boolean((globalThis as Record<string, unknown>)["__testExportData"])),
{ timeout: 90_000 },
)
.toBe(true);
const base64 = await app.evaluate(
() => (globalThis as Record<string, unknown>)["__testExportData"] as string,