diff --git a/e2e/playwright.config.ts b/e2e/playwright.config.ts index 4913edc2d..44f694de5 100644 --- a/e2e/playwright.config.ts +++ b/e2e/playwright.config.ts @@ -29,9 +29,12 @@ export default defineConfig({ // Longer timeout for cloud operations actionTimeout: 30000, navigationTimeout: 60000, + // Grant camera/mic so getUserMedia() succeeds without a UI prompt + // (the browser launch flags below provide a synthetic feed). + permissions: ["camera", "microphone"], }, // Global timeout per test - timeout: 180000, // 3 minutes for cloud streaming tests + timeout: 300000, // 5 minutes (cold-start fal containers can run long) expect: { timeout: 30000, }, @@ -40,6 +43,16 @@ export default defineConfig({ name: "chromium", use: { ...devices["Desktop Chrome"], + launchOptions: { + // Feed getUserMedia a synthetic video source so a real WebRTC + // peer connection can complete end-to-end — without these + // flags, headless Chromium has no camera and ICE stalls. + args: [ + "--use-fake-device-for-media-stream", + "--use-fake-ui-for-media-stream", + "--auto-select-desktop-capture-source=fake", + ], + }, }, }, ], diff --git a/e2e/tests/cloud-streaming.spec.ts b/e2e/tests/cloud-streaming.spec.ts index c7360f333..e16ecb8a1 100644 --- a/e2e/tests/cloud-streaming.spec.ts +++ b/e2e/tests/cloud-streaming.spec.ts @@ -4,22 +4,29 @@ import { test, expect, Page } from "@playwright/test"; * E2E tests for Scope cloud streaming via fal.ai. * * The app is started with: - * VITE_DAYDREAM_API_KEY=... → handles auth (shows as logged in) - * SCOPE_CLOUD_APP_ID=scope-pr- → configures cloud endpoint + * VITE_DAYDREAM_API_KEY=... → baked into the frontend, makes the app + * behave as signed-in so the cloud toggle + * is enabled + * SCOPE_CLOUD_APP_ID=daydream//ws → points scope at a fal deploy * - * These tests verify the full flow: - * 1. App loads (already logged in via API key) - * 2. Enable cloud mode - * 3. Start a stream with the passthrough model - * 4. Verify frames are being processed + * Flow: + * 1. App loads (already logged in via baked-in API key) + * 2. Switch to Perform mode (default is Workflow/graph mode after the + * graph-mode redesign) + * 3. Toggle Remote Inference on from the settings dialog + * 4. Wait for cloud connection (Connection ID rendered) + * 5. Select the passthrough pipeline + * 6. Click the play overlay to start the stream + * 7. Verify the output