Skip to content

Commit 3523517

Browse files
committed
typos and grammar
1 parent f6abce9 commit 3523517

File tree

1 file changed

+5
-10
lines changed
  • exercises/02.vitest-browser-mode/03.solution.playwright

1 file changed

+5
-10
lines changed

exercises/02.vitest-browser-mode/03.solution.playwright/README.mdx

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
# Playwright
22

3-
Problem: Using the default `preview` provider in Vitest is great to try things out, but it relies on Chromium being installed in your system (and also isn't that powerful). To have a proper setup, and be able to run it in CI, we need to define an explicit provider. Let's use Playwright.
4-
5-
0. Explain why we want `playwright` and not the default `preview` browser provider (works better for CI, more powerful since it taps into the Chrome DevTools Protocol).
6-
1. Install `playwright`.
7-
1. Run `npx playwright install --with-deps chromium` and configure your repo so this runs automatically (this can be quite annoying). Also, install just the browsers we need, not all of them, to save time on CI.
8-
1. Update the Vitest configuration to use `playwright` as the browser automation tool.
3+
Problem: Using the default `preview` provider in Vitest is great to try things out, but it relies on Chromium being installed on your system (and also isn't that powerful). To have a proper setup, and be able to run it in CI, we need to define an explicit provider. Let's use Playwright.
94

105
---
116

12-
Let's start from installing `playwright`:
7+
Let's start by installing `playwright`:
138

149
```sh nonumber
1510
npm i -D playwright
@@ -18,10 +13,10 @@ npm i -D playwright
1813
Playwright needs browser executables to be present on your machine to run. In this workshop, I am using Chromium as my browser of choice, so I can install just that particular browser by running the following command:
1914

2015
```sh nonumber
21-
npx playwright install --with-dewps chromium
16+
npx playwright install --with-deps chromium
2217
```
2318

24-
> 🦉 You can provide the Playwright CLI with the explicit browsers you want to be installed. This reduces its footprint in the system by fetching only the browsers you need.
19+
> 🦉 You can provide the Playwright CLI with a specific browser you want to be installed. This reduces its footprint in the system by fetching only the browsers you need.
2520
2621
The next step is to tell Vitest to use Playwright as the browser provider for component tests. In `vite.config.ts`, set the `test.browser.provider` option to `'playwright'`:
2722

@@ -65,4 +60,4 @@ And, finally, let's update the type definitions for the assertion matchers to be
6560
}
6661
```
6762

68-
This will make sure that the locators, user events, and matchers are correctly annotated.
63+
This will make sure that the locators, user events, and matchers are correctly typed.

0 commit comments

Comments
 (0)