@orkestrel/test 0.0.22 → 0.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1007,16 +1007,16 @@ export declare function describeTree(element: Element): string;
|
|
|
1007
1007
|
* @param name - The target's name, as the refusals voice it.
|
|
1008
1008
|
* @returns A promise resolving after the control enters its pressed state.
|
|
1009
1009
|
* @throws Thrown when a pointer is already held, the resolver refuses, the target stays outside
|
|
1010
|
-
* the viewport after scrolling,
|
|
1011
|
-
*
|
|
1010
|
+
* the viewport after scrolling, the frame wait fails, the pressed-state read fails, or the press
|
|
1011
|
+
* misses. A frame wait or pressed-state read that fails releases the pointer before the refusal,
|
|
1012
|
+
* and a failure whose release also fails carries the release rejection as its cause.
|
|
1012
1013
|
*
|
|
1013
1014
|
* @remarks
|
|
1014
1015
|
* This is the one pointer drive every hold verb shares: the held-marker refusal, a scroll that
|
|
1015
1016
|
* brings a wholly off-viewport target into view and a refusal for one that stays outside, the
|
|
1016
1017
|
* centre mapped through the tester iframe's painted scale into page coordinates, the trusted move
|
|
1017
|
-
* and press, the marker,
|
|
1018
|
-
*
|
|
1019
|
-
* name is.
|
|
1018
|
+
* and press, the marker, and the frame wait and the `:active` read-back that both release before
|
|
1019
|
+
* refusing. The refusal precedes resolution, so a double hold is refused before an absent name is.
|
|
1020
1020
|
*
|
|
1021
1021
|
* @example
|
|
1022
1022
|
* ```ts
|
|
@@ -630,16 +630,16 @@ async function holdAccessibleWithin(region, role, name) {
|
|
|
630
630
|
* @param name - The target's name, as the refusals voice it.
|
|
631
631
|
* @returns A promise resolving after the control enters its pressed state.
|
|
632
632
|
* @throws Thrown when a pointer is already held, the resolver refuses, the target stays outside
|
|
633
|
-
* the viewport after scrolling,
|
|
634
|
-
*
|
|
633
|
+
* the viewport after scrolling, the frame wait fails, the pressed-state read fails, or the press
|
|
634
|
+
* misses. A frame wait or pressed-state read that fails releases the pointer before the refusal,
|
|
635
|
+
* and a failure whose release also fails carries the release rejection as its cause.
|
|
635
636
|
*
|
|
636
637
|
* @remarks
|
|
637
638
|
* This is the one pointer drive every hold verb shares: the held-marker refusal, a scroll that
|
|
638
639
|
* brings a wholly off-viewport target into view and a refusal for one that stays outside, the
|
|
639
640
|
* centre mapped through the tester iframe's painted scale into page coordinates, the trusted move
|
|
640
|
-
* and press, the marker,
|
|
641
|
-
*
|
|
642
|
-
* name is.
|
|
641
|
+
* and press, the marker, and the frame wait and the `:active` read-back that both release before
|
|
642
|
+
* refusing. The refusal precedes resolution, so a double hold is refused before an absent name is.
|
|
643
643
|
*
|
|
644
644
|
* @example
|
|
645
645
|
* ```ts
|
|
@@ -675,14 +675,16 @@ async function driveHold(resolve, name) {
|
|
|
675
675
|
clickCount: 1
|
|
676
676
|
});
|
|
677
677
|
document.documentElement.setAttribute(POINTER_HOLD, `${String(x)}x${String(y)}`);
|
|
678
|
-
|
|
679
|
-
|
|
678
|
+
try {
|
|
679
|
+
await waitForFrame();
|
|
680
|
+
if (!target.matches(":active")) throw new Error(`Interactive target "${name}" did not enter the pressed state`);
|
|
681
|
+
} catch (error) {
|
|
680
682
|
try {
|
|
681
683
|
await releasePointer();
|
|
682
684
|
} catch (cause) {
|
|
683
|
-
throw new Error(
|
|
685
|
+
throw new Error(error instanceof Error ? error.message : String(error), { cause });
|
|
684
686
|
}
|
|
685
|
-
throw
|
|
687
|
+
throw error;
|
|
686
688
|
}
|
|
687
689
|
}
|
|
688
690
|
/**
|