mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix(best-practices): delete dublicate sentence (#20885)
This commit is contained in:
parent
4feb7c9e3b
commit
5899348936
@ -140,7 +140,7 @@ Assertions are a way to verify that the expected result and the actual result ma
|
||||
|
||||
#### Don't use manual assertions
|
||||
|
||||
Don't use manual assertions that are not awaiting the expect. In the code below the await is inside the expect rather than before it. When using assertions such as `isVisible()` the test wont wait a single second, it will just check the locator is there and return immediately. Use web first assertions such as `toBeVisible()` instead.
|
||||
Don't use manual assertions that are not awaiting the expect. In the code below the await is inside the expect rather than before it. When using assertions such as `isVisible()` the test wont wait a single second, it will just check the locator is there and return immediately.
|
||||
|
||||
```js
|
||||
👎 expect(await page.getByText('welcome').isVisible()).toBe(true);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user