Skip to content

Latest commit

 

History

History

e2e

README.md

Running the mock WebKit gate on macOS

On macOS 26.6.2 with Playwright 1.65.1 (WebKit revision 2388), a sleeping display can cause headless WebKit to deliver mouse events outside the page viewport. A sign-in failure with <html lang="en">…</html> intercepts pointer events can occur before the browser sends the sign-in request. The same coordinate error can affect other mouse-driven tests.

Wake the display and keep it awake for the run. From the repository root, set VELA_E2E_STATIC_ROOT to the local /vela web export and VELA_E2E_BUN to the pinned Bun executable, as in tools/e2e-gate.sh.

caffeinate -u -t 5
caffeinate -d npx --no-install e2e run --strict-cache \
  --config e2e.mock.config.ts --target mock-webkit --workers 1 --retries 0

Use --headed to run the same gate with a visible browser. To check the shared sign-in helper in a shorter run, select tests/e2e/mock/film.e2e.ts. Each Film case signs in with a fresh mock grant.

Firefox Film playback smoke

Run from the repository root after installing the frozen workspace dependencies. This opt-in target runs the deterministic Film cases for direct MP4 playback, in-player version selection, and HLS playback under a quality limit. The proxy starts a fresh mock server and the browser and generated audio are muted.

ff_run=$(mktemp -d)
mkdir -p "$ff_run/metro" "$ff_run/firefox-home"
export PLAYWRIGHT_SKIP_BROWSER_GC=1
bun run playwright-core install firefox
export VELA_E2E_STATIC_ROOT="$ff_run/web"
export VELA_MOCK_MEDIA_ROOT="$ff_run/media"
export VELA_MOCK_SILENT_MEDIA=1
export VELA_E2E_BUN="$(command -v bun)"
(cd apps/vela && TMPDIR="$ff_run/metro" \
  EXPO_PUBLIC_VELA_PLAYER_ASSETS=$(printf '%064d' 0) \
  "$VELA_E2E_BUN" run export:web --clear --output-dir "$VELA_E2E_STATIC_ROOT")
"$VELA_E2E_BUN" mock-server/scripts/make-media.ts
env -u VELA_E2E_SERVER VELA_E2E_MOCK_FIREFOX=1 CFFIXED_USER_HOME="$ff_run/firefox-home" \
  bun run e2e run --strict-cache --config e2e.mock.config.ts --target mock-firefox \
  --workers 1 --retries 0 \
  --grep 'the title keeps the played runtime|an acknowledged version switch|Quality explains the lower output' \
  tests/e2e/mock/film.e2e.ts

CFFIXED_USER_HOME gives the automation browser a separate application-data directory on macOS 27, where Firefox can otherwise fail to open its profile.

Original-file presentation gap

The presentation gap regression needs an Expo export built with a real EXPO_PUBLIC_VELA_PLAYER_ASSETS digest and the matching player/ directory staged at the export root. It also needs a dedicated, muted Chrome session with WebGPU and a loopback CDP endpoint. Use the silent film fixtures generated with VELA_MOCK_SILENT_MEDIA=1.

VELA_E2E_STATIC_ROOT="$export_dir" VELA_MOCK_MEDIA_ROOT="$silent_media_dir" \
  VELA_E2E_WEBGPU_CDP=http://127.0.0.1:9222 VELA_E2E_BUN="$(command -v bun)" \
  npx --no-install e2e run --strict-cache --config e2e.mock.config.ts \
  --target mock-chromium tests/e2e/mock/presentation-gap.e2e.ts

The default mock CI export uses browser-native playback and skips this case.

Official plugin cartridge smoke

The mock gates cover the client-launch bridge with the Interactive Counter. The cartridge smoke uses Ether directly, so the official plugin supplies the player, runtime assets and scoped storage. Use a fresh isolated Ether with the web export under test, the official Games 1.1.0 package verified against its published release SHA-256, and a disposable viewer. Grant the plugin a folder containing the licensed 2048gb fixture and scan it before starting the test. Use that viewer in the existing test credentials. The smoke writes slot 1 and the viewer's automatic checkpoint.

VELA_E2E_OFFICIAL_GAMES_URL="$ether_url/vela/screen/games?tab=systems" \
  npx --no-install e2e run --strict-cache --config e2e.config.ts \
  --target chromium --workers 1 tests/e2e/specs/official-games.e2e.ts

For a Games package with the searchable library tab, set the fixture URL to /vela/library/<Games library ID>. The smoke opens the same cartridge by title search.

Run the same command with --target webkit after Chromium completes.