docs: Soft expect example + tobeAttached (#23475)

This commit is contained in:
Debbie O'Brien 2023-06-06 11:06:55 -07:00 committed by GitHub
parent 93e6a2f679
commit 5e0195f7c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,6 +24,7 @@ By default, the timeout for assertions is set to 5 seconds. Learn more about [va
| Assertion | Description |
| :- | :- |
| [`method: LocatorAssertions.toBeAttached`] | Element is attached |
| [`method: LocatorAssertions.toBeChecked`] | Checkbox is checked |
| [`method: LocatorAssertions.toBeDisabled`] | Element is disabled |
| [`method: LocatorAssertions.toBeEditable`] | Element is editable |
@ -132,6 +133,7 @@ await slowExpect(locator).toHaveText('Submit');
// Always do soft assertions.
const softExpect = expect.configure({ soft: true });
await softExpect(locator).toHaveText('Submit');
```
## expect.poll