You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-11
Original file line number
Diff line number
Diff line change
@@ -70,19 +70,19 @@ describe('What is my browser', () => {
70
70
71
71
## Configuration
72
72
73
-
You can specify a `jest-playwright.config.js` at the root of the project or define a custom path using `JEST_PLAYWRIGHT_CONFIG` environment variable. It should export a config object.
73
+
You can specify a `jest-playwright.config.js` at the root of the project or define a custom path using the `JEST_PLAYWRIGHT_CONFIG` environment variable. It should export a config object.
74
74
75
75
-`launchBrowserApp` <[object]> [All Playwright launch options](https://github.com/microsoft/playwright/blob/master/docs/api.md#browsertypelaunchoptions) can be specified in config. Since it is JavaScript, you can use all stuff you need, including environment.
76
76
-`connectBrowserApp` <[object]> [All Playwright connect options](https://github.com/microsoft/playwright/blob/master/docs/api.md#browsertypeconnectoptions) can be specified in config.
77
77
-`context` <[object]> [All Playwright context options](https://github.com/microsoft/playwright/blob/master/docs/api.md#browsernewcontextoptions) can be specified in config.
78
-
-`browsers` <[string[]]>. Define a [browsers](https://github.com/microsoft/playwright/blob/master/docs/api.md#class-browsertype) to run tests into.
78
+
-`browsers` <[string[]]>. Define [browsers](https://github.com/microsoft/playwright/blob/master/docs/api.md#class-browsertype) to run tests in.
79
79
-`chromium` Each test runs Chromium (default).
80
80
-`firefox` Each test runs Firefox.
81
81
-`webkit` Each test runs Webkit.
82
-
-`devices` <[string[]]>. Define a [devices](https://github.com/microsoft/playwright/blob/master/docs/api.md#browsertypedevices) to run tests into. Actual list of devices can be found [here](https://github.com/Microsoft/playwright/blob/master/src/deviceDescriptors.ts)
82
+
-`devices` <[string[]]>. Define a [devices](https://github.com/microsoft/playwright/blob/master/docs/api.md#browsertypedevices) to run tests in. Actual list of devices can be found [here](https://github.com/Microsoft/playwright/blob/master/src/deviceDescriptors.ts).
83
83
-`exitOnPageError` <[boolean]> Exits process on any page error. Defaults to `true`.
-`selectors` <[array]>. Define [selector](https://github.com/microsoft/playwright/blob/v0.11.1/docs/api.md#class-selectors). Each selector must be an object with name and script properties.
-`selectors` <[array]>. Define [selectors](https://github.com/microsoft/playwright/blob/v0.11.1/docs/api.md#class-selectors). Each selector must be an object with name and script properties.
86
86
87
87
Usage with [query-selector-shadow-dom](https://github.com/Georgegriff/query-selector-shadow-dom):
88
88
@@ -104,7 +104,7 @@ module.exports = {
104
104
105
105
**Note**:
106
106
107
-
- You can also specify browser with `BROWSER` environment variable. You should do it only if you are using the whole playwright package.
107
+
- You can also specify browser with the `BROWSER` environment variable. You should do it only if you are using the whole playwright package.
108
108
- You can specify device with `DEVICE` environment variable.
109
109
110
110
## Put in debug mode
@@ -135,17 +135,17 @@ Other options are documented in [jest-dev-server](https://github.com/smooth-code
135
135
136
136
## expect-playwright
137
137
138
-
There is a utility package [expect-playwright](https://github.com/mxschmitt/expect-playwright) which simplifies the expect statements in combination with Playwright to make e.g. shorter text comparisons.
138
+
There is a utility package [expect-playwright](https://github.com/playwright-community/expect-playwright) which simplifies the expect statements in combination with Playwright to make e.g. shorter text comparisons.
139
139
140
140
## ESLint globals / `'page' is not defined`
141
141
142
-
There is [eslint-plugin-jest-playwright](https://github.com/mxschmitt/eslint-plugin-jest-playwright) available which includes the globals for using jest-playwright.
142
+
There is an ESLint plugin available [eslint-plugin-jest-playwright](https://github.com/playwright-community/eslint-plugin-jest-playwright) available which includes the globals for using jest-playwright.
143
143
144
144
## Unstable and experimental API
145
145
146
146
You can run tests for multiple browsers and devices:
147
147
148
-
- You must have installed **playwright** package
148
+
- You must have installed the **playwright** package
149
149
- You must define browsers to test with your `jest-playwright.config.js`:
150
150
151
151
```javascript
@@ -167,7 +167,7 @@ If there is no defined browsers in config it will run tests for chromium browser
167
167
168
168
## Usage with [jest-circus](https://github.com/facebook/jest/tree/master/packages/jest-circus)
169
169
170
-
You can use **jest-playwright** with **jest-circus** runner for taking screenshots during test failures for example:
170
+
You can use **jest-playwright** with the **jest-circus** runner for taking screenshots during test failures for example:
171
171
172
172
**jest.config.json**
173
173
@@ -278,7 +278,7 @@ If for your individual tests a new entire browser instance spins up each time an
278
278
279
279
## Inspiration
280
280
281
-
Thanks to [Smooth Code](https://github.com/smooth-code) for great [jest-puppeteer](https://github.com/smooth-code/jest-puppeteer).
281
+
Thanks to [Smooth Code](https://github.com/smooth-code) for the great [jest-puppeteer](https://github.com/smooth-code/jest-puppeteer).
0 commit comments