feat(browser): add snapshot refs=aria mode

This commit is contained in:
Peter Steinberger
2026-01-15 10:16:33 +00:00
parent 0facc63019
commit 4f1a4ab072
13 changed files with 210 additions and 1 deletions

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", () => {