@keepsnappy/appium-driver 0.1.0-alpha.22 → 0.1.0-alpha.24
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.
- package/README.md +4 -2
- package/dist/src/gestures.d.ts +41 -0
- package/dist/src/gestures.js +46 -6
- package/dist/src/gestures.js.map +1 -1
- package/dist/src/index.d.ts +4 -4
- package/dist/src/index.js +4 -4
- package/dist/src/index.js.map +1 -1
- package/dist/src/lists.d.ts +125 -18
- package/dist/src/lists.js +274 -104
- package/dist/src/lists.js.map +1 -1
- package/dist/src/run.js +2 -2
- package/dist/src/run.js.map +1 -1
- package/dist/src/scroll.d.ts +37 -15
- package/dist/src/scroll.js +196 -21
- package/dist/src/scroll.js.map +1 -1
- package/dist/src/session.d.ts +53 -9
- package/dist/src/session.js +101 -14
- package/dist/src/session.js.map +1 -1
- package/dist/src/webdriver.d.ts +22 -2
- package/dist/src/webdriver.js +79 -3
- package/dist/src/webdriver.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -63,9 +63,11 @@ await scrollCycles(t, {
|
|
|
63
63
|
});
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
-
`scrollList(t, { list, row, field, screen, above }, toward, { cache, hold })` is the one way the driver scrolls a list; every helper below sends its gesture through it. With `mustMove` (a to-top pass, the first fling of an end pass) the gesture is checked: one the device did not take (
|
|
66
|
+
`scrollList(t, { list, row, field, screen, above }, toward, { cache, hold })` is the one way the driver scrolls a list; every helper below sends its gesture through it. With `mustMove` (a to-top pass, the first fling of an end pass) the gesture is checked: one the device did not take (the held row's frame unchanged, both platforms) is confirmed by the row ids inside the list's frame, sent once more and counted in the driver log's `defects`; a second one throws `GestureNotTaken`. Every list gesture is one touch, `FLING`, on both platforms: from 85 % of the list frame to 25 % (toward the end) or from 30 % to 90 % (toward the top), i.e. 60 % of the list, at least 250 dp (Android) or pt (iOS), held for 150 ms. Android sends it as a native UiAutomator `mobile: swipeGesture` over that span at the speed that makes it last 150 ms (density cached per driver; a swipe answers when the finger lifts, a fling waits about 5 s for a scroll event), iOS as a 150 ms drag. A touch that would reach into the bottom system-gesture zone or past the window's top moves whole; its start stays at least 10 % of the list inside the list's frame, and a touch that still does not fit is cut and logs `clamped: true` and `travel`. An app takes a touch as a pan 19–60 ms after it lands, so a shorter touch can move nothing. `longScroll` is that gesture on a given rectangle. In a measured step `flingUntilShown` stops when any part of the target shows: three gestures maximum, five toward the top on iOS. `scrollUntilShown` exposes the same capped look/move loop for custom checks. `waitCoasted` waits for two matching row frames 300 ms apart (up to 3000 ms); `holdBeforeScroll` captures a row before an iOS gesture so coast checks can reuse its handle.
|
|
67
67
|
|
|
68
|
-
`scrollToEnd` performs three long scrolls. Each page marker starts a 3000 ms load wait after coast stops (6000 ms Android, 10000 ms iOS); scrolls without a page marker pause 500 ms.
|
|
68
|
+
`scrollToEnd` performs three long scrolls and no other: never a catch-up gesture. Each page marker starts a 3000 ms load wait after coast stops (6000 ms Android, 10000 ms iOS); scrolls without a page marker pause 500 ms. A page that has not landed fails the pass, or with `deferPages` is logged (`landed`) and left to navigation. `scrollCycles` repeats three end/top pairs, each step a fixed count of the measured gesture (3 toward the end, 2 toward the top), waiting for page markers only in cycle one; after each step a navigation pass finishes the way and the end check (`lastPage` loaded) and top check run.
|
|
69
|
+
|
|
70
|
+
Navigation passes (`navigate`, `Session.navigation`): getting somewhere — to the top, to the loaded end, a target into view — is not a measured gesture. A pass is wrapped in `nav` start/end markers, outside any measured step, and its list gestures are the navigation stroke (`NAV_STROKE`: a 100 ms slow move the app takes as a pan, then a 45 ms flick, one W3C actions call on both platforms). It ends when the target is found by lookup and the list's first and last rows are unchanged 300 ms apart, never on a frame test; two strokes that leave them as they were throw `NavigationStuck`. `flingUntilShown`, `scrollToTarget`, `Session.flingUntil` and `Session.scrollUntil` are navigation passes outside a step and send the measured gesture inside one. `pageNumbers` preserves numeric page labels in command summaries; otherwise summaries use selector descriptions. Page sizes and seed data stay in the journey's page selectors. Options expose the counts and timeouts; their defaults are exported constants. `frameTimeoutMs` (20000) bounds the wait for the list frame to stop moving, `checkTimeoutMs` (20000) bounds a step check (`passChecked`, `endChecked`; in `scrollCycles` the top check reads `fling.checkTimeoutMs`), and `lookWindowMs` (1000) is the window in which a look after a gesture is retried. The `lookMs` field in the log stays the cumulative time spent looking.
|
|
69
71
|
|
|
70
72
|
`passChecked` and `endChecked` create step checks; share a `ListCache` with `flingUntilShown`/`scrollToEnd` for each visit to a list. `passChecked` permits one repair using only the original pass's remaining budget. `scoped: false` searches globally when row selectors are unique. `field: 'text' | 'description'` limits Android row lookups to the attribute the app uses. `rowAlternatives(from, to, format)` builds page-marker alternations from journey data; `rowAtOrBelow` checks whether a row has moved under a boundary. `t.frameOf` and `t.settledFrame` expose the existing stale-safe frame readers for custom mechanics.
|
|
71
73
|
|
package/dist/src/gestures.d.ts
CHANGED
|
@@ -9,6 +9,14 @@ export interface Point {
|
|
|
9
9
|
/** Default scroll budget; the third gesture is logged as extra. */
|
|
10
10
|
export declare const LONG_SCROLL_CAP = 3;
|
|
11
11
|
export declare const LONG_SCROLL_PLANNED = 2;
|
|
12
|
+
/**
|
|
13
|
+
* The measured top step of `scrollCycles`: exactly `gestures` of them, sent without looking in between; the first row is looked
|
|
14
|
+
* for after them and a navigation pass finishes the way (F3, lab 10-29: one FLING never reaches the top of a TapIn-sized list,
|
|
15
|
+
* so the count was the same either way and the look cost 2–4 s a step).
|
|
16
|
+
*/
|
|
17
|
+
export declare const TOP_STEP: {
|
|
18
|
+
readonly gestures: 2;
|
|
19
|
+
};
|
|
12
20
|
/** Additional iOS gestures allowed when returning to the top. */
|
|
13
21
|
export declare const IOS_TOP_EXTRA = 2;
|
|
14
22
|
/**
|
|
@@ -27,6 +35,33 @@ export declare const FLING: {
|
|
|
27
35
|
export declare const CLOSE_SWIPE_MS = 400;
|
|
28
36
|
export declare const TAP_HOLD_MS = 100;
|
|
29
37
|
export declare const BURST_GAP_MS = 45;
|
|
38
|
+
/**
|
|
39
|
+
* The navigation stroke: "take, then flick", for the passes that only get somewhere (return to top, go to the loaded end, bring a
|
|
40
|
+
* target into view) and never for a measured gesture. One touch in one W3C actions call: a slow first move over `slow` of the
|
|
41
|
+
* list's height in `slowMs`, which the app takes as a pan (it takes a touch 19–60 ms after it lands, up to 100 ms under load, so
|
|
42
|
+
* a touch that flicks at once is dropped by races: D1), then a fast move over the rest of the way in `fastMs`, so the release
|
|
43
|
+
* velocity is high and the list coasts about as far as the old 12 000 dp/s fling did. The span is 80 % of the list frame; its
|
|
44
|
+
* ends keep FLING's clearance (starts at least `startMargin` of the list inside its frame, ends above the bottom system zone).
|
|
45
|
+
* Navigation windows are keyed `nav:<list>` and never judged (ctl-arek-nav-scroll, D1 narrowed to measured gestures).
|
|
46
|
+
*/
|
|
47
|
+
export declare const NAV_STROKE: {
|
|
48
|
+
readonly end: readonly [0.9, 0.1];
|
|
49
|
+
readonly top: readonly [0.2, 1];
|
|
50
|
+
readonly slow: 0.1;
|
|
51
|
+
readonly slowMs: 100;
|
|
52
|
+
readonly fastMs: 45;
|
|
53
|
+
readonly minTravel: 250;
|
|
54
|
+
/**
|
|
55
|
+
* The drag a pass turns round with after a stroke carried a mid-list target past the view: from `margin` to 1 − `margin` of
|
|
56
|
+
* the list in `moveMs`, held `holdMs` before release so the list keeps no speed (Android drops velocity samples older than
|
|
57
|
+
* 40 ms): it moves 60 % of the list, so no row can be skipped.
|
|
58
|
+
*/
|
|
59
|
+
readonly precise: {
|
|
60
|
+
readonly margin: 0.2;
|
|
61
|
+
readonly moveMs: 600;
|
|
62
|
+
readonly holdMs: 150;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
30
65
|
/** A vertical touch in window units; `clamped` when the list left no room for its whole travel. */
|
|
31
66
|
export interface Stroke {
|
|
32
67
|
from: number;
|
|
@@ -34,11 +69,17 @@ export interface Stroke {
|
|
|
34
69
|
travel: number;
|
|
35
70
|
clamped: boolean;
|
|
36
71
|
}
|
|
72
|
+
/** The navigation stroke's touch: `mid` is where the slow move ends and the flick starts. */
|
|
73
|
+
export interface NavStroke extends Stroke {
|
|
74
|
+
mid: number;
|
|
75
|
+
}
|
|
37
76
|
/**
|
|
38
77
|
* FLING's touch in list frame `r` toward `toward`, in window units of which `unit` make a dp (Android) or pt (iOS), between the
|
|
39
78
|
* window's top and `safeBottom`. `start` replaces the frame's start fraction (a drawn row's centre).
|
|
40
79
|
*/
|
|
41
80
|
export declare function flingStroke(r: Rect, toward: ScrollDirection, unit: number, safeBottom: number, start?: number): Stroke;
|
|
81
|
+
/** NAV_STROKE's touch in list frame `r` toward `toward`, laid like flingStroke's; the slow move is its first `slow` of the list. */
|
|
82
|
+
export declare function navStroke(r: Rect, toward: ScrollDirection, unit: number, safeBottom: number): NavStroke;
|
|
42
83
|
/**
|
|
43
84
|
* Closes a sheet between window points. Android uses native dragGesture; iOS uses a 400 ms drag. Logs commands only.
|
|
44
85
|
* Does not consume readiness itself; use closeSwipeAt/From when readiness is pending.
|
package/dist/src/gestures.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
/** Default scroll budget; the third gesture is logged as extra. */
|
|
2
2
|
export const LONG_SCROLL_CAP = 3;
|
|
3
3
|
export const LONG_SCROLL_PLANNED = 2;
|
|
4
|
+
/**
|
|
5
|
+
* The measured top step of `scrollCycles`: exactly `gestures` of them, sent without looking in between; the first row is looked
|
|
6
|
+
* for after them and a navigation pass finishes the way (F3, lab 10-29: one FLING never reaches the top of a TapIn-sized list,
|
|
7
|
+
* so the count was the same either way and the look cost 2–4 s a step).
|
|
8
|
+
*/
|
|
9
|
+
export const TOP_STEP = { gestures: LONG_SCROLL_PLANNED };
|
|
4
10
|
/** Additional iOS gestures allowed when returning to the top. */
|
|
5
11
|
export const IOS_TOP_EXTRA = 2;
|
|
6
12
|
/**
|
|
@@ -20,13 +26,32 @@ export const CLOSE_SWIPE_MS = 400;
|
|
|
20
26
|
export const TAP_HOLD_MS = 100;
|
|
21
27
|
export const BURST_GAP_MS = 45;
|
|
22
28
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
29
|
+
* The navigation stroke: "take, then flick", for the passes that only get somewhere (return to top, go to the loaded end, bring a
|
|
30
|
+
* target into view) and never for a measured gesture. One touch in one W3C actions call: a slow first move over `slow` of the
|
|
31
|
+
* list's height in `slowMs`, which the app takes as a pan (it takes a touch 19–60 ms after it lands, up to 100 ms under load, so
|
|
32
|
+
* a touch that flicks at once is dropped by races: D1), then a fast move over the rest of the way in `fastMs`, so the release
|
|
33
|
+
* velocity is high and the list coasts about as far as the old 12 000 dp/s fling did. The span is 80 % of the list frame; its
|
|
34
|
+
* ends keep FLING's clearance (starts at least `startMargin` of the list inside its frame, ends above the bottom system zone).
|
|
35
|
+
* Navigation windows are keyed `nav:<list>` and never judged (ctl-arek-nav-scroll, D1 narrowed to measured gestures).
|
|
25
36
|
*/
|
|
26
|
-
export
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
37
|
+
export const NAV_STROKE = {
|
|
38
|
+
end: [0.9, 0.1],
|
|
39
|
+
top: [0.2, 1],
|
|
40
|
+
slow: 0.1,
|
|
41
|
+
slowMs: 100,
|
|
42
|
+
fastMs: 45,
|
|
43
|
+
minTravel: 250,
|
|
44
|
+
/**
|
|
45
|
+
* The drag a pass turns round with after a stroke carried a mid-list target past the view: from `margin` to 1 − `margin` of
|
|
46
|
+
* the list in `moveMs`, held `holdMs` before release so the list keeps no speed (Android drops velocity samples older than
|
|
47
|
+
* 40 ms): it moves 60 % of the list, so no row can be skipped.
|
|
48
|
+
*/
|
|
49
|
+
precise: { margin: 0.2, moveMs: 600, holdMs: 150 },
|
|
50
|
+
};
|
|
51
|
+
/** A touch from fraction `f` to `t` of list frame `r`, kept above `safeBottom` and its start inside the frame; see flingStroke. */
|
|
52
|
+
function fit(r, f, t, minTravel, unit, safeBottom, start) {
|
|
53
|
+
const travel = Math.round(Math.max(Math.abs(t - f) * r.height, minTravel * unit));
|
|
54
|
+
const step = t > f ? travel : -travel;
|
|
30
55
|
const clamp = (y) => Math.min(Math.max(y, 0), safeBottom);
|
|
31
56
|
let from = Math.round(start ?? r.y + r.height * f);
|
|
32
57
|
const below = Math.max(from, from + step) - safeBottom;
|
|
@@ -39,6 +64,21 @@ export function flingStroke(r, toward, unit, safeBottom, start) {
|
|
|
39
64
|
const to = clamp(from + step);
|
|
40
65
|
return { from, to, travel, clamped: Math.abs(to - from) < travel };
|
|
41
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* FLING's touch in list frame `r` toward `toward`, in window units of which `unit` make a dp (Android) or pt (iOS), between the
|
|
69
|
+
* window's top and `safeBottom`. `start` replaces the frame's start fraction (a drawn row's centre).
|
|
70
|
+
*/
|
|
71
|
+
export function flingStroke(r, toward, unit, safeBottom, start) {
|
|
72
|
+
const [f, t] = FLING[toward];
|
|
73
|
+
return fit(r, f, t, FLING.minTravel, unit, safeBottom, start);
|
|
74
|
+
}
|
|
75
|
+
/** NAV_STROKE's touch in list frame `r` toward `toward`, laid like flingStroke's; the slow move is its first `slow` of the list. */
|
|
76
|
+
export function navStroke(r, toward, unit, safeBottom) {
|
|
77
|
+
const [f, t] = NAV_STROKE[toward];
|
|
78
|
+
const s = fit(r, f, t, NAV_STROKE.minTravel, unit, safeBottom);
|
|
79
|
+
const slow = Math.min(Math.round(NAV_STROKE.slow * r.height), Math.floor(Math.abs(s.to - s.from) / 2));
|
|
80
|
+
return { ...s, mid: s.from + (s.to > s.from ? slow : -slow) };
|
|
81
|
+
}
|
|
42
82
|
/**
|
|
43
83
|
* Closes a sheet between window points. Android uses native dragGesture; iOS uses a 400 ms drag. Logs commands only.
|
|
44
84
|
* Does not consume readiness itself; use closeSwipeAt/From when readiness is pending.
|
package/dist/src/gestures.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gestures.js","sourceRoot":"","sources":["../../src/gestures.ts"],"names":[],"mappings":"AAMA,mEAAmE;AACnE,MAAM,CAAC,MAAM,eAAe,GA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ationLink, flushLink, g
|
|
|
3
3
|
export { defineJourney, type JourneyContext, type JourneyFn, type JourneyModule } from './journey.js';
|
|
4
4
|
export { ANDROID, IOS, PLATFORMS, platformOf, type Platform, type PlatformName } from './platform.js';
|
|
5
5
|
export { androidLocators, childOf, describeSelector, id, idText, locator, text, toSelector, type Selector, type SelectorLike } from './selectors.js';
|
|
6
|
-
export { FLUSH_END_RUN_FAILED, FLUSH_ERROR, FLUSH_OFF, FLUSH_NOT_ACKNOWLEDGED, FLUSH_RESEND_MS, FLUSH_UNREADABLE, FLUSH_WAIT_MS, type FlushEvidence, HOST_CLOCK_TRIPS, Session, sendMarkers, type ActionGc, type GestureDefect, type ClockTrip, type Condition, type Marker } from './session.js';
|
|
6
|
+
export { FLUSH_END_RUN_FAILED, FLUSH_ERROR, FLUSH_OFF, FLUSH_NOT_ACKNOWLEDGED, FLUSH_RESEND_MS, FLUSH_UNREADABLE, FLUSH_WAIT_MS, type FlushEvidence, HOST_CLOCK_TRIPS, NAV_EDGE_MS, NAV_STEP, Session, sendMarkers, type ActionGc, type GestureDefect, type ClockTrip, type Condition, type Marker } from './session.js';
|
|
7
7
|
export { loadElements, parseTokensJs, plan, type PlannedRun } from './tokens.js';
|
|
8
8
|
export { runDriver, DRIVER_OPTIONS, type IterationRecord, type RunDeps } from './run.js';
|
|
9
9
|
export { loadJourneyModule, main } from './load.js';
|
|
10
10
|
export { DRIVER_NAME, driverVersion, journeyVersion } from './version.js';
|
|
11
|
-
export { closeSwipe, closeSwipeAt, closeSwipeFrom, tapAllAt, flingStroke, FLING, LONG_SCROLL_CAP, LONG_SCROLL_PLANNED, IOS_TOP_EXTRA, CLOSE_SWIPE_MS, TAP_HOLD_MS, BURST_GAP_MS, type ScrollDirection, type Point, type Stroke } from './gestures.js';
|
|
12
|
-
export { rowAlternatives, rowAtOrBelow, scrollUntilShown, scrollCap, flingUntilShown, passChecked, scrollToEnd, endChecked, scrollCycles, scrollToTarget, END_SCROLLS, SCROLL_CYCLES, PAGE_PAUSE_MS, PAGE_WAIT_MS, PAGE_POLL_MS, PAGE_COAST_MAX_MS, PAGE_COAST_MAX_MS_IOS, LOOK_MS, LOOK_POLL_MS, CHECK_TIMEOUT_MS, TARGET_SETTLE_MS, type UntilShownOptions, type FlingUntilShownOptions, type ScrollToEndOptions, type EndCheckOptions, type PassCheckOptions, type ScrollCyclesOptions, type ScrollToTargetOptions } from './lists.js';
|
|
13
|
-
export { scrollList, GestureNotTaken, longScroll, androidScreenScroll, scrollFromDrawnRow, waitCoasted, holdBeforeScroll,
|
|
11
|
+
export { closeSwipe, closeSwipeAt, closeSwipeFrom, tapAllAt, flingStroke, navStroke, FLING, NAV_STROKE, LONG_SCROLL_CAP, LONG_SCROLL_PLANNED, TOP_STEP, IOS_TOP_EXTRA, CLOSE_SWIPE_MS, TAP_HOLD_MS, BURST_GAP_MS, type ScrollDirection, type Point, type Stroke, type NavStroke } from './gestures.js';
|
|
12
|
+
export { rowAlternatives, rowAtOrBelow, scrollUntilShown, scrollCap, flingUntilShown, passChecked, scrollToEnd, endChecked, scrollCycles, pagedToEnd, topMeasured, type PagedToEndOptions, type TopMeasuredOptions, scrollToTarget, navigate, END_SCROLLS, SCROLL_CYCLES, PAGE_PAUSE_MS, PAGE_WAIT_MS, PAGE_POLL_MS, PAGE_COAST_MAX_MS, PAGE_COAST_MAX_MS_IOS, LOOK_MS, LOOK_POLL_MS, CHECK_TIMEOUT_MS, TARGET_SETTLE_MS, NAV_MAX_MS, NAV_STUCK_STROKES, type NavigateOptions, type NavigateResult, type UntilShownOptions, type FlingUntilShownOptions, type ScrollToEndOptions, type EndCheckOptions, type PassCheckOptions, type ScrollCyclesOptions, type ScrollToTargetOptions } from './lists.js';
|
|
13
|
+
export { scrollList, GestureNotTaken, NavigationStuck, longScroll, androidScreenScroll, scrollFromDrawnRow, waitCoasted, holdBeforeScroll, COAST_POLL_MS, COAST_MAX_MS, type ScrollSpec, type ScrollOptions, type ScrollResult, type RowField, type ListHandle, type RowHold, type ListCache } from './scroll.js';
|
package/dist/src/index.js
CHANGED
|
@@ -3,12 +3,12 @@ export { END_GC_DEFAULT, RUN_DEFAULTS, acceptAlert, activationLink, flushLink, g
|
|
|
3
3
|
export { defineJourney } from './journey.js';
|
|
4
4
|
export { ANDROID, IOS, PLATFORMS, platformOf } from './platform.js';
|
|
5
5
|
export { androidLocators, childOf, describeSelector, id, idText, locator, text, toSelector } from './selectors.js';
|
|
6
|
-
export { FLUSH_END_RUN_FAILED, FLUSH_ERROR, FLUSH_OFF, FLUSH_NOT_ACKNOWLEDGED, FLUSH_RESEND_MS, FLUSH_UNREADABLE, FLUSH_WAIT_MS, HOST_CLOCK_TRIPS, Session, sendMarkers } from './session.js';
|
|
6
|
+
export { FLUSH_END_RUN_FAILED, FLUSH_ERROR, FLUSH_OFF, FLUSH_NOT_ACKNOWLEDGED, FLUSH_RESEND_MS, FLUSH_UNREADABLE, FLUSH_WAIT_MS, HOST_CLOCK_TRIPS, NAV_EDGE_MS, NAV_STEP, Session, sendMarkers } from './session.js';
|
|
7
7
|
export { loadElements, parseTokensJs, plan } from './tokens.js';
|
|
8
8
|
export { runDriver, DRIVER_OPTIONS } from './run.js';
|
|
9
9
|
export { loadJourneyModule, main } from './load.js';
|
|
10
10
|
export { DRIVER_NAME, driverVersion, journeyVersion } from './version.js';
|
|
11
|
-
export { closeSwipe, closeSwipeAt, closeSwipeFrom, tapAllAt, flingStroke, FLING, LONG_SCROLL_CAP, LONG_SCROLL_PLANNED, IOS_TOP_EXTRA, CLOSE_SWIPE_MS, TAP_HOLD_MS, BURST_GAP_MS } from './gestures.js';
|
|
12
|
-
export { rowAlternatives, rowAtOrBelow, scrollUntilShown, scrollCap, flingUntilShown, passChecked, scrollToEnd, endChecked, scrollCycles, scrollToTarget, END_SCROLLS, SCROLL_CYCLES, PAGE_PAUSE_MS, PAGE_WAIT_MS, PAGE_POLL_MS, PAGE_COAST_MAX_MS, PAGE_COAST_MAX_MS_IOS, LOOK_MS, LOOK_POLL_MS, CHECK_TIMEOUT_MS, TARGET_SETTLE_MS } from './lists.js';
|
|
13
|
-
export { scrollList, GestureNotTaken, longScroll, androidScreenScroll, scrollFromDrawnRow, waitCoasted, holdBeforeScroll,
|
|
11
|
+
export { closeSwipe, closeSwipeAt, closeSwipeFrom, tapAllAt, flingStroke, navStroke, FLING, NAV_STROKE, LONG_SCROLL_CAP, LONG_SCROLL_PLANNED, TOP_STEP, IOS_TOP_EXTRA, CLOSE_SWIPE_MS, TAP_HOLD_MS, BURST_GAP_MS } from './gestures.js';
|
|
12
|
+
export { rowAlternatives, rowAtOrBelow, scrollUntilShown, scrollCap, flingUntilShown, passChecked, scrollToEnd, endChecked, scrollCycles, pagedToEnd, topMeasured, scrollToTarget, navigate, END_SCROLLS, SCROLL_CYCLES, PAGE_PAUSE_MS, PAGE_WAIT_MS, PAGE_POLL_MS, PAGE_COAST_MAX_MS, PAGE_COAST_MAX_MS_IOS, LOOK_MS, LOOK_POLL_MS, CHECK_TIMEOUT_MS, TARGET_SETTLE_MS, NAV_MAX_MS, NAV_STUCK_STROKES } from './lists.js';
|
|
13
|
+
export { scrollList, GestureNotTaken, NavigationStuck, longScroll, androidScreenScroll, scrollFromDrawnRow, waitCoasted, holdBeforeScroll, COAST_POLL_MS, COAST_MAX_MS } from './scroll.js';
|
|
14
14
|
//# sourceMappingURL=index.js.map
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAmD,MAAM,gBAAgB,CAAC;AAC7G,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAkB,MAAM,YAAY,CAAC;AAC5J,OAAO,EAAE,aAAa,EAA2D,MAAM,cAAc,CAAC;AACt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F,OAAO,EAAE,SAAS,EAAE,cAAc,EAAsC,MAAM,UAAU,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,mBAAmB,EAAE,QAAQ,EAAE,aAAa,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAiE,MAAM,eAAe,CAAC;AACvS,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,gBAAgB,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAmD,cAAc,EAAE,QAAQ,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,UAAU,EAAE,iBAAiB,EAA8N,MAAM,YAAY,CAAC;AACxqB,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,WAAW,EAAE,gBAAgB,EAAE,aAAa,EAAE,YAAY,EAAwH,MAAM,aAAa,CAAC"}
|
package/dist/src/lists.d.ts
CHANGED
|
@@ -21,6 +21,10 @@ export declare const LOOK_POLL_MS = 100;
|
|
|
21
21
|
export declare const CHECK_TIMEOUT_MS = 20000;
|
|
22
22
|
/** Initial visibility wait before trying an indicator or fallback scroll. */
|
|
23
23
|
export declare const TARGET_SETTLE_MS = 10000;
|
|
24
|
+
/** A navigation pass that still has not arrived after this long fails (it has no stroke count to end it). */
|
|
25
|
+
export declare const NAV_MAX_MS = 120000;
|
|
26
|
+
/** Two navigation strokes in a row that leave the first and last visible rows as they were stop the pass. */
|
|
27
|
+
export declare const NAV_STUCK_STROKES = 2;
|
|
24
28
|
export interface UntilShownOptions {
|
|
25
29
|
cmd: string;
|
|
26
30
|
field: string;
|
|
@@ -34,6 +38,10 @@ export interface UntilShownOptions {
|
|
|
34
38
|
extra?: () => Record<string, unknown>;
|
|
35
39
|
lookWindowMs?: number;
|
|
36
40
|
lookPollMs?: number;
|
|
41
|
+
/** Reaching `cap` without the target ends the loop with the log's `reached: false` instead of throwing `missing`. */
|
|
42
|
+
soft?: boolean;
|
|
43
|
+
/** Between blind moves, one look (no look window): a target already shown ends the blind moves (a sheet list at its top). */
|
|
44
|
+
lookBetweenBlind?: boolean;
|
|
37
45
|
}
|
|
38
46
|
export interface FlingUntilShownOptions {
|
|
39
47
|
scoped?: boolean;
|
|
@@ -48,6 +56,8 @@ export interface FlingUntilShownOptions {
|
|
|
48
56
|
coastMaxMs?: number;
|
|
49
57
|
lookWindowMs?: number;
|
|
50
58
|
lookPollMs?: number;
|
|
59
|
+
/** In a measured step: reaching `cap` without the target is not a failure; a navigation pass after the step finishes the way. */
|
|
60
|
+
soft?: boolean;
|
|
51
61
|
}
|
|
52
62
|
export interface ScrollToEndOptions {
|
|
53
63
|
pages: readonly SelectorLike[];
|
|
@@ -64,6 +74,8 @@ export interface ScrollToEndOptions {
|
|
|
64
74
|
coastMaxMs?: number;
|
|
65
75
|
coastMaxMsIos?: number;
|
|
66
76
|
frameTimeoutMs?: number;
|
|
77
|
+
/** A page that has not landed after its wait is logged, not an error: the caller's navigation pass fetches it (scrollCycles). */
|
|
78
|
+
deferPages?: boolean;
|
|
67
79
|
}
|
|
68
80
|
export interface EndCheckOptions {
|
|
69
81
|
checkTimeoutMs?: number;
|
|
@@ -82,6 +94,37 @@ export interface ScrollCyclesOptions extends ScrollToEndOptions {
|
|
|
82
94
|
stepName: (toward: ScrollDirection, cycle: number) => string;
|
|
83
95
|
fling?: PassCheckOptions;
|
|
84
96
|
}
|
|
97
|
+
export interface NavigateOptions {
|
|
98
|
+
/** The target is there, by element lookup: never by a frame test (an overlay can cover a row whose frame lies in the list). */
|
|
99
|
+
until: () => Promise<boolean>;
|
|
100
|
+
/** The list's rows: the first and last row inside the list are read on them, twice 300 ms apart, to tell a coast from a rest. */
|
|
101
|
+
row: SelectorLike;
|
|
102
|
+
field?: RowField;
|
|
103
|
+
scoped?: boolean;
|
|
104
|
+
cache?: ListCache;
|
|
105
|
+
/** Toward the end: after a stroke has come to rest, how long to wait for the target (a page) before the next stroke. */
|
|
106
|
+
pageWaitMs?: number;
|
|
107
|
+
/** Bound of the wait for the list to come to rest after a stroke (default PAGE_COAST_MAX_MS, iOS PAGE_COAST_MAX_MS_IOS). */
|
|
108
|
+
coastMaxMs?: number;
|
|
109
|
+
frameTimeoutMs?: number;
|
|
110
|
+
maxMs?: number;
|
|
111
|
+
/** Names the target in the log and in errors. */
|
|
112
|
+
label?: string;
|
|
113
|
+
/** Strokes needed here mean the measured gestures fell short: counted as the harness defect `navCatchUp`. */
|
|
114
|
+
catchUp?: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* The target may sit mid-list, so a stroke can carry it past the view: stalled at the edge after the list moved, the pass turns
|
|
117
|
+
* round once with precise drags. Off for edge targets (the top, the loaded end, a page still to land): there the stall is stuck.
|
|
118
|
+
*/
|
|
119
|
+
turnRound?: boolean;
|
|
120
|
+
/** Wait for the list to rest before the first look (default). False when the caller already saw it at rest: one read then. */
|
|
121
|
+
restBefore?: boolean;
|
|
122
|
+
}
|
|
123
|
+
export interface NavigateResult {
|
|
124
|
+
strokes: number;
|
|
125
|
+
arrived: boolean;
|
|
126
|
+
ms: number;
|
|
127
|
+
}
|
|
85
128
|
export interface ScrollToTargetOptions {
|
|
86
129
|
target: SelectorLike;
|
|
87
130
|
row: SelectorLike;
|
|
@@ -98,17 +141,34 @@ export interface ScrollToTargetOptions {
|
|
|
98
141
|
* begins at least lookWindowMs (1000) after it; lookPollMs defaults to 100. Optional settle runs before those looks.
|
|
99
142
|
* Logs cmd with the gesture count under field, blind/cap, looks/lookMs, status, duration, optional extra and planned overrun.
|
|
100
143
|
*/
|
|
101
|
-
export declare function scrollUntilShown(t: Session, { cmd, field, cap, blind, planned, settle, look: once, move, missing, extra, lookWindowMs, lookPollMs }: UntilShownOptions): Promise<number>;
|
|
144
|
+
export declare function scrollUntilShown(t: Session, { cmd, field, cap, blind, planned, settle, look: once, move, missing, extra, lookWindowMs, lookPollMs, soft, lookBetweenBlind }: UntilShownOptions): Promise<number>;
|
|
102
145
|
/** Platform gesture budget: cap (3), plus iosTopExtra (2) only when returning to the top on iOS. No commands or logs. */
|
|
103
146
|
export declare const scrollCap: (t: Session, toward: ScrollDirection, cap?: number, iosTopExtra?: number) => number;
|
|
104
147
|
/**
|
|
105
|
-
*
|
|
148
|
+
* Brings `target` of `list` into view toward `toward`. Outside a measured step it is a navigation pass (`navigate`: marked `nav`,
|
|
149
|
+
* the navigation stroke, no gesture cap: it ends on the target found by lookup and the rows at rest, and stops when two strokes
|
|
150
|
+
* leave the rows as they were; `blind`, `cap`, `planned`, `iosTopExtra` and `used` do not apply). Inside a step its gestures stay
|
|
151
|
+
* the measured gesture, as below, and nothing is marked `nav`.
|
|
152
|
+
*
|
|
153
|
+
* In a step it long-scrolls list toward a partly visible target; scoped defaults true. Refetches missing/stale list handles before
|
|
106
154
|
* moving and rereads the frame before every gesture. A shared cache stores the settled frame, held iOS row and moves used.
|
|
107
155
|
* Defaults: 3 gestures (5 to top on iOS), 2 planned, 20 s frameTimeoutMs, 3 s coast. used subtracts the prior pass budget.
|
|
108
|
-
* A to-top gesture is checked (scrollList `mustMove`); its retry is a logged defect and does not use the budget.
|
|
156
|
+
* A to-top gesture is checked (scrollList `mustMove`); its retry is a logged defect and does not use the budget. With `soft`, the
|
|
157
|
+
* cap ends the loop quietly (`reached: false` in the log) where it would throw.
|
|
109
158
|
* Logs fling-to-end/top with flings, blind/cap, looks/lookMs, extra, relists, settled, status and duration, including failures.
|
|
110
159
|
*/
|
|
111
|
-
export declare function flingUntilShown(t: Session, list: SelectorLike, target: SelectorLike, toward: ScrollDirection, { scoped, blind, cache, row, used, cap, planned, iosTopExtra, frameTimeoutMs, coastMaxMs, lookWindowMs, lookPollMs }?: FlingUntilShownOptions): Promise<void>;
|
|
160
|
+
export declare function flingUntilShown(t: Session, list: SelectorLike, target: SelectorLike, toward: ScrollDirection, { scoped, blind, cache, row, used, cap, planned, iosTopExtra, frameTimeoutMs, coastMaxMs, lookWindowMs, lookPollMs, soft }?: FlingUntilShownOptions): Promise<void>;
|
|
161
|
+
/**
|
|
162
|
+
* A navigation pass: gets `list` toward its top or end until `until` finds the target, with the navigation stroke, between `nav`
|
|
163
|
+
* markers (`Session.navigation`; never inside a measured step). Before the pass and after each stroke it waits for the list to
|
|
164
|
+
* come to rest: its first and last row (`rowEdges`) read twice, 300 ms apart, are the same. The pass ends when the target is
|
|
165
|
+
* found by lookup with the list at rest; toward the end, a stroke that rests with no target waits `pageWaitMs` for one (a page
|
|
166
|
+
* lands only once the list rests at its loaded end) before the next. No frame test decides arrival. There is no stroke count: when
|
|
167
|
+
* two strokes in a row leave those rows as they were after the list had moved, the target was passed: the pass turns round once
|
|
168
|
+
* with `NAV_STROKE.precise` drags; when two strokes leave them as they were again (or the list never moved) it throws `NavigationStuck` (counted in `t.defects.navStuck`; the run
|
|
169
|
+
* is invalid), and `maxMs` bounds the pass in time. Logs `nav` with toward, strokes, arrived, status and ms, also on failure.
|
|
170
|
+
*/
|
|
171
|
+
export declare function navigate(t: Session, list: SelectorLike, toward: ScrollDirection, { until, row, field, scoped, cache, pageWaitMs, coastMaxMs, frameTimeoutMs, maxMs, label, catchUp, turnRound, restBefore }: NavigateOptions): Promise<NavigateResult>;
|
|
112
172
|
/**
|
|
113
173
|
* Creates a step check. On its first call only, a missing target triggers a re-scroll sharing cache.used; subsequent calls
|
|
114
174
|
* only wait for visibility (checkTimeoutMs defaults 20000). Logs re-scrolled with toward plus the nested fling summary.
|
|
@@ -116,34 +176,81 @@ export declare function flingUntilShown(t: Session, list: SelectorLike, target:
|
|
|
116
176
|
*/
|
|
117
177
|
export declare function passChecked(t: Session, list: SelectorLike, target: SelectorLike, toward: ScrollDirection, scoped: boolean, cache: ListCache, row?: SelectorLike, options?: PassCheckOptions): () => Promise<void>;
|
|
118
178
|
/**
|
|
119
|
-
* Performs scrolls (3) end gestures
|
|
120
|
-
* (
|
|
121
|
-
* for the page's first loaded row, polling every pagePollMs (300)
|
|
122
|
-
*
|
|
123
|
-
*
|
|
179
|
+
* Performs scrolls (3) end gestures, exactly that many and no other: a page that has not landed never gets a catch-up gesture
|
|
180
|
+
* here (a navigation pass outside the step fetches it). A gesture with no page marker pauses pauseMs (500). Otherwise it waits
|
|
181
|
+
* for coast (Android 6000 ms, iOS 10000), then waitMs (3000) for the page's first loaded row, polling every pagePollMs (300),
|
|
182
|
+
* counted from the coast. A page that has not landed by then fails the pass, or with `deferPages` is logged as not landed.
|
|
183
|
+
* scoped defaults true; field narrows Android lookups. `beforePages` is no longer read.
|
|
124
184
|
* The pass is taken to start at the top, so its first gesture is checked (scrollList `mustMove`): one that moved nothing is
|
|
125
185
|
* sent once more and counted in `t.defects`; `unmoved` is 1 then, and 2 when the retry moved nothing either (GestureNotTaken).
|
|
126
|
-
* Logs fling-to-end: flings, supplied pageNumbers (or descriptions), coastMs, waitMs, per
|
|
127
|
-
* status and duration. Page checks do not require visibility. All limits and frameTimeoutMs (20000) are configurable.
|
|
186
|
+
* Logs fling-to-end: flings, supplied pageNumbers (or descriptions), coastMs, waitMs, landed (per page), unmoved, pauseMs,
|
|
187
|
+
* settled, status and duration. Page checks do not require visibility. All limits and frameTimeoutMs (20000) are configurable.
|
|
128
188
|
*/
|
|
129
|
-
export declare function scrollToEnd(t: Session, list: SelectorLike, cache: ListCache, { pages, pageNumbers,
|
|
189
|
+
export declare function scrollToEnd(t: Session, list: SelectorLike, cache: ListCache, { pages, pageNumbers, scoped, field, any, scrolls, pauseMs, pageWaitMs, pagePollMs, coastMaxMs, coastMaxMsIos, frameTimeoutMs, deferPages }: ScrollToEndOptions): Promise<void>;
|
|
130
190
|
/**
|
|
131
191
|
* Creates an end-pass check requiring a loaded lastPage row, even off screen. Retries a stale lookup once, then polls
|
|
132
192
|
* every 300 ms for up to 20000 ms. checkTimeoutMs, pagePollMs and scrolls override the defaults in errors. Logs commands only.
|
|
133
193
|
*/
|
|
134
194
|
export declare function endChecked(t: Session, list: SelectorLike, lastPage: SelectorLike, scoped: boolean, field?: RowField, { checkTimeoutMs, pagePollMs, scrolls }?: EndCheckOptions): () => Promise<void>;
|
|
135
195
|
/**
|
|
136
|
-
* Runs cycles (3) end/top measured step pairs with names from stepName(toward, oneBasedCycle).
|
|
137
|
-
*
|
|
138
|
-
*
|
|
196
|
+
* Runs cycles (3) end/top measured step pairs with names from stepName(toward, oneBasedCycle). Each step sends exactly its
|
|
197
|
+
* planned controlled gestures, the same in every run: the end step `scrolls` (3) end gestures, the top step 2, the top one looking
|
|
198
|
+
* before the second (a gesture at the top drags a sheet) and stopping quietly short of the top. Nothing is checked inside a step.
|
|
199
|
+
* After each step's end marker a navigation pass (`navigate`, marked `nav`, evidence only) finishes the way: to the loaded end
|
|
200
|
+
* until a lastPage row is loaded (strokes needed there are counted as the harness defect `navCatchUp`), to the top until `first`
|
|
201
|
+
* shows; the pass ends on lookups and rows at rest, never on frames. Then the end check (lastPage loaded, checkTimeoutMs for the
|
|
202
|
+
* end check) and the top check (first shown). Only cycle one waits for page markers. Shares the frame/row cache across steps and
|
|
203
|
+
* passes. frameTimeoutMs feeds the end frame wait. `fling` configures the top step: its `cap` and `iosTopExtra` no longer widen
|
|
204
|
+
* it. Logs step markers, nav passes and nested helper summaries.
|
|
139
205
|
*/
|
|
140
206
|
export declare function scrollCycles(t: Session, { list, first, lastPage, cycles, stepName, fling, ...options }: ScrollCyclesOptions): Promise<void>;
|
|
207
|
+
export interface PagedToEndOptions {
|
|
208
|
+
list: SelectorLike;
|
|
209
|
+
/** The list's rows (coast reads, navigation rests). */
|
|
210
|
+
row: SelectorLike;
|
|
211
|
+
/** How many pages: one measured step each. */
|
|
212
|
+
pages: number;
|
|
213
|
+
/** Measured gestures per page step, the same every run (default 1). */
|
|
214
|
+
gestures?: number;
|
|
215
|
+
/** What shows at the end of page `p` (a "Show more" button): reached by navigation after the step, never inside it. */
|
|
216
|
+
more: (page: number) => SelectorLike;
|
|
217
|
+
stepName: (page: number) => string;
|
|
218
|
+
/** After page `p`'s marker shows, outside any step: the journey's own action (e.g. its tap step on "Show more"). */
|
|
219
|
+
onMore: (page: number) => Promise<unknown>;
|
|
220
|
+
field?: RowField;
|
|
221
|
+
scoped?: boolean;
|
|
222
|
+
coastMaxMs?: number;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* A list paged by a marker at its end ("Show more"), measured the D1 way: per page a step of exactly `gestures` controlled
|
|
226
|
+
* gestures toward the end (each after the coast of the one before, nothing looked for inside the step), then a navigation pass
|
|
227
|
+
* outside the step finishes the way to the page's marker, then `onMore`. The measured count is a constant, wherever the list
|
|
228
|
+
* comes to rest (gate runs 10-30: TapIn's hand-written loop looked before every gesture, audience to-end sent 10/10/8).
|
|
229
|
+
*/
|
|
230
|
+
export declare function pagedToEnd(t: Session, { list, row, pages, gestures, more, stepName, onMore, field, scoped, coastMaxMs }: PagedToEndOptions): Promise<void>;
|
|
231
|
+
export interface TopMeasuredOptions {
|
|
232
|
+
list: SelectorLike;
|
|
233
|
+
first: SelectorLike;
|
|
234
|
+
row: SelectorLike;
|
|
235
|
+
stepName: string;
|
|
236
|
+
field?: RowField;
|
|
237
|
+
scoped?: boolean;
|
|
238
|
+
coastMaxMs?: number;
|
|
239
|
+
checkTimeoutMs?: number;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* The measured way back to the top of a list: a step of TOP_STEP.gestures (2) controlled gestures, fewer only when the first row
|
|
243
|
+
* already shows after the first (F7: a gesture at the top drags a sheet), then a navigation pass outside the step to the first row.
|
|
244
|
+
* The same as `scrollCycles`' top half, for lists a journey pages itself (gate runs 10-30: audience to-top sent 6/6/5).
|
|
245
|
+
*/
|
|
246
|
+
export declare function topMeasured(t: Session, { list, first, row, stepName, field, scoped, coastMaxMs, checkTimeoutMs }: TopMeasuredOptions): Promise<void>;
|
|
141
247
|
/**
|
|
142
248
|
* Waits settleMs (10000) for target, then taps an optional indicator and/or runs move until visible, at most cap (3)
|
|
143
|
-
* times, coasting on row after each action.
|
|
144
|
-
*
|
|
249
|
+
* times, coasting on row after each action. Outside a measured step this is a navigation pass: marked `nav`, and the list
|
|
250
|
+
* gestures `move` sends are the navigation stroke (the pass has no list to read rows on, so `cap` still ends it). Logs cmd
|
|
251
|
+
* (scroll-to-target) with tapped, swipes, extra above planned (2), status and duration. An initially visible target returns without a summary. missing customizes the failure message.
|
|
145
252
|
*/
|
|
146
|
-
export declare function scrollToTarget(t: Session,
|
|
253
|
+
export declare function scrollToTarget(t: Session, options: ScrollToTargetOptions): Promise<void>;
|
|
147
254
|
/**
|
|
148
255
|
* Builds a regex alternation from the inclusive from/to row numbers. The journey supplies row's formatting and regex
|
|
149
256
|
* escaping; an empty range returns ''. No commands or logs.
|