feat(browser): add snapshot refs=aria mode

This commit is contained in:
Peter Steinberger committed 2026-01-15 10:22:29 +00:00
1 parent 0facc63019
commit 4f1a4ab072
13 files changed
+210 -1

No files matched your search

+10
View File
@@ -62,6 +62,16 @@ describe("pw-session refLocator", () => {
expect(mocks.getByRole).toHaveBeenCalled();
});
it("uses aria-ref locators when refs mode is aria", () => {
const { page, mocks } = fakePage();
const state = ensurePageState(page);
state.roleRefsMode = "aria";
refLocator(page, "e1");
expect(mocks.locator).toHaveBeenCalledWith("aria-ref=e1");
});
});
describe("pw-session role refs cache", () => {