docs: document TestOptions.video.size (#10827)

This commit is contained in:
Dmitry Gozman 2021-12-09 07:38:58 -08:00 committed by GitHub
parent 43b7e6c26d
commit 897e41c6c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View file

@ -199,6 +199,8 @@ Whether to record video for each test. Defaults to `'off'`.
* `'retain-on-failure'`: Record video for each test, but remove all videos from successful test runs. * `'retain-on-failure'`: Record video for each test, but remove all videos from successful test runs.
* `'on-first-retry'`: Record video only when retrying a test for the first time. * `'on-first-retry'`: Record video only when retrying a test for the first time.
If video size is not specified, it will be equal to [`property: TestOptions.viewport`] scaled down to fit into 800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of each page will be scaled down if necessary to fit the specified size.
Learn more about [recording video](./test-configuration.md#record-video). Learn more about [recording video](./test-configuration.md#record-video).
## property: TestOptions.viewport = %%-context-option-viewport-%% ## property: TestOptions.viewport = %%-context-option-viewport-%%

View file

@ -2730,6 +2730,11 @@ export interface PlaywrightWorkerOptions {
* - `'retain-on-failure'`: Record video for each test, but remove all videos from successful test runs. * - `'retain-on-failure'`: Record video for each test, but remove all videos from successful test runs.
* - `'on-first-retry'`: Record video only when retrying a test for the first time. * - `'on-first-retry'`: Record video only when retrying a test for the first time.
* *
* If video size is not specified, it will be equal to
* [testOptions.viewport](https://playwright.dev/docs/api/class-testoptions#test-options-viewport) scaled down to fit into
* 800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of each page will
* be scaled down if necessary to fit the specified size.
*
* Learn more about [recording video](https://playwright.dev/docs/test-configuration#record-video). * Learn more about [recording video](https://playwright.dev/docs/test-configuration#record-video).
*/ */
video: VideoMode | /** deprecated */ 'retry-with-video' | { mode: VideoMode, size?: ViewportSize }; video: VideoMode | /** deprecated */ 'retry-with-video' | { mode: VideoMode, size?: ViewportSize };