test: content that does not work without useInnerText (#13781)

This commit is contained in:
Yury Semikhatsky 2022-04-27 15:48:38 -07:00 committed by GitHub
parent 9cc5f3dba1
commit 5588defa22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -272,7 +272,7 @@ test('should support toHaveText with innerText', async ({ runInlineTest }) => {
const { test } = pwt;
test('pass', async ({ page }) => {
await page.setContent('<div id=node>Text content</div>');
await page.setContent('<div id=node>Text <span hidden>garbage</span> content</div>');
const locator = page.locator('#node');
await expect(locator).toHaveText('Text content', { useInnerText: true });
});