Skip to content

test: speculative fix for flaky role selectors test #36767

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tests/library/role-utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,11 +439,12 @@ test('control embedded in a target element', async ({ page }) => {
expect.soft(await getNameAndRole(page, 'h1')).toEqual({ role: 'heading', name: 'Foo bar' });
});

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

await page.goto(server.EMPTY_PAGE);
await page.setContent(`
<img src="http://example.com/image.png" alt="Code is Poetry." />
<img src="pptr.png" alt="Code is Poetry." />
<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>
`);
expect.soft(await getNameAndRole(page, 'img')).toEqual({ role: 'img', name: 'Code is Poetry.' });
Expand Down
Loading