mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
test: content that does not work without useInnerText (#13781)
This commit is contained in:
parent
9cc5f3dba1
commit
5588defa22
@ -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 });
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user