End-to-end tests live in e2e/ and use Playwright (Chromium, headless).
Before running E2E tests for the first time (or on a fresh checkout), install dependencies and Playwright browsers:
just install-e2e # installs e2e/ Bun dependencies
just install-playwright # installs headless ChromiumSee e2e/README.md for full details on prerequisites and options.
-
Build the UI and start the server in one terminal:
just build-ui && SK_SERVER__MOQ_GATEWAY_URL=http://127.0.0.1:4545/moq SK_SERVER__ADDRESS=127.0.0.1:4545 just skit -
Run the tests in a second terminal:
just e2e-external http://localhost:4545
-
Playwright runs headless Chromium with a default 1280x720 viewport. Elements rendered below the fold are not visible to
IntersectionObserver. If a test relies on an element being observed (e.g. the<canvas>used by the MoQ video renderer), scroll it into view first:const canvas = page.locator('canvas'); await canvas.scrollIntoViewIfNeeded();
-
The
@moq/watchVideo.Rendererenables theVideo.Decoder(and therefore thevideo/dataMoQ subscription) only when the canvas is intersecting. Forgetting to scroll will result in a permanently black canvas.