docs: add instant navigation testing to Playwright guide (#100003)
### What? Adds a "Testing instant navigations" section to the Playwright guide. It covers the `instant()` helper from `@next/playwright`: how to install it, an example test, and how to enable the testing API when running tests against a production build. ### Why? The `instant()` helper is documented in the Instant navigation guide and the `instant` API reference, but the Playwright guide never mentions it. People who come to this page to learn how to test Next.js apps with Playwright won't find out that a helper exists for catching regressions in instant navigations. ### How? - Adds a new section at the end of the Playwright guide, wrapped in `<AppOnly>` because the feature requires Cache Components. - Includes the install command, an example test using `instant()` with `page.waitForURL()`, a note about passing `baseURL`, and the `exposeTestingApiInProductionBuild` config for production builds. - Content is based on the existing official docs: - https://nextjs.org/docs/app/guides/instant-navigation - https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config/instant - https://nextjs.org/docs/app/api-reference/config/next-config-js/exposeTestingApiInProductionBuild
Showing
Please
register
or
sign in
to comment