test(chrome): the handle and the enumeration agree on editable too

The helper compared clickable alone, so the inherited-contenteditable bug
was caught by unit test only and never in a real browser.
This commit is contained in:
pj committed 2026-08-18 00:15:55 +05:30
1 parent 93580e076d
commit 04327e63b6
3 files changed
+46 -20

No files matched your search

+6 -1
View File
@@ -17,7 +17,11 @@ const { collectTargets, targetElements, buildAx } = __testing__;
// reaches them and the way internal/verifier/llm.go handleLabel reads them, so
// the comparison runs over what the model is actually shown rather than over a
// recomputation of it.
type AxHandle = { attrs?: Record<string, string>; clickable?: boolean };
type AxHandle = {
attrs?: Record<string, string>;
clickable?: boolean;
editable?: boolean;
};
type Ax = { find(selector: unknown): AxHandle | undefined };
function handleOf(ax: Ax, id: string): AxHandle | undefined {
@@ -45,6 +49,7 @@ function domFacts(): unknown[] {
scrollable: target.scrollable,
hintText: handle?.attrs?.hintText ?? "",
handleClickable: handle?.clickable ?? false,
handleEditable: handle?.editable ?? false,
width: target.width ?? 0,
height: target.height ?? 0,
};