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
* Creating PlaywrightRunner
* Add types for browsers
* Update dependencies, fix jest-environment-node peer dep
* Rewrite selectors register logic
* Using jest-circus as default testRunner, add jest-playwright-runner to jest-preset.json
* Some PlaywrightEnvironment fixes, fix utils tests
* Fix utils test for getPlaywrightInstance function
* Remove unused SelectorType from utils
* Replace browser with browsers, rollback to support passing browser param through process.env
* Fix some utils functions
* Fix testProcess
* Support devices
* Add devices to constants, support jest displayName
* Case for empty devices
* Fix some tests
* Improve some tests
* Remove jest-playwright bin
* Update links in package.json
* Fix typo and remove unused properties from types
* Some logic changes
* Fix displayName
* Move back test for browserName
* Some README fixes
* Some README fixes
* Refactoring getTests logic
Copy file name to clipboardExpand all lines: README.md
+10-32Lines changed: 10 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,7 +56,7 @@ Use Playwright in your tests:
56
56
```
57
57
58
58
```js
59
-
describe('Google', () => {
59
+
describe('What is my browser', () => {
60
60
beforeAll(async () => {
61
61
awaitpage.goto('https://whatismybrowser.com/')
62
62
})
@@ -75,11 +75,11 @@ You can specify a `jest-playwright.config.js` at the root of the project or defi
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
-
-`browser` <[string]>. Define a [browser](https://github.com/microsoft/playwright/blob/master/docs/api.md#class-browsertype) to run tests into.
78
+
-`browsers` <[string[]]>. Define a [browsers](https://github.com/microsoft/playwright/blob/master/docs/api.md#class-browsertype) to run tests into.
79
79
-`chromium` Each test runs Chromium (default).
80
80
-`firefox` Each test runs Firefox.
81
81
-`webkit` Each test runs Webkit.
82
-
-`device` <[string]>. Define a [device](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 into. 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.
@@ -143,50 +143,28 @@ There is [eslint-plugin-jest-playwright](https://github.com/mxschmitt/eslint-plu
143
143
144
144
## Unstable and experimental API
145
145
146
-
From version **0.0.7** you can run you tests for multiple browsers.
146
+
You can run tests for multiple browsers and devices:
147
147
148
148
- You must have installed **playwright** package
149
-
- You must define browser to test with your `jest-playwright.config.js`:
149
+
- You must define browsers to test with your `jest-playwright.config.js`:
150
150
151
151
```javascript
152
152
module.exports= {
153
153
browsers: ["chromium", "webkit"],
154
-
...
155
-
}
156
-
```
157
-
158
-
From version **0.0.13** you can run you tests for multiple devices.
159
-
160
-
```javascript
161
-
module.exports= {
162
154
devices: ["iPhone 6", "Pixel 2"],
163
155
...
164
156
}
165
157
```
166
158
167
-
It will run your tests depending on you playwright package.
159
+
It will run your tests for:
168
160
169
-
- If you are using specific playwright package, it will run test for this specific browser
170
-
- With installed **playwright** package you can define browsers with config:
171
-
172
-
```javascript
173
-
module.exports= {
174
-
browsers: ["chromium", "firefox"],
175
-
devices: ["iPhone 6", "Pixel 2"],
176
-
...
177
-
}
178
-
```
161
+
-**Chromium** browser and **iPhone 6** device;
162
+
-**Chromium** browser and **Pixel 2** device;
163
+
-**Webkit** browser and **iPhone 6** device;
164
+
-**Webkit** browser and **Pixel 2** device;
179
165
180
166
If there is no defined browsers in config it will run tests for chromium browser.
0 commit comments