Skip to content

Commit e5b2fbd

Browse files
committed
cherry-pick(#36767): test: speculative fix for flaky role selectors test
1 parent 63c168f commit e5b2fbd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/library/role-utils.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,11 +439,12 @@ test('control embedded in a target element', async ({ page }) => {
439439
expect.soft(await getNameAndRole(page, 'h1')).toEqual({ role: 'heading', name: 'Foo bar' });
440440
});
441441

442-
test('svg role=presentation', async ({ page }) => {
442+
test('svg role=presentation', async ({ page, server }) => {
443443
test.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/26809' });
444444

445+
await page.goto(server.EMPTY_PAGE);
445446
await page.setContent(`
446-
<img src="http://example.com/image.png" alt="Code is Poetry." />
447+
<img src="pptr.png" alt="Code is Poetry." />
447448
<svg viewBox="0 0 100 100" width="16" height="16" xmlns="http://www.w3.org/2000/svg" role="presentation" focusable="false"><circle cx="50" cy="50" r="50"></circle></svg>
448449
`);
449450
expect.soft(await getNameAndRole(page, 'img')).toEqual({ role: 'img', name: 'Code is Poetry.' });

0 commit comments

Comments
 (0)