docs(migrate): a Playwright Locator in expect from e2e is a plain value

Merged
AM
4d ago
+1-0

What and why

  • During a migration, a page.getByRole(...) left over from Playwright and passed to expect from e2e compiles to a value expectation, so toBeVisible() fails with TS2339 ... on type 'ValueExpectation<Locator>', which doesn't say what is wrong.
  • One row in the guide's Assertions table: rewrite the query on screen.

Issue

None (docs).

Verified

Ran it locally: yes

  • apps/testbed with its tsconfig.json and the built packages: await expect(playwrightLocator).toBeVisible() gives error TS2339: Property 'toBeVisible' does not exist on type 'ValueExpectation<Locator>'.

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.

Written with AI help (Claude Opus 5.5, OpenAI Sol 6.1, DeepSeek V4.1 Flash); the runs above are real.