From ac8ad1050ed5e59b8961717b0eaaa5e845ace879 Mon Sep 17 00:00:00 2001 From: Nav-2d Date: Thu, 15 Jul 2021 10:25:36 -0700 Subject: [PATCH] docs(intro-js): make js and ts example consistent (#7651) --- docs/src/intro-js.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/src/intro-js.md b/docs/src/intro-js.md index 9cac8df33e..785e2a2735 100644 --- a/docs/src/intro-js.md +++ b/docs/src/intro-js.md @@ -267,6 +267,9 @@ test('my test', async ({ page }) => { // Expect an attribute "to be strictly equal" to the value. expect(await page.getAttribute('text=Get Started', 'href')).toBe('/docs/intro'); + // Expect an element "to be visible". + expect(await page.isVisible('text=Learn more')).toBeTruthy(); + await page.click('text=Get Started'); // Expect some text to be visible on the page. expect(await page.waitForSelector('text=System requirements')).toBeTruthy();