docs: clarify that toBeHidden works when nothing matches (#17057)

This commit is contained in:
Dmitry Gozman 2022-09-02 16:36:19 -07:00 committed by GitHub
parent 74187290f1
commit 1dc2a33896
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -645,7 +645,7 @@ await Expect(locator).ToBeFocusedAsync();
* langs:
- alias-java: isHidden
Ensures the [Locator] points to a hidden DOM node, which is the opposite of [visible](./actionability.md#visible).
Ensures that [Locator] either does not resolve to any DOM node, or resolves to a [non-visible](./actionability.md#visible) one.
```js
const locator = page.locator('.my-element');
@ -686,7 +686,7 @@ await Expect(locator).ToBeHiddenAsync();
* langs:
- alias-java: isVisible
Ensures the [Locator] points to a [visible](./actionability.md#visible) DOM node.
Ensures that [Locator] points to an [attached](./actionability.md#visible) and [visible](./actionability.md#visible) DOM node.
```js
const locator = page.locator('.my-element');

View File

@ -3332,7 +3332,8 @@ interface LocatorAssertions {
}): Promise<void>;
/**
* Ensures the [Locator] points to a hidden DOM node, which is the opposite of [visible](https://playwright.dev/docs/api/actionability#visible).
* Ensures that [Locator] either does not resolve to any DOM node, or resolves to a
* [non-visible](https://playwright.dev/docs/api/actionability#visible) one.
*
* ```js
* const locator = page.locator('.my-element');
@ -3349,7 +3350,8 @@ interface LocatorAssertions {
}): Promise<void>;
/**
* Ensures the [Locator] points to a [visible](https://playwright.dev/docs/api/actionability#visible) DOM node.
* Ensures that [Locator] points to an [attached](https://playwright.dev/docs/api/actionability#visible) and [visible](https://playwright.dev/docs/api/actionability#visible) DOM
* node.
*
* ```js
* const locator = page.locator('.my-element');