docs: fix auth example (#4528)

We should wait for selector instead of asserting it.
This commit is contained in:
Dmitry Gozman 2020-11-25 11:32:46 -08:00 committed by GitHub
parent 62f7437a2c
commit 8cc8b777d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -50,5 +50,5 @@ const account = { login: '', password: '' };
const verifyIsLoggedIn = async (page) => { const verifyIsLoggedIn = async (page) => {
await page.click('summary[aria-label="View profile and more"]') await page.click('summary[aria-label="View profile and more"]')
assert(await page.$(`text="Your profile"`)); assert(await page.waitForSelector(`text="Your profile"`));
} }