spana-test 0.4.0 → 0.5.0
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/.agents/skills/spana-testing/SKILL.md +0 -0
- package/LICENSE +0 -0
- package/README.md +199 -68
- package/dist/{accessibility-audit-RS3VIWRT.js → accessibility-audit-YZOPUY3D.js} +7 -3
- package/dist/accessibility-audit-YZOPUY3D.js.map +1 -0
- package/dist/agent/index.d.ts +3 -84
- package/dist/agent/index.js +11 -10
- package/dist/agent/index.js.map +0 -0
- package/dist/allure-RNMEYTXS.js +0 -0
- package/dist/allure-RNMEYTXS.js.map +0 -0
- package/dist/{android-GFW6OXPQ.js → android-4NVTZMHL.js} +6 -2
- package/dist/{android-GFW6OXPQ.js.map → android-4NVTZMHL.js.map} +0 -0
- package/dist/appium-server-66GVUL24.js +0 -0
- package/dist/appium-server-66GVUL24.js.map +0 -0
- package/dist/baseline-manager-5TIUCNP5.js +0 -0
- package/dist/baseline-manager-5TIUCNP5.js.map +0 -0
- package/dist/chunk-3FSZNKEF.js +0 -0
- package/dist/chunk-3FSZNKEF.js.map +0 -0
- package/dist/chunk-3TRMQCUT.js +0 -0
- package/dist/chunk-3TRMQCUT.js.map +0 -0
- package/dist/chunk-3YE2POGD.js +471 -0
- package/dist/chunk-3YE2POGD.js.map +1 -0
- package/dist/chunk-5245YBLL.js +0 -0
- package/dist/chunk-5245YBLL.js.map +0 -0
- package/dist/{chunk-3J4NG7JU.js → chunk-CY3DKTBZ.js} +8 -2
- package/dist/chunk-CY3DKTBZ.js.map +1 -0
- package/dist/chunk-DGUM43GV.js +0 -0
- package/dist/chunk-DGUM43GV.js.map +0 -0
- package/dist/chunk-DTNK54C2.js +127 -0
- package/dist/chunk-DTNK54C2.js.map +1 -0
- package/dist/{chunk-EWIR2GVV.js → chunk-H27IBIGA.js} +19 -2
- package/dist/chunk-H27IBIGA.js.map +1 -0
- package/dist/chunk-H3RWZCID.js +439 -0
- package/dist/chunk-H3RWZCID.js.map +1 -0
- package/dist/{chunk-PZYZ4O6D.js → chunk-HCG4CJKR.js} +23 -5
- package/dist/chunk-HCG4CJKR.js.map +1 -0
- package/dist/{chunk-YGHDMA6D.js → chunk-HYSTRWYN.js} +142 -41
- package/dist/chunk-HYSTRWYN.js.map +1 -0
- package/dist/chunk-IHVZKQQW.js +0 -0
- package/dist/chunk-IHVZKQQW.js.map +0 -0
- package/dist/chunk-KJPHH2TW.js +0 -0
- package/dist/chunk-KJPHH2TW.js.map +0 -0
- package/dist/chunk-LAMTF4LX.js +89 -0
- package/dist/chunk-LAMTF4LX.js.map +1 -0
- package/dist/chunk-LRGT342X.js +2300 -0
- package/dist/chunk-LRGT342X.js.map +1 -0
- package/dist/chunk-OBCFACUW.js +0 -0
- package/dist/chunk-OBCFACUW.js.map +0 -0
- package/dist/chunk-PJKIXVSO.js +5019 -0
- package/dist/chunk-PJKIXVSO.js.map +1 -0
- package/dist/chunk-S5JNNDXS.js +0 -0
- package/dist/chunk-S5JNNDXS.js.map +0 -0
- package/dist/{chunk-7VOWF42B.js → chunk-SQL3YRR5.js} +74 -8
- package/dist/chunk-SQL3YRR5.js.map +1 -0
- package/dist/{chunk-KYPLYRKW.js → chunk-UJQ7PID5.js} +47 -15
- package/dist/chunk-UJQ7PID5.js.map +1 -0
- package/dist/{chunk-FJAJ4YNC.js → chunk-WSA5QPTA.js} +2 -2
- package/dist/{chunk-FJAJ4YNC.js.map → chunk-WSA5QPTA.js.map} +0 -0
- package/dist/chunk-X2TJP7LB.js +0 -0
- package/dist/chunk-X2TJP7LB.js.map +0 -0
- package/dist/chunk-XENRC3YO.js +2486 -0
- package/dist/chunk-XENRC3YO.js.map +1 -0
- package/dist/cli.js +60 -20
- package/dist/cli.js.map +1 -1
- package/dist/compiler-X6WTFMYF.js +0 -0
- package/dist/compiler-X6WTFMYF.js.map +0 -0
- package/dist/config-loader-XGDDJGVY.js +9 -0
- package/dist/{config-loader-QM72GKEL.js.map → config-loader-XGDDJGVY.js.map} +0 -0
- package/dist/{console-7UW7VROK.js → console-MI2XB5RG.js} +8 -2
- package/dist/console-MI2XB5RG.js.map +1 -0
- package/dist/daemon-manager-FBISTX24.js +28 -0
- package/dist/{discover-CAQY6EG6.js.map → daemon-manager-FBISTX24.js.map} +0 -0
- package/dist/{discover-CAQY6EG6.js → discover-LHEBSUIP.js} +3 -3
- package/dist/{installer-PVBSX7UC.js.map → discover-LHEBSUIP.js.map} +0 -0
- package/dist/doctor-command-WB3O2H64.js +378 -0
- package/dist/doctor-command-WB3O2H64.js.map +1 -0
- package/dist/filters-Q3ALKWZ5.js +24 -0
- package/dist/{session-2MZVGYAC.js.map → filters-Q3ALKWZ5.js.map} +0 -0
- package/dist/{flow-thjUxXXx.d.ts → flow-CyRC-tTc.d.ts} +15 -7
- package/dist/gherkin/steps.d.ts +2 -2
- package/dist/gherkin/steps.js +0 -0
- package/dist/gherkin/steps.js.map +0 -0
- package/dist/github-pr-YMWIPCCZ.js +10 -0
- package/dist/github-pr-YMWIPCCZ.js.map +1 -0
- package/dist/html-F3X3XPSX.js +0 -0
- package/dist/html-F3X3XPSX.js.map +0 -0
- package/dist/index.d.ts +1129 -6
- package/dist/index.js +575 -6
- package/dist/index.js.map +1 -1
- package/dist/{init-command-U66XCM66.js → init-command-Z3QREABL.js} +60 -1
- package/dist/init-command-Z3QREABL.js.map +1 -0
- package/dist/{init-flow-command-PR7J5FBM.js → init-flow-command-4EKRVTNT.js} +2 -2
- package/dist/{init-flow-command-PR7J5FBM.js.map → init-flow-command-4EKRVTNT.js.map} +0 -0
- package/dist/{installer-PVBSX7UC.js → installer-VUPFWP5X.js} +7 -2
- package/dist/installer-VUPFWP5X.js.map +1 -0
- package/dist/ios-JPK43TFZ.js +0 -0
- package/dist/ios-JPK43TFZ.js.map +0 -0
- package/dist/json-JMRPUVY2.js +0 -0
- package/dist/json-JMRPUVY2.js.map +0 -0
- package/dist/junit-HLC62MK6.js +0 -0
- package/dist/junit-HLC62MK6.js.map +0 -0
- package/dist/machine-6H25TRTU.js +0 -0
- package/dist/machine-6H25TRTU.js.map +0 -0
- package/dist/provider-YIPU5K42.js +0 -0
- package/dist/provider-YIPU5K42.js.map +0 -0
- package/dist/redact-U72BUBBR.js +0 -0
- package/dist/redact-U72BUBBR.js.map +0 -0
- package/dist/runner-6HK62Q7B.js +0 -0
- package/dist/runner-6HK62Q7B.js.map +0 -0
- package/dist/screenshot-compare-3QRHHSFZ.js +116 -0
- package/dist/screenshot-compare-3QRHHSFZ.js.map +1 -0
- package/dist/{server-PZBRGU7P.js → server-PRM7BVVD.js} +14 -13
- package/dist/{server-PZBRGU7P.js.map → server-PRM7BVVD.js.map} +1 -1
- package/dist/server-QWJJB3WG.js +14 -0
- package/dist/server-QWJJB3WG.js.map +1 -0
- package/dist/session-2E6OK6BH.js +18 -0
- package/dist/session-2E6OK6BH.js.map +1 -0
- package/dist/session-Ddem-Q5n.d.ts +119 -0
- package/dist/{storybook-pBOPe_1D.d.ts → storybook-CxaP3YDz.d.ts} +265 -4
- package/dist/{studio-command-YDWQOMRX.js → studio-command-O3NN5BCG.js} +2 -2
- package/dist/{studio-command-YDWQOMRX.js.map → studio-command-O3NN5BCG.js.map} +0 -0
- package/dist/{test-command-B2VLWGDK.js → test-command-FYOZ6QAE.js} +231 -1341
- package/dist/test-command-FYOZ6QAE.js.map +1 -0
- package/dist/validator-HZ2A3NEI.js +0 -0
- package/dist/validator-HZ2A3NEI.js.map +0 -0
- package/package.json +7 -3
- package/studio-dist/assets/index-C-Io44gy.js +0 -0
- package/studio-dist/assets/index-DfM9lK4p.css +0 -0
- package/studio-dist/index.html +0 -0
- package/dist/accessibility-audit-RS3VIWRT.js.map +0 -1
- package/dist/chunk-3J4NG7JU.js.map +0 -1
- package/dist/chunk-7VOWF42B.js.map +0 -1
- package/dist/chunk-EWIR2GVV.js.map +0 -1
- package/dist/chunk-KYPLYRKW.js.map +0 -1
- package/dist/chunk-LC3QJIHY.js +0 -440
- package/dist/chunk-LC3QJIHY.js.map +0 -1
- package/dist/chunk-MCT4DYDK.js +0 -2671
- package/dist/chunk-MCT4DYDK.js.map +0 -1
- package/dist/chunk-PZYZ4O6D.js.map +0 -1
- package/dist/chunk-YAV6KBSW.js +0 -1318
- package/dist/chunk-YAV6KBSW.js.map +0 -1
- package/dist/chunk-YGHDMA6D.js.map +0 -1
- package/dist/config-loader-QM72GKEL.js +0 -9
- package/dist/console-7UW7VROK.js.map +0 -1
- package/dist/doctor-command-YGQPO7GH.js +0 -71
- package/dist/doctor-command-YGQPO7GH.js.map +0 -1
- package/dist/element-DZ0HyJ3C.d.ts +0 -25
- package/dist/init-command-U66XCM66.js.map +0 -1
- package/dist/screenshot-compare-JFHH2WR4.js +0 -75
- package/dist/screenshot-compare-JFHH2WR4.js.map +0 -1
- package/dist/session-2MZVGYAC.js +0 -17
- package/dist/test-command-B2VLWGDK.js.map +0 -1
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
import { Schema, Effect } from 'effect';
|
|
2
2
|
|
|
3
|
-
type Platform = "android" | "ios" | "web";
|
|
3
|
+
type Platform = "android" | "ios" | "web" | "electron" | "electrobun";
|
|
4
|
+
type TapMode = "native" | "dom";
|
|
4
5
|
/**
|
|
5
6
|
* Selector types. Generic parameter `T` lets projects pin a union of known
|
|
6
7
|
* testIDs so `{ testID: "bogus-id" }` becomes a type error.
|
|
8
|
+
*
|
|
9
|
+
* Use `systemUI: true` (or the `systemUI(...)` helper) on `{ text }` /
|
|
10
|
+
* `{ accessibilityLabel }` selectors that intentionally target out-of-process
|
|
11
|
+
* OS UI (SFSafariViewController, ASWebAuthenticationSession, Chrome Custom Tabs,
|
|
12
|
+
* permission dialogs) where DOM `data-testid` cannot reach.
|
|
7
13
|
*/
|
|
8
14
|
type Selector<T extends string = string> = T | {
|
|
9
15
|
testID: T;
|
|
10
16
|
} | {
|
|
11
17
|
text: string;
|
|
18
|
+
systemUI?: boolean;
|
|
12
19
|
} | {
|
|
13
20
|
accessibilityLabel: string;
|
|
21
|
+
systemUI?: boolean;
|
|
14
22
|
} | {
|
|
15
23
|
point: {
|
|
16
24
|
x: number;
|
|
@@ -28,6 +36,26 @@ interface RelativeSelector<T extends string = string> {
|
|
|
28
36
|
}
|
|
29
37
|
/** Extended selector that supports both simple and relative selectors. */
|
|
30
38
|
type ExtendedSelector<T extends string = string> = Selector<T> | RelativeSelector<T>;
|
|
39
|
+
/**
|
|
40
|
+
* Marks a label/text selector as targeting out-of-process system UI
|
|
41
|
+
* (e.g. SFSafariViewController, ASWebAuthenticationSession, Chrome Custom Tabs,
|
|
42
|
+
* OS permission alerts). Skips the DOM channel and suppresses brittle-text warnings.
|
|
43
|
+
*/
|
|
44
|
+
declare function systemUI(selector: {
|
|
45
|
+
text: string;
|
|
46
|
+
} | {
|
|
47
|
+
accessibilityLabel: string;
|
|
48
|
+
}): {
|
|
49
|
+
text: string;
|
|
50
|
+
systemUI: true;
|
|
51
|
+
} | {
|
|
52
|
+
accessibilityLabel: string;
|
|
53
|
+
systemUI: true;
|
|
54
|
+
};
|
|
55
|
+
declare function isSystemUISelector<T extends string = string>(sel: ExtendedSelector<T>): boolean;
|
|
56
|
+
declare function isTestIDSelector<T extends string = string>(sel: ExtendedSelector<T>): sel is {
|
|
57
|
+
testID: T;
|
|
58
|
+
};
|
|
31
59
|
|
|
32
60
|
declare const DriverError_base: Schema.TaggedErrorClass<DriverError, "DriverError", {
|
|
33
61
|
readonly _tag: Schema.tag<"DriverError">;
|
|
@@ -42,16 +70,125 @@ declare class DriverError extends DriverError_base {
|
|
|
42
70
|
}
|
|
43
71
|
|
|
44
72
|
declare const DeviceInfo: Schema.Struct<{
|
|
45
|
-
platform: Schema.Literal<["android", "ios", "web"]>;
|
|
73
|
+
platform: Schema.Literal<["android", "ios", "web", "electron", "electrobun"]>;
|
|
46
74
|
deviceId: typeof Schema.String;
|
|
47
75
|
name: typeof Schema.String;
|
|
48
76
|
isEmulator: typeof Schema.Boolean;
|
|
49
77
|
screenWidth: typeof Schema.Number;
|
|
50
78
|
screenHeight: typeof Schema.Number;
|
|
51
|
-
driverType: Schema.Literal<["playwright", "uiautomator2", "wda", "appium"]>;
|
|
79
|
+
driverType: Schema.Literal<["playwright", "uiautomator2", "wda", "appium", "electron", "electrobun"]>;
|
|
52
80
|
}>;
|
|
53
81
|
type DeviceInfo = typeof DeviceInfo.Type;
|
|
54
82
|
|
|
83
|
+
type DomChannelKind = "bridge" | "cdp" | "webkit-inspector" | "playwright";
|
|
84
|
+
interface DomRect {
|
|
85
|
+
x: number;
|
|
86
|
+
y: number;
|
|
87
|
+
width: number;
|
|
88
|
+
height: number;
|
|
89
|
+
}
|
|
90
|
+
interface DomElementMatch {
|
|
91
|
+
id?: string;
|
|
92
|
+
tag?: string;
|
|
93
|
+
text?: string;
|
|
94
|
+
value?: string;
|
|
95
|
+
accessibilityLabel?: string;
|
|
96
|
+
rect: DomRect;
|
|
97
|
+
scrollX: number;
|
|
98
|
+
scrollY: number;
|
|
99
|
+
devicePixelRatio: number;
|
|
100
|
+
viewportWidth: number;
|
|
101
|
+
viewportHeight: number;
|
|
102
|
+
visible: boolean;
|
|
103
|
+
enabled: boolean;
|
|
104
|
+
clickable: boolean;
|
|
105
|
+
focused?: boolean;
|
|
106
|
+
attributes?: Record<string, string>;
|
|
107
|
+
/** True when the matched element lives inside a ShadowRoot */
|
|
108
|
+
inShadowDom?: boolean;
|
|
109
|
+
/** True when the matched element lives inside a same-origin iframe */
|
|
110
|
+
inIframe?: boolean;
|
|
111
|
+
}
|
|
112
|
+
interface DomIdleOptions {
|
|
113
|
+
/** Max time to wait for idle in ms. Default: 5000. */
|
|
114
|
+
timeout?: number;
|
|
115
|
+
/** Quiet window after network/DOM/animations settle in ms. Default: 50. */
|
|
116
|
+
quietPeriodMs?: number;
|
|
117
|
+
}
|
|
118
|
+
interface DomWaitForSelectorOptions {
|
|
119
|
+
/** Max time to wait in ms. Default: 5000. */
|
|
120
|
+
timeoutMs?: number;
|
|
121
|
+
/** Require the matched element to be visible & enabled for pointer actions. */
|
|
122
|
+
forAction?: boolean;
|
|
123
|
+
/** Fail early once the DOM stays quiet and document.readyState === "complete". */
|
|
124
|
+
failFastWhenIdle?: boolean;
|
|
125
|
+
/** Quiet window in ms before failFastWhenIdle resolves empty. Default: 250. */
|
|
126
|
+
idleQuietMs?: number;
|
|
127
|
+
}
|
|
128
|
+
interface DomStorageEntries {
|
|
129
|
+
localStorage?: Record<string, string>;
|
|
130
|
+
sessionStorage?: Record<string, string>;
|
|
131
|
+
cookies?: Array<{
|
|
132
|
+
name: string;
|
|
133
|
+
value: string;
|
|
134
|
+
path?: string;
|
|
135
|
+
domain?: string;
|
|
136
|
+
}>;
|
|
137
|
+
capacitorPreferences?: Record<string, string>;
|
|
138
|
+
}
|
|
139
|
+
interface DomClearStorageOptions {
|
|
140
|
+
localStorage?: boolean;
|
|
141
|
+
sessionStorage?: boolean;
|
|
142
|
+
cookies?: boolean;
|
|
143
|
+
indexedDB?: boolean;
|
|
144
|
+
capacitorPreferences?: boolean;
|
|
145
|
+
}
|
|
146
|
+
interface DomTargetInfo {
|
|
147
|
+
id: string;
|
|
148
|
+
title?: string;
|
|
149
|
+
url?: string;
|
|
150
|
+
type?: string;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Unified DOM channel interface shared across:
|
|
154
|
+
* - `spana-bridge` (in-app WebSocket bridge, same JS on all 5 targets)
|
|
155
|
+
* - Android WebView CDP (`adb forward localabstract:webview_devtools_remote_<pid>`)
|
|
156
|
+
* - iOS WKWebView WebKit Remote Inspector (`isInspectable = true`)
|
|
157
|
+
* - Electron / Electrobun CDP or WebKit Inspector
|
|
158
|
+
*/
|
|
159
|
+
interface DomChannel {
|
|
160
|
+
readonly kind: DomChannelKind;
|
|
161
|
+
isConnected(): boolean;
|
|
162
|
+
connect(): Promise<void>;
|
|
163
|
+
disconnect(): Promise<void>;
|
|
164
|
+
evaluate<T = unknown>(script: string | ((...args: any[]) => T), ...args: any[]): Promise<T>;
|
|
165
|
+
query(selector: Selector): Promise<DomElementMatch[]>;
|
|
166
|
+
/** MutationObserver-reactive DOM wait: resolves immediately when a matching visible element mounts. */
|
|
167
|
+
waitForSelector?(selector: Selector, opts?: DomWaitForSelectorOptions): Promise<DomElementMatch[]>;
|
|
168
|
+
tapDom(selector: Selector): Promise<boolean>;
|
|
169
|
+
/** Scroll a DOM element into the viewport center and return its updated bounding rect. */
|
|
170
|
+
scrollIntoView?(selector: Selector): Promise<DomElementMatch | null>;
|
|
171
|
+
dispatch?(selector: Selector, eventType: string, eventInit?: Record<string, unknown>): Promise<boolean>;
|
|
172
|
+
waitForIdle?(opts?: DomIdleOptions): Promise<void>;
|
|
173
|
+
setStorage?(entries: DomStorageEntries): Promise<void>;
|
|
174
|
+
clearStorage?(opts?: DomClearStorageOptions): Promise<void>;
|
|
175
|
+
reload?(): Promise<void>;
|
|
176
|
+
mockNetwork?(matcher: BrowserRouteMatcher, response: BrowserMockResponse): Promise<void>;
|
|
177
|
+
blockNetwork?(matcher: BrowserRouteMatcher): Promise<void>;
|
|
178
|
+
clearNetworkMocks?(): Promise<void>;
|
|
179
|
+
getConsoleLogs?(): Promise<BrowserConsoleLog[]>;
|
|
180
|
+
getJSErrors?(): Promise<BrowserJSError[]>;
|
|
181
|
+
listTargets?(): Promise<DomTargetInfo[]>;
|
|
182
|
+
selectTarget?(targetId: string): Promise<void>;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Self-contained MutationObserver-reactive DOM wait script.
|
|
186
|
+
* Resolves synchronously (< 1ms) if the element is already visible, otherwise
|
|
187
|
+
* listens for DOM mutations so async renders resolve in ~1-2ms instead of
|
|
188
|
+
* waiting on 50-200ms poll ticks. Optionally supports `failFastWhenIdle`.
|
|
189
|
+
*/
|
|
190
|
+
declare function buildDomWaitForSelectorScript(selector: Selector, opts?: DomWaitForSelectorOptions): string;
|
|
191
|
+
|
|
55
192
|
type RawHierarchy = string;
|
|
56
193
|
/**
|
|
57
194
|
* Per-launch device state overrides (language/locale/timeZone) applied at app
|
|
@@ -219,6 +356,9 @@ interface RawDriverService<_T extends string = string, R extends string = string
|
|
|
219
356
|
readonly getContexts?: () => Effect.Effect<string[], DriverError>;
|
|
220
357
|
readonly getCurrentContext?: () => Effect.Effect<string, DriverError>;
|
|
221
358
|
readonly setContext?: (contextId: string) => Effect.Effect<void, DriverError>;
|
|
359
|
+
readonly domChannel?: DomChannel;
|
|
360
|
+
/** Fast reset via bridge storage clear + reload (avoids uninstall/reinstall) */
|
|
361
|
+
readonly resetFast?: () => Effect.Effect<void, DriverError>;
|
|
222
362
|
readonly mockNetwork?: (matcher: BrowserRouteMatcher, response: BrowserMockResponse) => Effect.Effect<void, DriverError>;
|
|
223
363
|
readonly blockNetwork?: (matcher: BrowserRouteMatcher) => Effect.Effect<void, DriverError>;
|
|
224
364
|
readonly clearNetworkMocks?: () => Effect.Effect<void, DriverError>;
|
|
@@ -244,6 +384,28 @@ interface IOSSigningConfig {
|
|
|
244
384
|
/** Code signing identity (default: "Apple Development") */
|
|
245
385
|
signingIdentity?: string;
|
|
246
386
|
}
|
|
387
|
+
interface BridgeConfig {
|
|
388
|
+
/** Enable the in-app spana-bridge WebSocket server. Default: auto-detected when port/url is set. */
|
|
389
|
+
enabled?: boolean;
|
|
390
|
+
/** Port for the runner's spana-bridge WebSocket server (default: 9333). */
|
|
391
|
+
port?: number;
|
|
392
|
+
/** Host to bind the bridge server on (default: "127.0.0.1"). */
|
|
393
|
+
host?: string;
|
|
394
|
+
/** Explicit external bridge URL if already running (e.g. ws://127.0.0.1:9333). */
|
|
395
|
+
url?: string;
|
|
396
|
+
/** Connection timeout in ms when waiting for the app bridge to connect (default: 5000). */
|
|
397
|
+
connectTimeout?: number;
|
|
398
|
+
}
|
|
399
|
+
interface WarmDaemonConfig {
|
|
400
|
+
/** Keep WDA / UiAutomator2 daemons alive across test runs and reuse them. Default: false. */
|
|
401
|
+
enabled?: boolean;
|
|
402
|
+
/** Reuse a single browser process across flows with fresh BrowserContexts. Default: true. */
|
|
403
|
+
reuseBrowserProcess?: boolean;
|
|
404
|
+
/** Reuse an active WDA/UiAutomator2 session across flows instead of recreating. Default: true when warm daemons enabled. */
|
|
405
|
+
reuseSession?: boolean;
|
|
406
|
+
/** Optional path to store warm daemon metadata. */
|
|
407
|
+
stateFile?: string;
|
|
408
|
+
}
|
|
247
409
|
interface AppConfig {
|
|
248
410
|
url?: string;
|
|
249
411
|
packageName?: string;
|
|
@@ -252,8 +414,64 @@ interface AppConfig {
|
|
|
252
414
|
appPath?: string;
|
|
253
415
|
/** iOS code signing config for physical devices */
|
|
254
416
|
signing?: IOSSigningConfig;
|
|
417
|
+
/** Explicit WebKit Inspector URL or port for iOS WKWebView direct DOM access */
|
|
418
|
+
webkitInspectorUrl?: string;
|
|
419
|
+
webkitInspectorPort?: number;
|
|
420
|
+
/** Explicit CDP port for Android WebView or desktop targets */
|
|
421
|
+
cdpPort?: number;
|
|
422
|
+
/** Pin device locale (e.g. "en_US", "sv_SE") for predictable system UI labels */
|
|
423
|
+
locale?: string;
|
|
424
|
+
/** Optional spana-bridge override for this app target */
|
|
425
|
+
bridge?: BridgeConfig;
|
|
426
|
+
}
|
|
427
|
+
interface ElectronAppConfig {
|
|
428
|
+
/** Path to Electron main entry file or app directory (passed to Playwright _electron.launch) */
|
|
429
|
+
entry?: string;
|
|
430
|
+
/** Path to a packaged Electron executable */
|
|
431
|
+
executablePath?: string;
|
|
432
|
+
/** Extra CLI arguments passed to Electron */
|
|
433
|
+
args?: string[];
|
|
434
|
+
/** Working directory for Electron launch */
|
|
435
|
+
cwd?: string;
|
|
436
|
+
/** Additional environment variables for Electron */
|
|
437
|
+
env?: Record<string, string>;
|
|
438
|
+
/** Attach to an already-running Electron app over CDP instead of launching */
|
|
439
|
+
cdpUrl?: string;
|
|
440
|
+
/** Remote debugging port when launching or attaching over CDP */
|
|
441
|
+
cdpPort?: number;
|
|
442
|
+
/** Optional URL to navigate to after launch */
|
|
443
|
+
url?: string;
|
|
444
|
+
/** Optional spana-bridge config */
|
|
445
|
+
bridge?: BridgeConfig;
|
|
446
|
+
}
|
|
447
|
+
type ElectrobunRenderer = "native" | "cef";
|
|
448
|
+
interface ElectrobunAppConfig {
|
|
449
|
+
/** Path to Electrobun binary or packaged .app/.exe */
|
|
450
|
+
executablePath?: string;
|
|
451
|
+
/** Path to Electrobun project root (containing electrobun.config.ts) */
|
|
452
|
+
appDir?: string;
|
|
453
|
+
/** Extra CLI arguments passed to the Electrobun process */
|
|
454
|
+
args?: string[];
|
|
455
|
+
/** Working directory for launch */
|
|
456
|
+
cwd?: string;
|
|
457
|
+
/** Additional environment variables */
|
|
458
|
+
env?: Record<string, string>;
|
|
459
|
+
/** Renderer engine used by the Electrobun build: "native" (WKWebView/WebView2/WebKitGTK) or "cef" */
|
|
460
|
+
renderer?: ElectrobunRenderer;
|
|
461
|
+
/** Attach to an already-running Electrobun CEF/WebView2 app over CDP */
|
|
462
|
+
cdpUrl?: string;
|
|
463
|
+
/** Remote debugging port (ELECTROBUN_CDP_PORT / WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS) */
|
|
464
|
+
cdpPort?: number;
|
|
465
|
+
/** WebKit Inspector port for macOS WKWebView or Linux WebKitGTK */
|
|
466
|
+
webkitInspectorPort?: number;
|
|
467
|
+
/** Optional URL to navigate to after launch */
|
|
468
|
+
url?: string;
|
|
469
|
+
/** Optional spana-bridge config */
|
|
470
|
+
bridge?: BridgeConfig;
|
|
255
471
|
}
|
|
256
472
|
type BrowserName = "chromium" | "firefox" | "webkit";
|
|
473
|
+
type WebBrowserEngine = "playwright" | "cdp" | "lightpanda";
|
|
474
|
+
type WebResourceBlockType = "image" | "font" | "media" | "stylesheet";
|
|
257
475
|
type StorybookValue = string | number | boolean | null;
|
|
258
476
|
interface StorybookConfig {
|
|
259
477
|
/** Optional dedicated Storybook URL (falls back to apps.web.url when omitted) */
|
|
@@ -263,7 +481,19 @@ interface StorybookConfig {
|
|
|
263
481
|
}
|
|
264
482
|
interface WebExecutionConfig {
|
|
265
483
|
browser?: BrowserName;
|
|
484
|
+
/** Browser engine backend: "playwright" (default), "cdp" (CDP-direct), or "lightpanda". */
|
|
485
|
+
engine?: WebBrowserEngine;
|
|
486
|
+
/** Connect to an existing CDP browser / Lightpanda endpoint (e.g. "http://127.0.0.1:9222"). */
|
|
487
|
+
cdpUrl?: string;
|
|
266
488
|
headless?: boolean;
|
|
489
|
+
/** Navigation readiness event for launchApp/openLink (default: "load"). */
|
|
490
|
+
waitUntil?: "domcontentloaded" | "load" | "networkidle" | "commit";
|
|
491
|
+
/** Collapse CSS transitions & animations to 0.001ms for faster deterministic runs. */
|
|
492
|
+
instantAnimations?: boolean;
|
|
493
|
+
/** Abort heavy asset requests ("image" | "font" | "media" | "stylesheet") during web runs. */
|
|
494
|
+
blockResources?: WebResourceBlockType[];
|
|
495
|
+
/** Reuse a persistent warm Chromium daemon across runs via CDP (chromium only). */
|
|
496
|
+
warmBrowser?: boolean;
|
|
267
497
|
/** Optional Playwright storage state JSON file to preload for web runs */
|
|
268
498
|
storageState?: string;
|
|
269
499
|
/** Print verbose Playwright runtime events to stdout for local web debugging */
|
|
@@ -340,6 +570,10 @@ interface ExecutionConfig {
|
|
|
340
570
|
mode?: "local" | "appium";
|
|
341
571
|
web?: WebExecutionConfig;
|
|
342
572
|
appium?: AppiumExecutionConfig;
|
|
573
|
+
/** In-app spana-bridge configuration shared across webview targets */
|
|
574
|
+
bridge?: BridgeConfig;
|
|
575
|
+
/** Warm daemon & process reuse settings for fast repeated runs */
|
|
576
|
+
warmDaemons?: WarmDaemonConfig;
|
|
343
577
|
}
|
|
344
578
|
interface ArtifactConfig {
|
|
345
579
|
outputDir?: string;
|
|
@@ -364,6 +598,8 @@ interface ProvConfig {
|
|
|
364
598
|
web?: AppConfig;
|
|
365
599
|
android?: AppConfig;
|
|
366
600
|
ios?: AppConfig;
|
|
601
|
+
electron?: ElectronAppConfig;
|
|
602
|
+
electrobun?: ElectrobunAppConfig;
|
|
367
603
|
};
|
|
368
604
|
defaults?: {
|
|
369
605
|
waitTimeout?: number;
|
|
@@ -384,6 +620,12 @@ interface ProvConfig {
|
|
|
384
620
|
retryDelay?: number;
|
|
385
621
|
/** Max workers per platform when using --parallel. */
|
|
386
622
|
workers?: number;
|
|
623
|
+
/** Default tap mode when a DOM channel resolves an element: "native" (real touch, default) or "dom" (fast synthetic click). */
|
|
624
|
+
tapMode?: TapMode;
|
|
625
|
+
/** Pin device locale across targets so system UI sheet labels stay deterministic. */
|
|
626
|
+
locale?: string;
|
|
627
|
+
/** Fail web element waits early when the page is idle & readyState === "complete" instead of waiting full waitTimeout. */
|
|
628
|
+
failFastWhenIdle?: boolean;
|
|
387
629
|
};
|
|
388
630
|
platforms?: Platform[];
|
|
389
631
|
/** Run platforms concurrently when they use independent resources. Default: false (serial). */
|
|
@@ -408,6 +650,17 @@ interface ProvConfig {
|
|
|
408
650
|
threshold?: number;
|
|
409
651
|
maxDiffPixelRatio?: number;
|
|
410
652
|
baselinesDir?: string;
|
|
653
|
+
mode?: "pixel" | "layout-tolerant";
|
|
654
|
+
};
|
|
655
|
+
/** Pluggable CI filters evaluated when `--changed-since <ref>` is passed. */
|
|
656
|
+
filters?: Array<{
|
|
657
|
+
name: string;
|
|
658
|
+
filter: (flows: any[], context: any) => Promise<any> | any;
|
|
659
|
+
}>;
|
|
660
|
+
/** Verified replay cache settings for optional agentic steps (`.spana/cache/`). */
|
|
661
|
+
replayCache?: {
|
|
662
|
+
mode?: "read-write" | "strict" | "off";
|
|
663
|
+
dir?: string;
|
|
411
664
|
};
|
|
412
665
|
}
|
|
413
666
|
declare function defineConfig(config: ProvConfig): ProvConfig;
|
|
@@ -418,6 +671,14 @@ interface WaitOptions {
|
|
|
418
671
|
settleTimeout?: number;
|
|
419
672
|
/** Starting poll interval for adaptive polling. Default: 50ms. Set equal to pollInterval to disable adaptive backoff. */
|
|
420
673
|
initialPollInterval?: number;
|
|
674
|
+
/** Tap dispatch mode when resolved via DOM channel: "native" (default, real touch) or "dom" (fast synthetic click). */
|
|
675
|
+
tapMode?: TapMode;
|
|
676
|
+
/** Platform hint for coordinate scaling (android physical px vs ios logical pt). */
|
|
677
|
+
platform?: Platform;
|
|
678
|
+
/** Fail early on web when DOM stays idle and document is complete instead of waiting full timeout. */
|
|
679
|
+
failFastWhenIdle?: boolean;
|
|
680
|
+
/** Quiet window in ms before failFastWhenIdle resolves empty. Default: 250. */
|
|
681
|
+
idleQuietMs?: number;
|
|
421
682
|
}
|
|
422
683
|
|
|
423
684
|
type Direction = "up" | "down" | "left" | "right";
|
|
@@ -448,4 +709,4 @@ interface StorybookOpenOptions {
|
|
|
448
709
|
globals?: Record<string, StorybookValue>;
|
|
449
710
|
}
|
|
450
711
|
|
|
451
|
-
export { type AppiumExecutionConfig as A, type
|
|
712
|
+
export { type AppiumExecutionConfig as A, type BrowserRouteMatcher as B, type RelativeSelector as C, DriverError as D, type ExtendedSelector as E, type ScrollUntilVisibleOptions as F, type StorybookConfig as G, type StorybookOpenOptions as H, type StorybookValue as I, type TouchAction as J, type TouchSequence as K, type LaunchOptions as L, type WebBrowserEngine as M, type WebExecutionConfig as N, type WebResourceBlockType as O, type Platform as P, buildDomWaitForSelectorScript as Q, type RawDriverService as R, type Selector as S, type TapMode as T, defineConfig as U, isSystemUISelector as V, type WarmDaemonConfig as W, isTestIDSelector as X, systemUI as Y, type WaitOptions as Z, type Direction as _, type DomElementMatch as a, type ProvConfig as b, type DomChannel as c, type DomTargetInfo as d, type DomWaitForSelectorOptions as e, type DomIdleOptions as f, type DomStorageEntries as g, type DomClearStorageOptions as h, type BrowserMockResponse as i, type BrowserConsoleLog as j, type BrowserJSError as k, type BrowserName as l, type ElectrobunAppConfig as m, type ElectrobunRenderer as n, type AppConfig as o, type ArtifactConfig as p, type BackUntilVisibleOptions as q, type BridgeConfig as r, type BrowserHAR as s, type BrowserNetworkConditions as t, DeviceInfo as u, type DeviceStateConfig as v, type DismissKeyboardOptions as w, type DomChannelKind as x, type DomRect as y, type ElectronAppConfig as z };
|
|
@@ -2,7 +2,7 @@ import "./chunk-DGUM43GV.js";
|
|
|
2
2
|
|
|
3
3
|
// src/cli/studio-command.ts
|
|
4
4
|
async function runStudioCommand(options) {
|
|
5
|
-
const { startStudio } = await import("./server-
|
|
5
|
+
const { startStudio } = await import("./server-PRM7BVVD.js");
|
|
6
6
|
const { existsSync } = await import("fs");
|
|
7
7
|
const { resolve, dirname } = await import("path");
|
|
8
8
|
const { fileURLToPath } = await import("url");
|
|
@@ -21,4 +21,4 @@ async function runStudioCommand(options) {
|
|
|
21
21
|
export {
|
|
22
22
|
runStudioCommand
|
|
23
23
|
};
|
|
24
|
-
//# sourceMappingURL=studio-command-
|
|
24
|
+
//# sourceMappingURL=studio-command-O3NN5BCG.js.map
|
|
File without changes
|