Skip to content

Commit b7f89a1

Browse files
committed
Aria snapshot ref test
1 parent 69dc3bd commit b7f89a1

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/async/test_page_aria_snapshot.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,14 @@ async def test_should_snapshot_complex(page: Page) -> None:
9191
- link "link"
9292
""",
9393
)
94+
95+
96+
async def test_should_snapshot_with_ref(page: Page) -> None:
97+
await page.set_content('<ul><li><a href="about:blank">link</a></li></ul>')
98+
expected = """
99+
- list [ref=s1e3]:
100+
- listitem [ref=s1e4]:
101+
- link "link" [ref=s1e5]:
102+
- /url: about:blank
103+
"""
104+
assert await page.locator("body").aria_snapshot(ref=True) == _unshift(expected)

0 commit comments

Comments
 (0)