chore: fix the first test example

This commit is contained in:
Pavel Feldman 2021-08-16 16:58:48 -07:00
parent 2aff06ec73
commit 3f4a791cb7

View File

@ -41,7 +41,7 @@ const { test, expect } = require('@playwright/test');
test('basic test', async ({ page }) => { test('basic test', async ({ page }) => {
await page.goto('https://playwright.dev/'); await page.goto('https://playwright.dev/');
const title = page.locator('.navbar__title'); const title = page.locator('.navbar__inner .navbar__title');
await expect(title).toHaveText('Playwright'); await expect(title).toHaveText('Playwright');
}); });
``` ```
@ -51,7 +51,7 @@ import { test, expect } from '@playwright/test';
test('basic test', async ({ page }) => { test('basic test', async ({ page }) => {
await page.goto('https://playwright.dev/'); await page.goto('https://playwright.dev/');
const title = page.locator('.navbar__title'); const title = page.locator('.navbar__inner .navbar__title');
await expect(title).toHaveText('Playwright'); await expect(title).toHaveText('Playwright');
}); });
``` ```