Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

test: wait for export bytes in e2e

AjTheSpideyfd2bf21e7e05
diff --git a/tests/e2e/gif-export.spec.ts b/tests/e2e/gif-export.spec.ts
index 0f0e1a22b..c00dc4000 100644
--- a/tests/e2e/gif-export.spec.ts
+++ b/tests/e2e/gif-export.spec.ts
@@ -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,