Closed
Description
Bad:
await page.locator('.hello-world')
The code above is wrong because it doesn't do anything. We just await a locator and then throw it away, but that doesn't test anything.
Good:
await expect(page.locator('.hello-world')).toBeVisible()
or
await page.locator('.hello-world').waitFor()
or anything else, as long as you actually use the locator for something.