mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-04 20:17:09 +00:00
feat(spec): give state.lastAction an applied field
Three states, not two: no action is a null lastAction, applied: true is an action the runner confirmed, applied: null is one it dispatched and never learned the fate of.
This commit is contained in:
1 parent
6e52fa0837
commit
5b08e09d6f
2 files changed
+12
-1
No files matched your search
@@ -12,6 +12,7 @@ export type {
|
|||||||
InputTextAction,
|
InputTextAction,
|
||||||
Key,
|
Key,
|
||||||
KnownAttrSelectors,
|
KnownAttrSelectors,
|
||||||
|
LastAction,
|
||||||
LogEntry,
|
LogEntry,
|
||||||
Point,
|
Point,
|
||||||
PressKeyAction,
|
PressKeyAction,
|
||||||
|
|||||||
+11
-1
@@ -102,10 +102,20 @@ export interface ExceptionRecord {
|
|||||||
unixMillis?: number;
|
unixMillis?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The previous step's action as the runner reports it. `applied` is true when
|
||||||
|
* the runner saw the dispatch succeed and null when the apply call failed with
|
||||||
|
* the gesture possibly already delivered: an RPC deadline can fire after the
|
||||||
|
* tap landed. Null is unknown, not "it did not happen" (`state.lastAction` is
|
||||||
|
* itself null for that), so a property attributing an effect to this action
|
||||||
|
* has to decline unless `applied` is true.
|
||||||
|
*/
|
||||||
|
export type LastAction = Action & { applied: true | null };
|
||||||
|
|
||||||
export interface State {
|
export interface State {
|
||||||
snapshots: Snapshots;
|
snapshots: Snapshots;
|
||||||
ax: AccessibilityTree;
|
ax: AccessibilityTree;
|
||||||
lastAction: Action | null;
|
lastAction: LastAction | null;
|
||||||
time: number;
|
time: number;
|
||||||
logs: readonly LogEntry[];
|
logs: readonly LogEntry[];
|
||||||
exceptions: readonly ExceptionRecord[];
|
exceptions: readonly ExceptionRecord[];
|
||||||
|
|||||||
Reference in new issue
Block a user