chore: fix typos (#20473)
This commit is contained in:
Родитель
32724cd5ce
Коммит
f72d400952
|
@ -1,7 +1,7 @@
|
||||||
# Tool for printing .exe and .dll dependencies on Windows
|
# Tool for printing .exe and .dll dependencies on Windows
|
||||||
|
|
||||||
This is similar to `ldd` on linux in that loads specified files and tries to
|
This is similar to `ldd` on linux in that loads specified files and tries to
|
||||||
resolve all DLLs referenced by it, printing in the formar `<lib name> => <full path> | "no found"`
|
resolve all DLLs referenced by it, printing in the format `<lib name> => <full path> | "no found"`
|
||||||
To minimize dependencies we link all C runtime libraries statically, there is
|
To minimize dependencies we link all C runtime libraries statically, there is
|
||||||
still one dynamic dependency on `dbghelp.dll` which is supposed to be preinstalled
|
still one dynamic dependency on `dbghelp.dll` which is supposed to be preinstalled
|
||||||
on all Windows machines.
|
on all Windows machines.
|
||||||
|
|
|
@ -91,7 +91,7 @@ void navigationMenuFlyoutShouldNotHaveAutomaticallyDetectableAccessibilityViolat
|
||||||
|
|
||||||
### Example 3: Scanning for WCAG violations
|
### Example 3: Scanning for WCAG violations
|
||||||
|
|
||||||
By default, axe checks against a wide variety of accessibility rules. Some of these rules correspond to specific success criteria from the [Web Content Accessibility Guidelines (WCAG)](https://www.w3.org/TR/WCAG21/), and others are "best practice" rules that are not specifically required by any WCAG criteron.
|
By default, axe checks against a wide variety of accessibility rules. Some of these rules correspond to specific success criteria from the [Web Content Accessibility Guidelines (WCAG)](https://www.w3.org/TR/WCAG21/), and others are "best practice" rules that are not specifically required by any WCAG criterion.
|
||||||
|
|
||||||
You can constrain an accessibility scan to only run those rules which are "tagged" as corresponding to specific WCAG success criteria by using [`AxeBuilder.withTags()`](https://github.com/dequelabs/axe-core-maven-html/blob/develop/playwright/README.md#axebuilderwithtagsliststring-rules). For example, [Accessibility Insights for Web's Automated Checks](https://accessibilityinsights.io/docs/web/getstarted/fastpass/?referrer=playwright-accessibility-testing-java) only include axe rules that test for violations of WCAG A and AA success criteria; to match that behavior, you would use the tags `wcag2a`, `wcag2aa`, `wcag21a`, and `wcag21aa`.
|
You can constrain an accessibility scan to only run those rules which are "tagged" as corresponding to specific WCAG success criteria by using [`AxeBuilder.withTags()`](https://github.com/dequelabs/axe-core-maven-html/blob/develop/playwright/README.md#axebuilderwithtagsliststring-rules). For example, [Accessibility Insights for Web's Automated Checks](https://accessibilityinsights.io/docs/web/getstarted/fastpass/?referrer=playwright-accessibility-testing-java) only include axe rules that test for violations of WCAG A and AA success criteria; to match that behavior, you would use the tags `wcag2a`, `wcag2aa`, `wcag21a`, and `wcag21aa`.
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@ test('navigation menu flyout should not have automatically detectable accessibil
|
||||||
|
|
||||||
### Scanning for WCAG violations
|
### Scanning for WCAG violations
|
||||||
|
|
||||||
By default, axe checks against a wide variety of accessibility rules. Some of these rules correspond to specific success criteria from the [Web Content Accessibility Guidelines (WCAG)](https://www.w3.org/TR/WCAG21/), and others are "best practice" rules that are not specifically required by any WCAG criteron.
|
By default, axe checks against a wide variety of accessibility rules. Some of these rules correspond to specific success criteria from the [Web Content Accessibility Guidelines (WCAG)](https://www.w3.org/TR/WCAG21/), and others are "best practice" rules that are not specifically required by any WCAG criterion.
|
||||||
|
|
||||||
You can constrain an accessibility scan to only run those rules which are "tagged" as corresponding to specific WCAG success criteria by using [`AxeBuilder.withTags()`](https://github.com/dequelabs/axe-core-npm/blob/develop/packages/playwright/README.md#axebuilderwithtagstags-stringarray). For example, [Accessibility Insights for Web's Automated Checks](https://accessibilityinsights.io/docs/web/getstarted/fastpass/?referrer=playwright-accessibility-testing-js) only include axe rules that test for violations of WCAG A and AA success criteria; to match that behavior, you would use the tags `wcag2a`, `wcag2aa`, `wcag21a`, and `wcag21aa`.
|
You can constrain an accessibility scan to only run those rules which are "tagged" as corresponding to specific WCAG success criteria by using [`AxeBuilder.withTags()`](https://github.com/dequelabs/axe-core-npm/blob/develop/packages/playwright/README.md#axebuilderwithtagstags-stringarray). For example, [Accessibility Insights for Web's Automated Checks](https://accessibilityinsights.io/docs/web/getstarted/fastpass/?referrer=playwright-accessibility-testing-js) only include axe rules that test for violations of WCAG A and AA success criteria; to match that behavior, you would use the tags `wcag2a`, `wcag2aa`, `wcag21a`, and `wcag21aa`.
|
||||||
|
|
||||||
|
|
|
@ -448,7 +448,7 @@ When all steps combined have not finished during the specified [`option: timeout
|
||||||
## async method: Locator.dispatchEvent
|
## async method: Locator.dispatchEvent
|
||||||
* since: v1.14
|
* since: v1.14
|
||||||
|
|
||||||
Programmaticaly dispatch an event on the matching element.
|
Programmatically dispatch an event on the matching element.
|
||||||
|
|
||||||
**Usage**
|
**Usage**
|
||||||
|
|
||||||
|
@ -1427,7 +1427,7 @@ A page this locator belongs to.
|
||||||
## async method: Locator.press
|
## async method: Locator.press
|
||||||
* since: v1.14
|
* since: v1.14
|
||||||
|
|
||||||
Focuses the mathing element and presses a combintation of the keys.
|
Focuses the matching element and presses a combination of the keys.
|
||||||
|
|
||||||
**Usage**
|
**Usage**
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,7 @@ playwright codegen --timezone="Europe/Rome" --geolocation="41.890221,12.492348"
|
||||||
pwsh bin/Debug/netX/playwright.ps1 codegen --timezone="Europe/Rome" --geolocation="41.890221,12.492348" --lang="it-IT" maps.google.com
|
pwsh bin/Debug/netX/playwright.ps1 codegen --timezone="Europe/Rome" --geolocation="41.890221,12.492348" --lang="it-IT" maps.google.com
|
||||||
```
|
```
|
||||||
|
|
||||||
<img width="1276" alt="Codegen generating code for tests for google maps showing timezone, geoloation as Rome, Italy and in Italian language" src="https://user-images.githubusercontent.com/13063165/182394434-73e1c2a8-767e-411a-94e4-0912c1c50ecc.png" />
|
<img width="1276" alt="Codegen generating code for tests for google maps showing timezone, geolocation as Rome, Italy and in Italian language" src="https://user-images.githubusercontent.com/13063165/182394434-73e1c2a8-767e-411a-94e4-0912c1c50ecc.png" />
|
||||||
|
|
||||||
## Preserve authenticated state
|
## Preserve authenticated state
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,7 @@ The key differences to note are as follows:
|
||||||
| Installation | `npm install playwright` | `npm init playwright@latest` - note `install` vs. `init` |
|
| Installation | `npm install playwright` | `npm init playwright@latest` - note `install` vs. `init` |
|
||||||
| Install browsers | Chromium, Firefox, WebKit are installed by default | `npx playwright install` or `npx playwright install chromium` for a single one |
|
| Install browsers | Chromium, Firefox, WebKit are installed by default | `npx playwright install` or `npx playwright install chromium` for a single one |
|
||||||
| `import`/`require` name | `playwright` | `@playwright/test` |
|
| `import`/`require` name | `playwright` | `@playwright/test` |
|
||||||
| Initialization | Explicitly need to: <ol><li>Pick a browser to use, e.g. `chromium`</li><li>Launch browser with [`method: BrowserType.launch`]</li><li>Create a context with [`method: Browser.newContext`], <em>and</em> pass any context options explcitly, e.g. `devices['iPhone 11']`</li><li>Create a page with [`method: BrowserContext.newPage`]</li></ol> | An isolated `page` and `context` are provided to each test out-of the box, along with other [built-in fixtures](./test-fixtures.md#built-in-fixtures). No explicit creation. If referenced by the test in it's arguments, the Test Runner will create them for the test. (i.e. lazy-initialization) |
|
| Initialization | Explicitly need to: <ol><li>Pick a browser to use, e.g. `chromium`</li><li>Launch browser with [`method: BrowserType.launch`]</li><li>Create a context with [`method: Browser.newContext`], <em>and</em> pass any context options explicitly, e.g. `devices['iPhone 11']`</li><li>Create a page with [`method: BrowserContext.newPage`]</li></ol> | An isolated `page` and `context` are provided to each test out-of the box, along with other [built-in fixtures](./test-fixtures.md#built-in-fixtures). No explicit creation. If referenced by the test in it's arguments, the Test Runner will create them for the test. (i.e. lazy-initialization) |
|
||||||
| Assertions | No built-in Web-First Assertions | [Web-First assertions](./test-assertions.md) like: <ul><li>[`method: PageAssertions.toHaveTitle`]</li><li>[`method: PageAssertions.toHaveScreenshot#1`]</li></ul> which auto-wait and retry for the condition to be met.|
|
| Assertions | No built-in Web-First Assertions | [Web-First assertions](./test-assertions.md) like: <ul><li>[`method: PageAssertions.toHaveTitle`]</li><li>[`method: PageAssertions.toHaveScreenshot#1`]</li></ul> which auto-wait and retry for the condition to be met.|
|
||||||
| Cleanup | Explicitly need to: <ol><li>Close context with [`method: BrowserContext.close`]</li><li>Close browser with [`method: Browser.close`]</li></ol> | No explicit close of [built-in fixtures](./test-fixtures.md#built-in-fixtures); the Test Runner will take care of it.
|
| Cleanup | Explicitly need to: <ol><li>Close context with [`method: BrowserContext.close`]</li><li>Close browser with [`method: Browser.close`]</li></ol> | No explicit close of [built-in fixtures](./test-fixtures.md#built-in-fixtures); the Test Runner will take care of it.
|
||||||
| Running | When using the Library, you run the code as a node script, possibly with some compilation first. | When using the Test Runner, you use the `npx playwright test` command. Along with your [config](./test-configuration.md), the Test Runner handles any compilation and choosing what to run and how to run it. |
|
| Running | When using the Library, you run the code as a node script, possibly with some compilation first. | When using the Test Runner, you use the `npx playwright test` command. Along with your [config](./test-configuration.md), the Test Runner handles any compilation and choosing what to run and how to run it. |
|
||||||
|
|
|
@ -66,7 +66,7 @@ await page.route('https://dog.ceo/api/breeds/list/all', async route => {
|
||||||
const response = await route.fetch();
|
const response = await route.fetch();
|
||||||
const json = await response.json();
|
const json = await response.json();
|
||||||
json.message['big_red_dog'] = [];
|
json.message['big_red_dog'] = [];
|
||||||
// Fullfill using the original response, while patching the response body
|
// Fulfill using the original response, while patching the response body
|
||||||
// with the given JSON object.
|
// with the given JSON object.
|
||||||
await route.fulfill({ response, json });
|
await route.fulfill({ response, json });
|
||||||
});
|
});
|
||||||
|
@ -77,7 +77,7 @@ async def handle(route):
|
||||||
response = await route.fulfill()
|
response = await route.fulfill()
|
||||||
json = await response.json()
|
json = await response.json()
|
||||||
json["message"]["big_red_dog"] = []
|
json["message"]["big_red_dog"] = []
|
||||||
# Fullfill using the original response, while patching the response body
|
# Fulfill using the original response, while patching the response body
|
||||||
# with the given JSON object.
|
# with the given JSON object.
|
||||||
await route.fulfill(response=response, json=json)
|
await route.fulfill(response=response, json=json)
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ def handle(route):
|
||||||
response = route.fulfill()
|
response = route.fulfill()
|
||||||
json = response.json()
|
json = response.json()
|
||||||
json["message"]["big_red_dog"] = []
|
json["message"]["big_red_dog"] = []
|
||||||
# Fullfill using the original response, while patching the response body
|
# Fulfill using the original response, while patching the response body
|
||||||
# with the given JSON object.
|
# with the given JSON object.
|
||||||
route.fulfill(response=response, json=json)
|
route.fulfill(response=response, json=json)
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ await page.RouteAsync("https://dog.ceo/api/breeds/list/all", async route =>
|
||||||
var response = await route.FetchAsync();
|
var response = await route.FetchAsync();
|
||||||
dynamic json = await response.JsonAsync();
|
dynamic json = await response.JsonAsync();
|
||||||
json.message.big_red_dog = new string[] {};
|
json.message.big_red_dog = new string[] {};
|
||||||
// Fullfill using the original response, while patching the response body
|
// Fulfill using the original response, while patching the response body
|
||||||
// with the given JSON object.
|
// with the given JSON object.
|
||||||
await route.FulfillAsync(new() { Response = response, Json = json });
|
await route.FulfillAsync(new() { Response = response, Json = json });
|
||||||
});
|
});
|
||||||
|
@ -114,7 +114,7 @@ page.route("https://dog.ceo/api/breeds/list/all", route -> {
|
||||||
JsonObject json = new Gson().fromJson(response.text(), JsonObject.class);
|
JsonObject json = new Gson().fromJson(response.text(), JsonObject.class);
|
||||||
JsonObject message = json.get("message").getAsJsonObject();
|
JsonObject message = json.get("message").getAsJsonObject();
|
||||||
message.set("big_red_dog", new JsonArray());
|
message.set("big_red_dog", new JsonArray());
|
||||||
// Fullfill using the original response, while patching the response body
|
// Fulfill using the original response, while patching the response body
|
||||||
// with the given JSON object.
|
// with the given JSON object.
|
||||||
route.fulfill(new Route.FulfillOptions()
|
route.fulfill(new Route.FulfillOptions()
|
||||||
.setResponse(response)
|
.setResponse(response)
|
||||||
|
|
|
@ -13,7 +13,7 @@ In addition to recommended locators like [`method: Page.getByRole`] and [`method
|
||||||
## CSS locator
|
## CSS locator
|
||||||
|
|
||||||
:::note
|
:::note
|
||||||
We recommend prioritzing [user-visible locators](./locators.md#quick-guide) like text or accessible role instead of using CSS that is tied to the implementation and could break when the page changes.
|
We recommend prioritizing [user-visible locators](./locators.md#quick-guide) like text or accessible role instead of using CSS that is tied to the implementation and could break when the page changes.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
Playwright can locate an element by CSS selector.
|
Playwright can locate an element by CSS selector.
|
||||||
|
@ -42,7 +42,7 @@ Playwright augments standard CSS selectors in two ways:
|
||||||
|
|
||||||
Playwright include a number of CSS pseudo-classes to match elements by their text content.
|
Playwright include a number of CSS pseudo-classes to match elements by their text content.
|
||||||
|
|
||||||
- `article:has-text("Playwright")` - the `:has-text()` matches any element containing specified text somewhere inside, possibly in a child or a descendant element. Matching is case-insensitive, trims whitestapce and searches for a substring.
|
- `article:has-text("Playwright")` - the `:has-text()` matches any element containing specified text somewhere inside, possibly in a child or a descendant element. Matching is case-insensitive, trims whitespace and searches for a substring.
|
||||||
|
|
||||||
For example, `article:has-text("Playwright")` matches `<article><div>Playwright</div></article>`.
|
For example, `article:has-text("Playwright")` matches `<article><div>Playwright</div></article>`.
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ Input elements of the type `button` and `submit` are matched by their `value` in
|
||||||
|
|
||||||
### CSS: matching only visible elements
|
### CSS: matching only visible elements
|
||||||
|
|
||||||
Playwrigt supports the `:visible` pseudo class in CSS selectors. For example, `css=button` matches all the buttons on the page, while `css=button:visible` only matches visible buttons. This is useful to distinguish elements that are very similar but differ in visibility.
|
Playwright supports the `:visible` pseudo class in CSS selectors. For example, `css=button` matches all the buttons on the page, while `css=button:visible` only matches visible buttons. This is useful to distinguish elements that are very similar but differ in visibility.
|
||||||
|
|
||||||
Consider a page with two buttons, first invisible and second visible.
|
Consider a page with two buttons, first invisible and second visible.
|
||||||
|
|
||||||
|
@ -618,7 +618,7 @@ Vue locator, as well as [Vue DevTools](https://chrome.google.com/webstore/detail
|
||||||
## XPath locator
|
## XPath locator
|
||||||
|
|
||||||
:::warning
|
:::warning
|
||||||
We recommend prioritzing [user-visible locators](./locators.md#quick-guide) like text or accessible role instead of using XPath that is tied to the implementation and easily break when the page changes.
|
We recommend prioritizing [user-visible locators](./locators.md#quick-guide) like text or accessible role instead of using XPath that is tied to the implementation and easily break when the page changes.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
XPath locators are equivalent to calling [`Document.evaluate`](https://developer.mozilla.org/en/docs/Web/API/Document/evaluate).
|
XPath locators are equivalent to calling [`Document.evaluate`](https://developer.mozilla.org/en/docs/Web/API/Document/evaluate).
|
||||||
|
|
|
@ -65,7 +65,7 @@ Worker serviceWorker = page.waitForRequest(() -> {
|
||||||
|
|
||||||
[`event: BrowserContext.serviceWorker`] is fired ***before*** the Service Worker's main script has been evaluated, so ***before*** calling service[`method: Worker.evaluate`] you should wait on its activation.
|
[`event: BrowserContext.serviceWorker`] is fired ***before*** the Service Worker's main script has been evaluated, so ***before*** calling service[`method: Worker.evaluate`] you should wait on its activation.
|
||||||
|
|
||||||
There are more iodiomatic methods of waiting for a Service Worker to be activated, but the following is an implementation agnostic method:
|
There are more idiomatic methods of waiting for a Service Worker to be activated, but the following is an implementation agnostic method:
|
||||||
|
|
||||||
```js tab=js-ts
|
```js tab=js-ts
|
||||||
await page.evaluate(async () => {
|
await page.evaluate(async () => {
|
||||||
|
@ -219,7 +219,7 @@ self.addEventListener("fetch", (event) => {
|
||||||
|
|
||||||
// 3. Prevent tracker.js from being retrieved, and returns a placeholder response
|
// 3. Prevent tracker.js from being retrieved, and returns a placeholder response
|
||||||
if (event.request.url.endsWith("tracker.js"))
|
if (event.request.url.endsWith("tracker.js"))
|
||||||
return new Response('conosole.log("no trackers!")', {
|
return new Response('console.log("no trackers!")', {
|
||||||
status: 200,
|
status: 200,
|
||||||
headers: { "Content-Type": "text/javascript" },
|
headers: { "Content-Type": "text/javascript" },
|
||||||
});
|
});
|
||||||
|
|
|
@ -830,7 +830,7 @@ An object containing fixtures and/or options. Learn more about [fixtures format]
|
||||||
## method: Test.fail#1
|
## method: Test.fail#1
|
||||||
* since: v1.10
|
* since: v1.10
|
||||||
|
|
||||||
Unconditonally marks a test as "should fail". Playwright Test runs this test and ensures that it is actually failing. This is useful for documentation purposes to acknowledge that some functionality is broken until it is fixed.
|
Unconditionally marks a test as "should fail". Playwright Test runs this test and ensures that it is actually failing. This is useful for documentation purposes to acknowledge that some functionality is broken until it is fixed.
|
||||||
|
|
||||||
**Usage**
|
**Usage**
|
||||||
|
|
||||||
|
|
|
@ -425,7 +425,7 @@ However, most common ones like `headless` or `viewport` are available directly i
|
||||||
|
|
||||||
## Explicit Context Creation and Option Inheritance
|
## Explicit Context Creation and Option Inheritance
|
||||||
|
|
||||||
If using the built-in `browser` fixture, calling [`method: Browser.newContext`] will create a context with options inherted from the config:
|
If using the built-in `browser` fixture, calling [`method: Browser.newContext`] will create a context with options inherited from the config:
|
||||||
|
|
||||||
```js tab=js-ts
|
```js tab=js-ts
|
||||||
// playwright.config.ts
|
// playwright.config.ts
|
||||||
|
|
|
@ -200,7 +200,7 @@ test(`example test`, async ({ page }) => {
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
You can run this test with your secrect username and password set in the command line.
|
You can run this test with your secret username and password set in the command line.
|
||||||
|
|
||||||
```bash tab=bash-bash
|
```bash tab=bash-bash
|
||||||
USERNAME=me PASSWORD=secret npx playwright test
|
USERNAME=me PASSWORD=secret npx playwright test
|
||||||
|
|
|
@ -479,7 +479,7 @@ test('using specific annotations for passing test metadata to Xray', async ({},
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
Please note that the semantics of these properties will depend on the tool that will process this evoled report format; there are no standard property names/annotations.
|
Please note that the semantics of these properties will depend on the tool that will process this evolved report format; there are no standard property names/annotations.
|
||||||
|
|
||||||
If the configuration option `embedAttachmentsAsProperty` is defined, then a `property` with its name is created. Attachments, including their contents, will be embedded on the JUnit XML report inside `<item>` elements under this `property`. Attachments are obtained from the `TestInfo` object, using either a path or a body, and are added as base64 encoded content.
|
If the configuration option `embedAttachmentsAsProperty` is defined, then a `property` with its name is created. Attachments, including their contents, will be embedded on the JUnit XML report inside `<item>` elements under this `property`. Attachments are obtained from the `TestInfo` object, using either a path or a body, and are added as base64 encoded content.
|
||||||
Embedding attachments can be used to attach screenshots or any other relevant evidence; nevertheless, use it wisely as it affects the report size.
|
Embedding attachments can be used to attach screenshots or any other relevant evidence; nevertheless, use it wisely as it affects the report size.
|
||||||
|
|
|
@ -10496,7 +10496,7 @@ export interface Locator {
|
||||||
}): Promise<void>;
|
}): Promise<void>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Programmaticaly dispatch an event on the matching element.
|
* Programmatically dispatch an event on the matching element.
|
||||||
*
|
*
|
||||||
* **Usage**
|
* **Usage**
|
||||||
*
|
*
|
||||||
|
@ -11405,7 +11405,7 @@ export interface Locator {
|
||||||
page(): Page;
|
page(): Page;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Focuses the mathing element and presses a combintation of the keys.
|
* Focuses the matching element and presses a combination of the keys.
|
||||||
*
|
*
|
||||||
* **Usage**
|
* **Usage**
|
||||||
*
|
*
|
||||||
|
|
|
@ -2757,7 +2757,7 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
|
||||||
*/
|
*/
|
||||||
fixme(callback: (args: TestArgs & WorkerArgs) => boolean, description?: string): void;
|
fixme(callback: (args: TestArgs & WorkerArgs) => boolean, description?: string): void;
|
||||||
/**
|
/**
|
||||||
* Unconditonally marks a test as "should fail". Playwright Test runs this test and ensures that it is actually
|
* Unconditionally marks a test as "should fail". Playwright Test runs this test and ensures that it is actually
|
||||||
* failing. This is useful for documentation purposes to acknowledge that some functionality is broken until it is
|
* failing. This is useful for documentation purposes to acknowledge that some functionality is broken until it is
|
||||||
* fixed.
|
* fixed.
|
||||||
*
|
*
|
||||||
|
|
|
@ -3,6 +3,6 @@ Tests derived from axe-core test suite: https://github.com/dequelabs/axe-core/tr
|
||||||
Includes:
|
Includes:
|
||||||
- `LICENSE`
|
- `LICENSE`
|
||||||
|
|
||||||
Modifed:
|
Modified:
|
||||||
- `implicit-role.js` contains test cases extracted from `/test/commons/aria/implicit-role.js`
|
- `implicit-role.js` contains test cases extracted from `/test/commons/aria/implicit-role.js`
|
||||||
- `accessible-text.js` contains test cases extracted from `/test/commons/aria/accessible-text.js`
|
- `accessible-text.js` contains test cases extracted from `/test/commons/aria/accessible-text.js`
|
||||||
|
|
|
@ -6,5 +6,5 @@ Includes:
|
||||||
- `accname/foo.jpg`
|
- `accname/foo.jpg`
|
||||||
- `wai-aria/scripts/manual.css`
|
- `wai-aria/scripts/manual.css`
|
||||||
|
|
||||||
Modifed:
|
Modified:
|
||||||
- `wai-aria/scripts/ATTAcomm.js` contains our own harness to avoid modifying test files
|
- `wai-aria/scripts/ATTAcomm.js` contains our own harness to avoid modifying test files
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
# Chrome non-determenistic rendering
|
# Chrome non-deterministic rendering
|
||||||
|
|
||||||
Reported by: https://bugs.chromium.org/p/chromium/issues/detail?id=919955
|
Reported by: https://bugs.chromium.org/p/chromium/issues/detail?id=919955
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Tiny anti-aliasing sample
|
# Tiny anti-aliasing sample
|
||||||
|
|
||||||
This is a 10x10 image sample with a 3 anti-aliased pixels in-between. This is actually
|
This is a 10x10 image sample with a 3 anti-aliased pixels in-between. This is actually
|
||||||
a cropped down snapshot of one of the [ubuntu-x86-vs-ubunu-arm samples](../ubuntu-x86-vs-ubuntu-arm/samples/stylings_stories-Stylings-stories-Texture-bar-should-use-custom-path-chrome/stylings-stories/texture/bar/should-use-custom-path-actual.png) handy for debugging
|
a cropped down snapshot of one of the [ubuntu-x86-vs-ubuntu-arm samples](../ubuntu-x86-vs-ubuntu-arm/samples/stylings_stories-Stylings-stories-Texture-bar-should-use-custom-path-chrome/stylings-stories/texture/bar/should-use-custom-path-actual.png) handy for debugging
|
||||||
purposes.
|
purposes.
|
||||||
|
|
|
@ -171,7 +171,7 @@ it('should support offline option', async ({ server, launchPersistent }) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should support acceptDownloads option', async ({ server, launchPersistent, mode }) => {
|
it('should support acceptDownloads option', async ({ server, launchPersistent, mode }) => {
|
||||||
it.skip(mode !== 'default', 'download.path() is not avaialble in remote mode');
|
it.skip(mode !== 'default', 'download.path() is not available in remote mode');
|
||||||
|
|
||||||
const { page } = await launchPersistent();
|
const { page } = await launchPersistent();
|
||||||
server.setRoute('/download', (req, res) => {
|
server.setRoute('/download', (req, res) => {
|
||||||
|
|
|
@ -21,7 +21,7 @@ it('should load svg favicon with prefer-color-scheme', async ({ page, server, br
|
||||||
it.skip(headless && browserName !== 'firefox', 'headless browsers, except firefox, do not request favicons');
|
it.skip(headless && browserName !== 'firefox', 'headless browsers, except firefox, do not request favicons');
|
||||||
it.skip(!headless && browserName === 'webkit' && !channel, 'headed webkit does not have a favicon feature');
|
it.skip(!headless && browserName === 'webkit' && !channel, 'headed webkit does not have a favicon feature');
|
||||||
|
|
||||||
// Browsers aggresively cache favicons, so force bust with the
|
// Browsers aggressively cache favicons, so force bust with the
|
||||||
// `d` parameter to make iterating on this test more predictable and isolated.
|
// `d` parameter to make iterating on this test more predictable and isolated.
|
||||||
const favicon = `/favicon.svg?d=${Date.now()}`;
|
const favicon = `/favicon.svg?d=${Date.now()}`;
|
||||||
server.setRoute(favicon, (req, res) => {
|
server.setRoute(favicon, (req, res) => {
|
||||||
|
|
|
@ -131,7 +131,7 @@ browserTest.describe('page screenshot', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
browserTest('should work with large size', async ({ browserName, headless, platform, contextFactory }) => {
|
browserTest('should work with large size', async ({ browserName, headless, platform, contextFactory }) => {
|
||||||
browserTest.fixme(browserName === 'chromium' && !headless && platform === 'linux', 'Chromium has gpu problems on linux with large screnshots');
|
browserTest.fixme(browserName === 'chromium' && !headless && platform === 'linux', 'Chromium has gpu problems on linux with large screenshots');
|
||||||
browserTest.slow(true, 'Large screenshot is slow');
|
browserTest.slow(true, 'Large screenshot is slow');
|
||||||
|
|
||||||
const context = await contextFactory();
|
const context = await contextFactory();
|
||||||
|
|
|
@ -28,7 +28,7 @@ it('should send all of the correct events @smoke', async ({ page }) => {
|
||||||
await page.tap('#a');
|
await page.tap('#a');
|
||||||
const eventsHandle = await trackEvents(await page.$('#b'));
|
const eventsHandle = await trackEvents(await page.$('#b'));
|
||||||
await page.tap('#b');
|
await page.tap('#b');
|
||||||
// webkit doesnt send pointerenter or pointerleave or mouseout
|
// webkit doesn't send pointerenter or pointerleave or mouseout
|
||||||
expect(await eventsHandle.jsonValue()).toEqual([
|
expect(await eventsHandle.jsonValue()).toEqual([
|
||||||
'pointerover', 'pointerenter',
|
'pointerover', 'pointerenter',
|
||||||
'pointerdown', 'touchstart',
|
'pointerdown', 'touchstart',
|
||||||
|
@ -96,7 +96,7 @@ it('should wait for a navigation caused by a tap', async ({ page, server }) => {
|
||||||
let resolved = false;
|
let resolved = false;
|
||||||
const tapPromise = page.tap('a').then(() => resolved = true);
|
const tapPromise = page.tap('a').then(() => resolved = true);
|
||||||
const response = await responsePromise;
|
const response = await responsePromise;
|
||||||
// make sure the tap doesnt resolve too early
|
// make sure the tap doesn't resolve too early
|
||||||
await new Promise(x => setTimeout(x, 100));
|
await new Promise(x => setTimeout(x, 100));
|
||||||
expect(resolved).toBe(false);
|
expect(resolved).toBe(false);
|
||||||
|
|
||||||
|
|
|
@ -356,7 +356,7 @@ it('should properly serialize PerformanceMeasure object', async ({ page }) => {
|
||||||
}]);
|
}]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('shuld properly serialize window.performance object', async ({ page }) => {
|
it('should properly serialize window.performance object', async ({ page }) => {
|
||||||
expect(await page.evaluate(() => performance)).toEqual({
|
expect(await page.evaluate(() => performance)).toEqual({
|
||||||
'navigation': {
|
'navigation': {
|
||||||
'redirectCount': 0,
|
'redirectCount': 0,
|
||||||
|
@ -482,7 +482,7 @@ it('should not throw an error when evaluation does a navigation', async ({ page,
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should not throw an error when evaluation does a synchronous navigation and returns an object', async ({ page, server, browserName }) => {
|
it('should not throw an error when evaluation does a synchronous navigation and returns an object', async ({ page, server, browserName }) => {
|
||||||
// It is imporant to be on about:blank for sync reload.
|
// It is important to be on about:blank for sync reload.
|
||||||
const result = await page.evaluate(() => {
|
const result = await page.evaluate(() => {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
return { a: 42 };
|
return { a: 42 };
|
||||||
|
@ -491,7 +491,7 @@ it('should not throw an error when evaluation does a synchronous navigation and
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should not throw an error when evaluation does a synchronous navigation and returns undefined', async ({ page }) => {
|
it('should not throw an error when evaluation does a synchronous navigation and returns undefined', async ({ page }) => {
|
||||||
// It is imporant to be on about:blank for sync reload.
|
// It is important to be on about:blank for sync reload.
|
||||||
const result = await page.evaluate(() => {
|
const result = await page.evaluate(() => {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
return undefined;
|
return undefined;
|
||||||
|
|
|
@ -132,7 +132,7 @@ it('should resolve responses after a navigation', async ({ page, server, browser
|
||||||
const responsePromise = request.response();
|
const responsePromise = request.response();
|
||||||
// navigate, which should cancel the request
|
// navigate, which should cancel the request
|
||||||
await page.goto(server.CROSS_PROCESS_PREFIX);
|
await page.goto(server.CROSS_PROCESS_PREFIX);
|
||||||
// make sure we arent stalling this request on the server
|
// make sure we aren't stalling this request on the server
|
||||||
responseFromServer.end('done');
|
responseFromServer.end('done');
|
||||||
// the response should resolve to null, because the page navigated.
|
// the response should resolve to null, because the page navigated.
|
||||||
expect(await responsePromise).toBe(null);
|
expect(await responsePromise).toBe(null);
|
||||||
|
|
|
@ -73,11 +73,11 @@ for (const [name, url] of Object.entries(reacts)) {
|
||||||
it('should exact match by props', async ({ page }) => {
|
it('should exact match by props', async ({ page }) => {
|
||||||
await expect(page.locator(`_react=BookItem[name = "The Great Gatsby"]`)).toHaveText('The Great Gatsby');
|
await expect(page.locator(`_react=BookItem[name = "The Great Gatsby"]`)).toHaveText('The Great Gatsby');
|
||||||
await expect(page.locator(`_react=BookItem[name = "The Great Gatsby"]`)).toHaveCount(1);
|
await expect(page.locator(`_react=BookItem[name = "The Great Gatsby"]`)).toHaveCount(1);
|
||||||
// case sensetive by default
|
// case sensitive by default
|
||||||
await expect(page.locator(`_react=BookItem[name = "the great gatsby"]`)).toHaveCount(0);
|
await expect(page.locator(`_react=BookItem[name = "the great gatsby"]`)).toHaveCount(0);
|
||||||
await expect(page.locator(`_react=BookItem[name = "the great gatsby" s]`)).toHaveCount(0);
|
await expect(page.locator(`_react=BookItem[name = "the great gatsby" s]`)).toHaveCount(0);
|
||||||
await expect(page.locator(`_react=BookItem[name = "the great gatsby" S]`)).toHaveCount(0);
|
await expect(page.locator(`_react=BookItem[name = "the great gatsby" S]`)).toHaveCount(0);
|
||||||
// case insensetive with flag
|
// case insensitive with flag
|
||||||
await expect(page.locator(`_react=BookItem[name = "the great gatsby" i]`)).toHaveCount(1);
|
await expect(page.locator(`_react=BookItem[name = "the great gatsby" i]`)).toHaveCount(1);
|
||||||
await expect(page.locator(`_react=BookItem[name = "the great gatsby" I]`)).toHaveCount(1);
|
await expect(page.locator(`_react=BookItem[name = "the great gatsby" I]`)).toHaveCount(1);
|
||||||
await expect(page.locator(`_react=BookItem[name = " The Great Gatsby "]`)).toHaveCount(0);
|
await expect(page.locator(`_react=BookItem[name = " The Great Gatsby "]`)).toHaveCount(0);
|
||||||
|
|
|
@ -350,7 +350,7 @@ test('should work without config file', async ({ runInlineTest }) => {
|
||||||
expect(skipped).toBe(0);
|
expect(skipped).toBe(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should inerhit use options in projects', async ({ runInlineTest }) => {
|
test('should inherit use options in projects', async ({ runInlineTest }) => {
|
||||||
const result = await runInlineTest({
|
const result = await runInlineTest({
|
||||||
'playwright.config.ts': `
|
'playwright.config.ts': `
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
|
@ -386,7 +386,7 @@ test('should render all annotations to testcase value based properties, if reque
|
||||||
expect(result.exitCode).toBe(0);
|
expect(result.exitCode).toBe(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should embed attachments to a custom testcase property, if explictly requested', async ({ runInlineTest }) => {
|
test('should embed attachments to a custom testcase property, if explicitly requested', async ({ runInlineTest }) => {
|
||||||
const result = await runInlineTest({
|
const result = await runInlineTest({
|
||||||
'playwright.config.ts': `
|
'playwright.config.ts': `
|
||||||
const xrayOptions = {
|
const xrayOptions = {
|
||||||
|
@ -425,7 +425,7 @@ test('should embed attachments to a custom testcase property, if explictly reque
|
||||||
expect(result.exitCode).toBe(0);
|
expect(result.exitCode).toBe(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should not embed attachments to a custom testcase property, if not explictly requested', async ({ runInlineTest }) => {
|
test('should not embed attachments to a custom testcase property, if not explicitly requested', async ({ runInlineTest }) => {
|
||||||
const result = await runInlineTest({
|
const result = await runInlineTest({
|
||||||
'a.test.js': `
|
'a.test.js': `
|
||||||
const { test } = pwt;
|
const { test } = pwt;
|
||||||
|
|
|
@ -43,7 +43,7 @@ test('should not leak fixtures w/o page', async ({}) => {
|
||||||
|
|
||||||
test('should not leak server-side objects', async ({ page }) => {
|
test('should not leak server-side objects', async ({ page }) => {
|
||||||
expect(await queryObjectCount(require('../../packages/playwright-core/lib/server/page').Page)).toBe(1);
|
expect(await queryObjectCount(require('../../packages/playwright-core/lib/server/page').Page)).toBe(1);
|
||||||
// 4 is because v8 heap creates obejcts for descendant classes, so WKContext, CRContext, FFContext and our context instance.
|
// 4 is because v8 heap creates objects for descendant classes, so WKContext, CRContext, FFContext and our context instance.
|
||||||
expect(await queryObjectCount(require('../../packages/playwright-core/lib/server/browserContext').BrowserContext)).toBe(4);
|
expect(await queryObjectCount(require('../../packages/playwright-core/lib/server/browserContext').BrowserContext)).toBe(4);
|
||||||
expect(await queryObjectCount(require('../../packages/playwright-core/lib/server/browser').Browser)).toBe(4);
|
expect(await queryObjectCount(require('../../packages/playwright-core/lib/server/browser').Browser)).toBe(4);
|
||||||
});
|
});
|
||||||
|
|
Загрузка…
Ссылка в новой задаче