This ensures that any tracing operations can access the recording state.
When stopping, we await for all operations to finish and then clear the state.
To avoid reentrancy, a new flag `isStopping` is introduced.
Using a worker fixture forces a new worker. This might be unexpected
when part of the test file runs in one worker, and another runs
in another worker. Top-level use of worker fixtures is still fine.
- Uses some auto fixtures to set default options and instrumentation on BrowserType.
- Moves screenshot, trace and video to worker-scoped fixtures.
- Throws in page/context when used from beforeAll/afterAll.
- Plumbs around BrowserType to be accessible from Browser and BrowserContext.
Each hook gets its own test scope. This is not too useful for
object fixtures like `page` (although one can use a page in
`beforeAll` to save storage state), but much more useful for option
fixtures like `viewport`.
This patch adds support for the `vue` selector engine that allows
selecting DOM elements based on the component name.
> **NOTE**: `vue` engine supports Vue2 and Vue2.
References #7189
By default, CI's are set up to upload `//test-results` folder to
artifacts storage. Storing missing snapshots in the `//test-results`
folder too will simplify collecting new baselines from the CI.
This patch adds support for the `react` selector engine that allows
selecting DOM elements based on the component name.
> **NOTE**: in case of multi-root components (React.Fragment), `react`
engine will select all root DOM elements.
> **NOTE**: `react` engine supports react v15+.
References #7189
This way bash won't expand and post-process variable values in any way.
The changes are driven with
[`shellcheck`](https://github.com/koalaman/shellcheck)
The common pattern today is to have two commands to configure CI:
```sh
npx playwright install-deps chromium
npx playwright install chromium
```
With this patch, this becomes:
```sh
npx playwright install --with-deps chromium
```
Note: `--with-deps` might call `sudo`.
Both `libyuv::I420Copy` and `libyuv::I420Scale` support image cropping
by offsetting coordinates inside planes, but offsets must be even
numbers.
References #7998