From 7ae447ea0fd7641b4414b369430623b1f9f260b1 Mon Sep 17 00:00:00 2001 From: Sean Killeen Date: Thu, 20 Oct 2022 16:46:37 -0400 Subject: [PATCH] docs: fix typos (#17919) --- docs/src/api/class-keyboard.md | 4 ++-- docs/src/api/class-request.md | 2 +- docs/src/api/params.md | 4 ++-- docs/src/test-annotations-js.md | 2 +- packages/playwright-core/types/types.d.ts | 10 +++++----- packages/playwright-test/types/test.d.ts | 8 ++++---- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/src/api/class-keyboard.md b/docs/src/api/class-keyboard.md index 1d93d67e98..87e41150bc 100644 --- a/docs/src/api/class-keyboard.md +++ b/docs/src/api/class-keyboard.md @@ -2,7 +2,7 @@ * since: v1.8 Keyboard provides an api for managing a virtual keyboard. The high level api is [`method: Keyboard.type`], which takes -raw characters and generates proper keydown, keypress/input, and keyup events on your page. +raw characters and generates proper `keydown`, `keypress`/`input`, and `keyup` events on your page. For finer control, you can use [`method: Keyboard.down`], [`method: Keyboard.up`], and [`method: Keyboard.insertText`] to manually fire events as if they were generated from a real keyboard. @@ -97,7 +97,7 @@ page.keyboard.press("Shift+A") ```csharp await page.Keyboard.PressAsync("Shift+KeyA"); -// or +// or await page.Keyboard.PressAsync("Shift+A"); ``` diff --git a/docs/src/api/class-request.md b/docs/src/api/class-request.md index 63ff37fda0..3b0dd6be7e 100644 --- a/docs/src/api/class-request.md +++ b/docs/src/api/class-request.md @@ -14,7 +14,7 @@ HTTP Error responses, such as 404 or 503, are still successful responses from HT with `'requestfinished'` event. ::: -If request gets a 'redirect' response, the request is successfully finished with the 'requestfinished' event, and a new +If request gets a 'redirect' response, the request is successfully finished with the `requestfinished` event, and a new request is issued to a redirected url. ## async method: Request.allHeaders diff --git a/docs/src/api/params.md b/docs/src/api/params.md index 2aac966ea0..b934e5a932 100644 --- a/docs/src/api/params.md +++ b/docs/src/api/params.md @@ -1031,14 +1031,14 @@ An object which specifies clipping of the resulting image. Should have the follo ## screenshot-option-scale - `scale` <[ScreenshotScale]<"css"|"device">> -When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this will keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so screenhots of high-dpi devices will be twice as large or even larger. +When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this will keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so screenshots of high-dpi devices will be twice as large or even larger. Defaults to `"device"`. ## screenshot-option-scale-default-css - `scale` <[ScreenshotScale]<"css"|"device">> -When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this will keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so screenhots of high-dpi devices will be twice as large or even larger. +When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this will keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so screenshots of high-dpi devices will be twice as large or even larger. Defaults to `"css"`. diff --git a/docs/src/test-annotations-js.md b/docs/src/test-annotations-js.md index b907d35edc..04a6659c8d 100644 --- a/docs/src/test-annotations-js.md +++ b/docs/src/test-annotations-js.md @@ -6,7 +6,7 @@ title: "Annotations" Playwright Test supports test annotations to deal with failures, flakiness, skip, focus and tag tests: - [`method: Test.skip#1`] marks the test as irrelevant. Playwright Test does not run such a test. Use this annotation when the test is not applicable in some configuration. - [`method: Test.fail#1`] marks the test as failing. Playwright Test will run this test and ensure it does indeed fail. If the test does not fail, Playwright Test will complain. -- [`method: Test.fixme#1`] marks the test as failing. Playwright Test will not run this test, as opposed to the `fail` annotation. Use `fixme` when running the test is slow or crashy. +- [`method: Test.fixme#1`] marks the test as failing. Playwright Test will not run this test, as opposed to the `fail` annotation. Use `fixme` when running the test is slow or crashes. - [`method: Test.slow#1`] marks the test as slow and triples the test timeout. Annotations can be used on a single test or a group of tests. Annotations can be conditional, in which case they apply when the condition is truthy. Annotations may depend on test fixtures. There could be multiple annotations on the same test, possibly in different configurations. diff --git a/packages/playwright-core/types/types.d.ts b/packages/playwright-core/types/types.d.ts index 0a39bb0b31..426b6209ee 100644 --- a/packages/playwright-core/types/types.d.ts +++ b/packages/playwright-core/types/types.d.ts @@ -8933,7 +8933,7 @@ export interface ElementHandle extends JSHandle { /** * When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this will - * keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so screenhots of + * keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so screenshots of * high-dpi devices will be twice as large or even larger. * * Defaults to `"device"`. @@ -15499,7 +15499,7 @@ export interface FrameLocator { /** * Keyboard provides an api for managing a virtual keyboard. The high level api is * [keyboard.type(text[, options])](https://playwright.dev/docs/api/class-keyboard#keyboard-type), which takes raw - * characters and generates proper keydown, keypress/input, and keyup events on your page. + * characters and generates proper `keydown`, `keypress`/`input`, and `keyup` events on your page. * * For finer control, you can use [keyboard.down(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-down), * [keyboard.up(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-up), and @@ -15857,7 +15857,7 @@ export const webkit: BrowserType; * > NOTE: HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request will * complete with `'requestfinished'` event. * - * If request gets a 'redirect' response, the request is successfully finished with the 'requestfinished' event, and a new + * If request gets a 'redirect' response, the request is successfully finished with the `requestfinished` event, and a new * request is issued to a redirected url. */ export interface Request { @@ -17555,7 +17555,7 @@ export interface LocatorScreenshotOptions { /** * When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this will - * keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so screenhots of + * keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so screenshots of * high-dpi devices will be twice as large or even larger. * * Defaults to `"device"`. @@ -17740,7 +17740,7 @@ export interface PageScreenshotOptions { /** * When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this will - * keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so screenhots of + * keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so screenshots of * high-dpi devices will be twice as large or even larger. * * Defaults to `"device"`. diff --git a/packages/playwright-test/types/test.d.ts b/packages/playwright-test/types/test.d.ts index fa1579b539..16da91372c 100644 --- a/packages/playwright-test/types/test.d.ts +++ b/packages/playwright-test/types/test.d.ts @@ -3640,7 +3640,7 @@ interface LocatorAssertions { /** * When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this will - * keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so screenhots of + * keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so screenshots of * high-dpi devices will be twice as large or even larger. * * Defaults to `"css"`. @@ -3714,7 +3714,7 @@ interface LocatorAssertions { /** * When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this will - * keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so screenhots of + * keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so screenshots of * high-dpi devices will be twice as large or even larger. * * Defaults to `"css"`. @@ -3958,7 +3958,7 @@ interface PageAssertions { /** * When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this will - * keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so screenhots of + * keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so screenshots of * high-dpi devices will be twice as large or even larger. * * Defaults to `"css"`. @@ -4062,7 +4062,7 @@ interface PageAssertions { /** * When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this will - * keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so screenhots of + * keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so screenshots of * high-dpi devices will be twice as large or even larger. * * Defaults to `"css"`.