test(mobile-benchmark): cover device.openLink with a real deep link

Merged
KA
16d ago
+39-3

What and why

  • device.openLink only had fake-client unit tests, and the app declared the e2e-benchmark scheme without handling it.
  • A React Navigation linking config in src/App.tsx opens e2e-benchmark://<scenario-slug> on that scenario, home list beneath it. No scenario files change; App.tsx now differs from the upstream app.
  • One test in tests/device-fixture.e2e.ts opens e2e-benchmark://login-form and checks Login Form's email-input. The iOS simulator sometimes asks "Open in “e2e Benchmark”?" first, so the test taps Open when that prompt shows.

Issue

Closes #1804

Verified

Ran it locally: yes

  • e2e run tests/device-fixture.e2e.ts --grep openLink: fails on main's build (expect.poll ... timed out) and passes on this branch, on an iPhone 17 Pro simulator (iOS 26.3) and a Pixel 8 emulator (Android 16), Release builds.
  • Whole tests/device-fixture.e2e.ts: iOS 12 passed. Android 10 of 11 passed. foregroundApp after closeApp failed once with "remained foreground after close" and passed on a rerun; that test runs before the new one and doesn't touch it.
  • pnpm check passes. The last edit (10 s poll timeout, foregroundApp check after the poll) is typechecked but not re-run on devices.

Checklist

  • Changeset added (pnpm changeset) for any change to a published package, or the change is testbed, docs, or CI only.
  • Breaking change: title carries !, the changeset body names what breaks and what replaces it, and the deprecation warning landed a window earlier (stability policy in CONTRIBUTING.md).
  • Docs updated in the same PR: the docs/**/*.mdx page for the behavior, and skills/e2e/ if the skill describes it.
  • Contract change: emitted .d.ts reviewed, tests/types/sdk-types.ts updated; wire change edits the schema and both fixtures.
  • Engine contract change (e2e/engine): changesets for e2e, @e2e-dev/web, and @e2e-dev/mobile.