test(browser): tap a role-based control end to end

every control on the page is an <li role="option">, the shape the
replay ui gives its step rows, and the spec carries no action of its
own: the property firing is the evidence the default enumeration offered
a tap on one.
This commit is contained in:
pj committed 2026-08-15 12:46:13 +05:30
1 parent a460eba3db
commit f3096d195b
3 files changed
+57

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
import { always, extract, taps } from "@sanderling/spec";
const selections = extract((s) => {
const el = s.ax.find({ id: "selected" });
return el ? parseInt(el.text, 10) || 0 : 0;
}).named("selections");
// Every control on the page is an <li role="option">, the shape the replay UI
// gives its own step rows. Nothing else can move this counter, so the spec
// carries no action of its own: this property firing IS the evidence that the
// default enumeration offered a tap on a role-based control.
const noRowWasEverSelected = always(() => selections.current === 0);
export const properties = { noRowWasEverSelected };
export const actionsRoot = taps;