mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +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,
|
||||
Key,
|
||||
KnownAttrSelectors,
|
||||
LastAction,
|
||||
LogEntry,
|
||||
Point,
|
||||
PressKeyAction,
|
||||
|
||||
+11
-1
@@ -102,10 +102,20 @@ export interface ExceptionRecord {
|
||||
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 {
|
||||
snapshots: Snapshots;
|
||||
ax: AccessibilityTree;
|
||||
lastAction: Action | null;
|
||||
lastAction: LastAction | null;
|
||||
time: number;
|
||||
logs: readonly LogEntry[];
|
||||
exceptions: readonly ExceptionRecord[];
|
||||
|
||||
Reference in new issue
Block a user