mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-04 20:17:09 +00:00
feat(spec): add DoubleTap action type and constructor
This commit is contained in:
1 parent
a9b2b4b4e1
commit
7006e82ca4
3 files changed
+10
No files matched your search
@@ -2,6 +2,7 @@ import type {
|
|||||||
AccessibilityElement,
|
AccessibilityElement,
|
||||||
Action,
|
Action,
|
||||||
ActionGenerator,
|
ActionGenerator,
|
||||||
|
DoubleTapAction,
|
||||||
InputTextAction,
|
InputTextAction,
|
||||||
Key,
|
Key,
|
||||||
Point,
|
Point,
|
||||||
@@ -42,6 +43,10 @@ export function Tap(parameters: { on: string | AccessibilityElement }): TapActio
|
|||||||
return globalThis.__sanderling__.tap(parameters);
|
return globalThis.__sanderling__.tap(parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function DoubleTap(parameters: { on: string | AccessibilityElement }): DoubleTapAction {
|
||||||
|
return globalThis.__sanderling__.doubleTap(parameters);
|
||||||
|
}
|
||||||
|
|
||||||
export function InputText(parameters: {
|
export function InputText(parameters: {
|
||||||
into: string | AccessibilityElement;
|
into: string | AccessibilityElement;
|
||||||
text: string;
|
text: string;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ export type {
|
|||||||
Action,
|
Action,
|
||||||
ActionGenerator,
|
ActionGenerator,
|
||||||
AttrSelector,
|
AttrSelector,
|
||||||
|
DoubleTapAction,
|
||||||
EventuallyFormula,
|
EventuallyFormula,
|
||||||
ExceptionRecord,
|
ExceptionRecord,
|
||||||
Extracted,
|
Extracted,
|
||||||
@@ -30,6 +31,7 @@ export type {
|
|||||||
export { extract, keyedBy } from "./extract.ts";
|
export { extract, keyedBy } from "./extract.ts";
|
||||||
export { always, eventually, next, now } from "./ltl.ts";
|
export { always, eventually, next, now } from "./ltl.ts";
|
||||||
export {
|
export {
|
||||||
|
DoubleTap,
|
||||||
InputText,
|
InputText,
|
||||||
PressKey,
|
PressKey,
|
||||||
Swipe,
|
Swipe,
|
||||||
|
|||||||
@@ -133,6 +133,7 @@ export interface Point {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export type TapAction = { kind: "Tap"; on: string | AccessibilityElement };
|
export type TapAction = { kind: "Tap"; on: string | AccessibilityElement };
|
||||||
|
export type DoubleTapAction = { kind: "DoubleTap"; on: string | AccessibilityElement };
|
||||||
export type InputTextAction = {
|
export type InputTextAction = {
|
||||||
kind: "InputText";
|
kind: "InputText";
|
||||||
into: string | AccessibilityElement;
|
into: string | AccessibilityElement;
|
||||||
@@ -148,6 +149,7 @@ export type PressKeyAction = { kind: "PressKey"; key: Key };
|
|||||||
export type WaitAction = { kind: "Wait"; durationMillis: number };
|
export type WaitAction = { kind: "Wait"; durationMillis: number };
|
||||||
export type Action =
|
export type Action =
|
||||||
| TapAction
|
| TapAction
|
||||||
|
| DoubleTapAction
|
||||||
| InputTextAction
|
| InputTextAction
|
||||||
| SwipeAction
|
| SwipeAction
|
||||||
| PressKeyAction
|
| PressKeyAction
|
||||||
@@ -194,6 +196,7 @@ export interface SanderlingRuntime {
|
|||||||
weighted: (...entries: WeightedEntry[]) => ActionGenerator;
|
weighted: (...entries: WeightedEntry[]) => ActionGenerator;
|
||||||
from: <T>(items: readonly T[]) => Sampler<T>;
|
from: <T>(items: readonly T[]) => Sampler<T>;
|
||||||
tap: (parameters: { on: string | AccessibilityElement }) => TapAction;
|
tap: (parameters: { on: string | AccessibilityElement }) => TapAction;
|
||||||
|
doubleTap: (parameters: { on: string | AccessibilityElement }) => DoubleTapAction;
|
||||||
inputText: (parameters: {
|
inputText: (parameters: {
|
||||||
into: string | AccessibilityElement;
|
into: string | AccessibilityElement;
|
||||||
text: string;
|
text: string;
|
||||||
|
|||||||
Reference in new issue
Block a user