From 8e635fd23310af09b48b2fd4542201c0c8984d11 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Tue, 19 Mar 2024 10:34:26 +0000 Subject: [PATCH] docs: update information about playwright test runner --- docs/1.getting-started/11.testing.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/1.getting-started/11.testing.md b/docs/1.getting-started/11.testing.md index 67437c1a5f05..b56f67c60189 100644 --- a/docs/1.getting-started/11.testing.md +++ b/docs/1.getting-started/11.testing.md @@ -16,7 +16,7 @@ In order to allow you to manage your other testing dependencies, `@nuxt/test-uti - you can choose between `happy-dom` and `jsdom` for a runtime Nuxt environment - you can choose between `vitest`, `cucumber`, `jest` and `playwright` for end-to-end test runners -- `playwright-core` is only required if you wish to use the built-in browser testing utilities +- `playwright-core` is only required if you wish to use the built-in browser testing utilities (and are not using `@playwright/test` as your test runner) ::code-group ```bash [yarn] @@ -388,7 +388,7 @@ await setup({ ## End-To-End Testing -For end-to-end testing, we support [Vitest](https://github.com/vitest-dev/vitest) and [Jest](https://jestjs.io) as test runners. +For end-to-end testing, we support [Vitest](https://github.com/vitest-dev/vitest), [Jest](https://jestjs.io), [Cucumber](https://cucumber.io/) and [Playwright](https://playwright.dev/) as test runners. ### Setup @@ -493,11 +493,11 @@ const pageUrl = url('/page') ### Testing in a Browser -We provide built-in support using Playwright within `@nuxt/test-utils`, but you can also use other test runners for end-to-end browser testing. +We provide built-in support using Playwright within `@nuxt/test-utils`, either programmatically or via the Playwright test runner. #### `createPage(url)` -You can create a configured Playwright browser instance, and (optionally) point it at a path from the running server. You can find out more about the API methods available from [in the Playwright documentation](https://playwright.dev/docs/api/class-page). +Within `vitest`, `jest` or `cucumber`, you can create a configured Playwright browser instance with `createPage`, and (optionally) point it at a path from the running server. You can find out more about the API methods available from [in the Playwright documentation](https://playwright.dev/docs/api/class-page). ```ts twoslash import { createPage } from '@nuxt/test-utils/e2e' @@ -508,7 +508,7 @@ const page = await createPage('/page') #### Testing with Playwright Test Runner -We provide first-class support for using `@nuxt/test-utils` within a Playwright test runner. +We also provide first-class support for using `@nuxt/test-utils` within [the Playwright test runner](https://playwright.dev/docs/intro). You can provide global Nuxt configuration, with the same configuration details as the `setup()` function mentioned earlier in this section.