mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +00:00
test(chrome): compare checked, selected and focused across both producers
the target enumeration carries none of the three, so they reach a spec through the ax handle alone, and a selector naming one of them resolves against that same reading. the shadow fixture holds the focused control inside its shadow root, where document.activeElement names the mount element and only a producer that descends finds the field.
This commit is contained in:
1 parent
654c0afd90
commit
5404909e12
4 files changed
+50
No files matched your search
@@ -22,6 +22,9 @@ type AxHandle = {
|
||||
clickable?: boolean;
|
||||
editable?: boolean;
|
||||
secure?: boolean | null;
|
||||
checked?: boolean;
|
||||
selected?: boolean;
|
||||
focused?: boolean;
|
||||
};
|
||||
type Ax = { find(selector: unknown): AxHandle | undefined };
|
||||
|
||||
@@ -55,6 +58,13 @@ function domFacts(): unknown[] {
|
||||
// side compares it against a dump that leaves the fact out entirely for an
|
||||
// element no producer states it for.
|
||||
secure: handle?.secure ?? null,
|
||||
// The three states the target enumeration does not carry: they decide
|
||||
// nothing about which action is offered, so they reach a spec through the
|
||||
// handle alone, and a selector naming them resolves against the same
|
||||
// reading.
|
||||
checked: handle?.checked ?? false,
|
||||
selected: handle?.selected ?? false,
|
||||
focused: handle?.focused ?? false,
|
||||
width: target.width ?? 0,
|
||||
height: target.height ?? 0,
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user