spana-test 0.4.0 → 0.6.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.
Files changed (157) hide show
  1. package/.agents/skills/spana-testing/SKILL.md +122 -246
  2. package/LICENSE +0 -0
  3. package/README.md +199 -68
  4. package/dist/{accessibility-audit-RS3VIWRT.js → accessibility-audit-YZOPUY3D.js} +7 -3
  5. package/dist/accessibility-audit-YZOPUY3D.js.map +1 -0
  6. package/dist/agent/index.d.ts +3 -84
  7. package/dist/agent/index.js +11 -10
  8. package/dist/agent/index.js.map +0 -0
  9. package/dist/allure-RNMEYTXS.js +0 -0
  10. package/dist/allure-RNMEYTXS.js.map +0 -0
  11. package/dist/{android-GFW6OXPQ.js → android-4NVTZMHL.js} +6 -2
  12. package/dist/{android-GFW6OXPQ.js.map → android-4NVTZMHL.js.map} +0 -0
  13. package/dist/app-DcLXtpv4.d.ts +908 -0
  14. package/dist/appium-server-66GVUL24.js +0 -0
  15. package/dist/appium-server-66GVUL24.js.map +0 -0
  16. package/dist/baseline-manager-5TIUCNP5.js +0 -0
  17. package/dist/baseline-manager-5TIUCNP5.js.map +0 -0
  18. package/dist/chunk-3FSZNKEF.js +0 -0
  19. package/dist/chunk-3FSZNKEF.js.map +0 -0
  20. package/dist/chunk-3SH5JQF7.js +611 -0
  21. package/dist/chunk-3SH5JQF7.js.map +1 -0
  22. package/dist/chunk-4K3FZTSV.js +179 -0
  23. package/dist/chunk-4K3FZTSV.js.map +1 -0
  24. package/dist/chunk-C4E4XULT.js +540 -0
  25. package/dist/chunk-C4E4XULT.js.map +1 -0
  26. package/dist/{chunk-3J4NG7JU.js → chunk-CY3DKTBZ.js} +8 -2
  27. package/dist/chunk-CY3DKTBZ.js.map +1 -0
  28. package/dist/chunk-DGUM43GV.js +0 -0
  29. package/dist/chunk-DGUM43GV.js.map +0 -0
  30. package/dist/chunk-DTNK54C2.js +127 -0
  31. package/dist/chunk-DTNK54C2.js.map +1 -0
  32. package/dist/{chunk-EWIR2GVV.js → chunk-H27IBIGA.js} +19 -2
  33. package/dist/chunk-H27IBIGA.js.map +1 -0
  34. package/dist/{chunk-PZYZ4O6D.js → chunk-HCG4CJKR.js} +23 -5
  35. package/dist/chunk-HCG4CJKR.js.map +1 -0
  36. package/dist/{chunk-YGHDMA6D.js → chunk-HYSTRWYN.js} +142 -41
  37. package/dist/chunk-HYSTRWYN.js.map +1 -0
  38. package/dist/chunk-IHVZKQQW.js +0 -0
  39. package/dist/chunk-IHVZKQQW.js.map +0 -0
  40. package/dist/{chunk-7VOWF42B.js → chunk-KBRLIQRA.js} +89 -8
  41. package/dist/chunk-KBRLIQRA.js.map +1 -0
  42. package/dist/chunk-KEUZLBQS.js +2935 -0
  43. package/dist/chunk-KEUZLBQS.js.map +1 -0
  44. package/dist/chunk-KJPHH2TW.js +0 -0
  45. package/dist/chunk-KJPHH2TW.js.map +0 -0
  46. package/dist/chunk-LAMTF4LX.js +89 -0
  47. package/dist/chunk-LAMTF4LX.js.map +1 -0
  48. package/dist/chunk-LCV673G3.js +3050 -0
  49. package/dist/chunk-LCV673G3.js.map +1 -0
  50. package/dist/chunk-OBCFACUW.js +0 -0
  51. package/dist/chunk-OBCFACUW.js.map +0 -0
  52. package/dist/{chunk-3TRMQCUT.js → chunk-PLE7RFQE.js} +31 -2
  53. package/dist/chunk-PLE7RFQE.js.map +1 -0
  54. package/dist/chunk-PWUJT5HE.js +5679 -0
  55. package/dist/chunk-PWUJT5HE.js.map +1 -0
  56. package/dist/{chunk-FJAJ4YNC.js → chunk-S4JVAHBR.js} +2 -2
  57. package/dist/{chunk-FJAJ4YNC.js.map → chunk-S4JVAHBR.js.map} +0 -0
  58. package/dist/chunk-S5JNNDXS.js +0 -0
  59. package/dist/chunk-S5JNNDXS.js.map +0 -0
  60. package/dist/{chunk-KYPLYRKW.js → chunk-WBBMEAHU.js} +122 -15
  61. package/dist/chunk-WBBMEAHU.js.map +1 -0
  62. package/dist/chunk-X2TJP7LB.js +0 -0
  63. package/dist/chunk-X2TJP7LB.js.map +0 -0
  64. package/dist/{chunk-5245YBLL.js → chunk-Y2RZNOKU.js} +2 -2
  65. package/dist/{chunk-5245YBLL.js.map → chunk-Y2RZNOKU.js.map} +0 -0
  66. package/dist/cli.js +62 -22
  67. package/dist/cli.js.map +1 -1
  68. package/dist/compiler-X6WTFMYF.js +0 -0
  69. package/dist/compiler-X6WTFMYF.js.map +0 -0
  70. package/dist/config-loader-J4Z2PMUQ.js +9 -0
  71. package/dist/{config-loader-QM72GKEL.js.map → config-loader-J4Z2PMUQ.js.map} +0 -0
  72. package/dist/{console-7UW7VROK.js → console-MI2XB5RG.js} +8 -2
  73. package/dist/console-MI2XB5RG.js.map +1 -0
  74. package/dist/daemon-manager-FBISTX24.js +28 -0
  75. package/dist/{discover-CAQY6EG6.js.map → daemon-manager-FBISTX24.js.map} +0 -0
  76. package/dist/{discover-CAQY6EG6.js → discover-LHEBSUIP.js} +3 -3
  77. package/dist/{installer-PVBSX7UC.js.map → discover-LHEBSUIP.js.map} +0 -0
  78. package/dist/doctor-command-WEHFANT7.js +378 -0
  79. package/dist/doctor-command-WEHFANT7.js.map +1 -0
  80. package/dist/filters-MQG2RMPX.js +26 -0
  81. package/dist/{runner-6HK62Q7B.js.map → filters-MQG2RMPX.js.map} +0 -0
  82. package/dist/flow-C2JQ7gUu.d.ts +95 -0
  83. package/dist/gherkin/steps.d.ts +2 -2
  84. package/dist/gherkin/steps.js +0 -0
  85. package/dist/gherkin/steps.js.map +0 -0
  86. package/dist/github-pr-YMWIPCCZ.js +10 -0
  87. package/dist/{session-2MZVGYAC.js.map → github-pr-YMWIPCCZ.js.map} +0 -0
  88. package/dist/html-F3X3XPSX.js +0 -0
  89. package/dist/html-F3X3XPSX.js.map +0 -0
  90. package/dist/index.d.ts +1323 -6
  91. package/dist/index.js +742 -6
  92. package/dist/index.js.map +1 -1
  93. package/dist/{init-command-U66XCM66.js → init-command-Z3QREABL.js} +60 -1
  94. package/dist/init-command-Z3QREABL.js.map +1 -0
  95. package/dist/{init-flow-command-PR7J5FBM.js → init-flow-command-4EKRVTNT.js} +2 -2
  96. package/dist/{init-flow-command-PR7J5FBM.js.map → init-flow-command-4EKRVTNT.js.map} +0 -0
  97. package/dist/{installer-PVBSX7UC.js → installer-VUPFWP5X.js} +7 -2
  98. package/dist/{validator-HZ2A3NEI.js.map → installer-VUPFWP5X.js.map} +0 -0
  99. package/dist/ios-JPK43TFZ.js +0 -0
  100. package/dist/ios-JPK43TFZ.js.map +0 -0
  101. package/dist/json-JMRPUVY2.js +0 -0
  102. package/dist/json-JMRPUVY2.js.map +0 -0
  103. package/dist/junit-HLC62MK6.js +0 -0
  104. package/dist/junit-HLC62MK6.js.map +0 -0
  105. package/dist/machine-6H25TRTU.js +0 -0
  106. package/dist/machine-6H25TRTU.js.map +0 -0
  107. package/dist/provider-YIPU5K42.js +0 -0
  108. package/dist/provider-YIPU5K42.js.map +0 -0
  109. package/dist/redact-U72BUBBR.js +0 -0
  110. package/dist/redact-U72BUBBR.js.map +0 -0
  111. package/dist/{runner-6HK62Q7B.js → runner-TF4OKPYP.js} +2 -2
  112. package/dist/runner-TF4OKPYP.js.map +1 -0
  113. package/dist/screenshot-compare-5NINZVOK.js +136 -0
  114. package/dist/screenshot-compare-5NINZVOK.js.map +1 -0
  115. package/dist/server-3MGZNK67.js +14 -0
  116. package/dist/server-3MGZNK67.js.map +1 -0
  117. package/dist/{server-PZBRGU7P.js → server-OANRDAHN.js} +15 -14
  118. package/dist/{server-PZBRGU7P.js.map → server-OANRDAHN.js.map} +1 -1
  119. package/dist/session-Daq0mE_a.d.ts +140 -0
  120. package/dist/session-Q3QYHT4Q.js +18 -0
  121. package/dist/session-Q3QYHT4Q.js.map +1 -0
  122. package/dist/{studio-command-YDWQOMRX.js → studio-command-RJYLJT4I.js} +2 -2
  123. package/dist/{studio-command-YDWQOMRX.js.map → studio-command-RJYLJT4I.js.map} +0 -0
  124. package/dist/{test-command-B2VLWGDK.js → test-command-ALH5ZQY5.js} +247 -1343
  125. package/dist/test-command-ALH5ZQY5.js.map +1 -0
  126. package/dist/{validator-HZ2A3NEI.js → validator-BLOLIHUY.js} +3 -3
  127. package/dist/validator-BLOLIHUY.js.map +1 -0
  128. package/package.json +7 -3
  129. package/studio-dist/assets/index-C-Io44gy.js +0 -0
  130. package/studio-dist/assets/index-DfM9lK4p.css +0 -0
  131. package/studio-dist/index.html +0 -0
  132. package/dist/accessibility-audit-RS3VIWRT.js.map +0 -1
  133. package/dist/chunk-3J4NG7JU.js.map +0 -1
  134. package/dist/chunk-3TRMQCUT.js.map +0 -1
  135. package/dist/chunk-7VOWF42B.js.map +0 -1
  136. package/dist/chunk-EWIR2GVV.js.map +0 -1
  137. package/dist/chunk-KYPLYRKW.js.map +0 -1
  138. package/dist/chunk-LC3QJIHY.js +0 -440
  139. package/dist/chunk-LC3QJIHY.js.map +0 -1
  140. package/dist/chunk-MCT4DYDK.js +0 -2671
  141. package/dist/chunk-MCT4DYDK.js.map +0 -1
  142. package/dist/chunk-PZYZ4O6D.js.map +0 -1
  143. package/dist/chunk-YAV6KBSW.js +0 -1318
  144. package/dist/chunk-YAV6KBSW.js.map +0 -1
  145. package/dist/chunk-YGHDMA6D.js.map +0 -1
  146. package/dist/config-loader-QM72GKEL.js +0 -9
  147. package/dist/console-7UW7VROK.js.map +0 -1
  148. package/dist/doctor-command-YGQPO7GH.js +0 -71
  149. package/dist/doctor-command-YGQPO7GH.js.map +0 -1
  150. package/dist/element-DZ0HyJ3C.d.ts +0 -25
  151. package/dist/flow-thjUxXXx.d.ts +0 -168
  152. package/dist/init-command-U66XCM66.js.map +0 -1
  153. package/dist/screenshot-compare-JFHH2WR4.js +0 -75
  154. package/dist/screenshot-compare-JFHH2WR4.js.map +0 -1
  155. package/dist/session-2MZVGYAC.js +0 -17
  156. package/dist/storybook-pBOPe_1D.d.ts +0 -451
  157. package/dist/test-command-B2VLWGDK.js.map +0 -1
@@ -1,451 +0,0 @@
1
- import { Schema, Effect } from 'effect';
2
-
3
- type Platform = "android" | "ios" | "web";
4
- /**
5
- * Selector types. Generic parameter `T` lets projects pin a union of known
6
- * testIDs so `{ testID: "bogus-id" }` becomes a type error.
7
- */
8
- type Selector<T extends string = string> = T | {
9
- testID: T;
10
- } | {
11
- text: string;
12
- } | {
13
- accessibilityLabel: string;
14
- } | {
15
- point: {
16
- x: number;
17
- y: number;
18
- };
19
- };
20
- /** Relative selector — find element relative to an anchor element's position. */
21
- interface RelativeSelector<T extends string = string> {
22
- selector: Selector<T>;
23
- below?: Selector<T>;
24
- above?: Selector<T>;
25
- leftOf?: Selector<T>;
26
- rightOf?: Selector<T>;
27
- childOf?: Selector<T>;
28
- }
29
- /** Extended selector that supports both simple and relative selectors. */
30
- type ExtendedSelector<T extends string = string> = Selector<T> | RelativeSelector<T>;
31
-
32
- declare const DriverError_base: Schema.TaggedErrorClass<DriverError, "DriverError", {
33
- readonly _tag: Schema.tag<"DriverError">;
34
- } & {
35
- message: typeof Schema.String;
36
- command: Schema.optional<typeof Schema.String>;
37
- exitCode: Schema.optional<typeof Schema.Number>;
38
- stdout: Schema.optional<typeof Schema.String>;
39
- stderr: Schema.optional<typeof Schema.String>;
40
- }>;
41
- declare class DriverError extends DriverError_base {
42
- }
43
-
44
- declare const DeviceInfo: Schema.Struct<{
45
- platform: Schema.Literal<["android", "ios", "web"]>;
46
- deviceId: typeof Schema.String;
47
- name: typeof Schema.String;
48
- isEmulator: typeof Schema.Boolean;
49
- screenWidth: typeof Schema.Number;
50
- screenHeight: typeof Schema.Number;
51
- driverType: Schema.Literal<["playwright", "uiautomator2", "wda", "appium"]>;
52
- }>;
53
- type DeviceInfo = typeof DeviceInfo.Type;
54
-
55
- type RawHierarchy = string;
56
- /**
57
- * Per-launch device state overrides (language/locale/timeZone) applied at app
58
- * launch time. Maps to the `appium:language` / `appium:locale` /
59
- * `appium:timeZone` capabilities on Appium providers; used to drive Expo /
60
- * React Native localization for the duration of a flow.
61
- */
62
- interface DeviceStateConfig {
63
- language?: string;
64
- locale?: string;
65
- timeZone?: string;
66
- }
67
- interface LaunchOptions<R extends string = string> {
68
- clearState?: boolean;
69
- clearKeychain?: boolean;
70
- /** Native deep link URL (e.g. `spana://playground`). `R` lets projects type it. */
71
- deepLink?: R;
72
- launchArguments?: Record<string, unknown>;
73
- deviceState?: DeviceStateConfig;
74
- }
75
- type BrowserRouteMatcher = string | RegExp;
76
- interface BrowserMockResponse {
77
- status?: number;
78
- body?: string;
79
- json?: unknown;
80
- headers?: Record<string, string>;
81
- contentType?: string;
82
- }
83
- type NetworkProfile = "wifi" | "4g" | "3g" | "2g" | "edge" | "offline";
84
- interface NetworkConditions {
85
- profile?: NetworkProfile;
86
- offline?: boolean;
87
- latencyMs?: number;
88
- downloadThroughputKbps?: number;
89
- uploadThroughputKbps?: number;
90
- }
91
- /** @deprecated Use `NetworkConditions` instead. */
92
- type BrowserNetworkConditions = NetworkConditions;
93
- interface BrowserConsoleLogLocation {
94
- url?: string;
95
- lineNumber?: number;
96
- columnNumber?: number;
97
- }
98
- interface BrowserConsoleLog {
99
- type: string;
100
- text: string;
101
- location?: BrowserConsoleLogLocation;
102
- }
103
- interface BrowserJSError {
104
- name?: string;
105
- message: string;
106
- stack?: string;
107
- }
108
- interface BrowserHARHeader {
109
- name: string;
110
- value: string;
111
- }
112
- interface BrowserHAREntry {
113
- pageref: string;
114
- startedDateTime: string;
115
- time: number;
116
- request: {
117
- method: string;
118
- url: string;
119
- httpVersion: string;
120
- headers: BrowserHARHeader[];
121
- queryString: BrowserHARHeader[];
122
- headersSize: number;
123
- bodySize: number;
124
- postData?: {
125
- mimeType: string;
126
- text?: string;
127
- };
128
- };
129
- response: {
130
- status: number;
131
- statusText: string;
132
- httpVersion: string;
133
- headers: BrowserHARHeader[];
134
- redirectURL: string;
135
- headersSize: number;
136
- bodySize: number;
137
- content: {
138
- size: number;
139
- mimeType: string;
140
- };
141
- };
142
- cache: Record<string, never>;
143
- timings: {
144
- blocked: number;
145
- dns: number;
146
- connect: number;
147
- ssl: number;
148
- send: number;
149
- wait: number;
150
- receive: number;
151
- };
152
- serverIPAddress?: string;
153
- _resourceType?: string;
154
- _failureText?: string;
155
- }
156
- interface BrowserHARPage {
157
- id: string;
158
- title: string;
159
- startedDateTime: string;
160
- pageTimings: {
161
- onContentLoad: number;
162
- onLoad: number;
163
- };
164
- }
165
- interface BrowserHAR {
166
- log: {
167
- version: "1.2";
168
- creator: {
169
- name: "spana";
170
- version: string;
171
- };
172
- browser: {
173
- name: string;
174
- };
175
- pages: BrowserHARPage[];
176
- entries: BrowserHAREntry[];
177
- };
178
- }
179
- type TouchAction = {
180
- type: "move";
181
- x: number;
182
- y: number;
183
- duration?: number;
184
- } | {
185
- type: "down";
186
- } | {
187
- type: "up";
188
- } | {
189
- type: "pause";
190
- duration: number;
191
- };
192
- interface TouchSequence {
193
- id: number;
194
- actions: TouchAction[];
195
- }
196
- interface RawDriverService<_T extends string = string, R extends string = string> {
197
- readonly beginFlow?: (flowName: string) => Effect.Effect<void, DriverError>;
198
- readonly getDriverLogs?: () => Effect.Effect<string[], DriverError>;
199
- readonly dumpHierarchy: () => Effect.Effect<RawHierarchy, DriverError>;
200
- readonly tapAtCoordinate: (x: number, y: number) => Effect.Effect<void, DriverError>;
201
- readonly doubleTapAtCoordinate: (x: number, y: number) => Effect.Effect<void, DriverError>;
202
- readonly longPressAtCoordinate: (x: number, y: number, duration: number) => Effect.Effect<void, DriverError>;
203
- readonly swipe: (startX: number, startY: number, endX: number, endY: number, duration: number) => Effect.Effect<void, DriverError>;
204
- readonly pinch?: (cx: number, cy: number, scale: number, duration: number) => Effect.Effect<void, DriverError>;
205
- readonly zoom?: (cx: number, cy: number, scale: number, duration: number) => Effect.Effect<void, DriverError>;
206
- readonly multiTouch?: (sequences: TouchSequence[]) => Effect.Effect<void, DriverError>;
207
- readonly inputText: (text: string) => Effect.Effect<void, DriverError>;
208
- readonly pressKey: (key: string) => Effect.Effect<void, DriverError>;
209
- readonly hideKeyboard: () => Effect.Effect<void, DriverError>;
210
- readonly takeScreenshot: () => Effect.Effect<Uint8Array, DriverError>;
211
- readonly getDeviceInfo: () => Effect.Effect<DeviceInfo, DriverError>;
212
- readonly launchApp: (bundleId: string, opts?: LaunchOptions<R>) => Effect.Effect<void, DriverError>;
213
- readonly stopApp: (bundleId: string) => Effect.Effect<void, DriverError>;
214
- readonly killApp: (bundleId: string) => Effect.Effect<void, DriverError>;
215
- readonly clearAppState: (bundleId: string) => Effect.Effect<void, DriverError>;
216
- readonly openLink: (url: string) => Effect.Effect<void, DriverError>;
217
- readonly back: () => Effect.Effect<void, DriverError>;
218
- readonly evaluate: <T = unknown>(script: string | ((...args: unknown[]) => T), ...args: unknown[]) => Effect.Effect<T, DriverError>;
219
- readonly getContexts?: () => Effect.Effect<string[], DriverError>;
220
- readonly getCurrentContext?: () => Effect.Effect<string, DriverError>;
221
- readonly setContext?: (contextId: string) => Effect.Effect<void, DriverError>;
222
- readonly mockNetwork?: (matcher: BrowserRouteMatcher, response: BrowserMockResponse) => Effect.Effect<void, DriverError>;
223
- readonly blockNetwork?: (matcher: BrowserRouteMatcher) => Effect.Effect<void, DriverError>;
224
- readonly clearNetworkMocks?: () => Effect.Effect<void, DriverError>;
225
- readonly setNetworkConditions?: (conditions: NetworkConditions) => Effect.Effect<void, DriverError>;
226
- readonly saveCookies?: (path: string) => Effect.Effect<void, DriverError>;
227
- readonly loadCookies?: (path: string) => Effect.Effect<void, DriverError>;
228
- readonly saveAuthState?: (path: string) => Effect.Effect<void, DriverError>;
229
- readonly loadAuthState?: (path: string) => Effect.Effect<void, DriverError>;
230
- readonly downloadFile?: (path: string) => Effect.Effect<void, DriverError>;
231
- readonly uploadFile?: (selector: Selector, path: string) => Effect.Effect<void, DriverError>;
232
- readonly newTab?: (url?: string) => Effect.Effect<string, DriverError>;
233
- readonly switchToTab?: (index: number) => Effect.Effect<void, DriverError>;
234
- readonly closeTab?: () => Effect.Effect<void, DriverError>;
235
- readonly getTabIds?: () => Effect.Effect<string[], DriverError>;
236
- readonly getConsoleLogs?: () => Effect.Effect<BrowserConsoleLog[], DriverError>;
237
- readonly getJSErrors?: () => Effect.Effect<BrowserJSError[], DriverError>;
238
- readonly getHAR?: () => Effect.Effect<BrowserHAR, DriverError>;
239
- }
240
-
241
- interface IOSSigningConfig {
242
- /** Apple Development Team ID (from developer.apple.com or Xcode) */
243
- teamId: string;
244
- /** Code signing identity (default: "Apple Development") */
245
- signingIdentity?: string;
246
- }
247
- interface AppConfig {
248
- url?: string;
249
- packageName?: string;
250
- bundleId?: string;
251
- /** Path to .app or .ipa for auto-install on device/simulator */
252
- appPath?: string;
253
- /** iOS code signing config for physical devices */
254
- signing?: IOSSigningConfig;
255
- }
256
- type BrowserName = "chromium" | "firefox" | "webkit";
257
- type StorybookValue = string | number | boolean | null;
258
- interface StorybookConfig {
259
- /** Optional dedicated Storybook URL (falls back to apps.web.url when omitted) */
260
- url?: string;
261
- /** Preview iframe path used to render isolated stories (default: /iframe.html) */
262
- iframePath?: string;
263
- }
264
- interface WebExecutionConfig {
265
- browser?: BrowserName;
266
- headless?: boolean;
267
- /** Optional Playwright storage state JSON file to preload for web runs */
268
- storageState?: string;
269
- /** Print verbose Playwright runtime events to stdout for local web debugging */
270
- verboseLogging?: boolean;
271
- /** Optional Storybook config for isolated component/story flows in the browser runtime */
272
- storybook?: StorybookConfig;
273
- }
274
- interface CloudAppReferenceConfig {
275
- /** Existing remote app reference, e.g. bs://... or storage:... */
276
- id?: string;
277
- /** Local file path to upload when the provider supports managed upload */
278
- path?: string;
279
- /** Override the uploaded file name when the provider supports it */
280
- name?: string;
281
- }
282
- interface BrowserStackAppConfig extends CloudAppReferenceConfig {
283
- /** Stable BrowserStack app alias */
284
- customId?: string;
285
- }
286
- interface BrowserStackLocalConfig {
287
- enabled?: boolean;
288
- binary?: string;
289
- identifier?: string;
290
- args?: string[];
291
- }
292
- interface BrowserStackHelperConfig {
293
- app?: BrowserStackAppConfig;
294
- local?: BrowserStackLocalConfig;
295
- options?: Record<string, unknown>;
296
- }
297
- interface SauceConnectConfig {
298
- enabled?: boolean;
299
- binary?: string;
300
- tunnelName?: string;
301
- args?: string[];
302
- }
303
- interface SauceLabsHelperConfig {
304
- app?: CloudAppReferenceConfig;
305
- connect?: SauceConnectConfig;
306
- options?: Record<string, unknown>;
307
- }
308
- interface AppiumExecutionConfig {
309
- serverUrl?: string;
310
- capabilities?: Record<string, unknown>;
311
- /**
312
- * Platform-specific capabilities merged on top of `capabilities` when the
313
- * matching platform runs. Useful when you want different `appium:deviceName`
314
- * or `appium:platformVersion` for Android vs iOS.
315
- */
316
- platformCapabilities?: {
317
- android?: Record<string, unknown>;
318
- ios?: Record<string, unknown>;
319
- };
320
- capabilitiesFile?: string;
321
- reportToProvider?: boolean;
322
- browserstack?: BrowserStackHelperConfig;
323
- saucelabs?: SauceLabsHelperConfig;
324
- /** Path to a custom cloud provider module (default export must conform to CloudProvider interface). */
325
- cloudProvider?: string;
326
- /**
327
- * Opt in to having spana spawn a local `appium` subprocess for the
328
- * duration of the test run. Requires `appium` to be on PATH. When true,
329
- * `serverUrl` (if set) is ignored and a URL is assigned to the
330
- * auto-started server instead. Off by default — spana never spawns
331
- * background processes unless you ask.
332
- */
333
- autoStart?: boolean;
334
- /** Override the `appium` binary name. Default: "appium". */
335
- autoStartBinary?: string;
336
- /** Extra CLI args to forward to the spawned Appium process. */
337
- autoStartArgs?: readonly string[];
338
- }
339
- interface ExecutionConfig {
340
- mode?: "local" | "appium";
341
- web?: WebExecutionConfig;
342
- appium?: AppiumExecutionConfig;
343
- }
344
- interface ArtifactConfig {
345
- outputDir?: string;
346
- captureOnFailure?: boolean;
347
- captureOnSuccess?: boolean;
348
- captureSteps?: boolean;
349
- screenshot?: boolean;
350
- uiHierarchy?: boolean;
351
- consoleLogs?: boolean;
352
- jsErrors?: boolean;
353
- har?: boolean;
354
- }
355
- interface HookContext {
356
- app: unknown;
357
- expect?: unknown;
358
- platform?: Platform;
359
- result?: unknown;
360
- summary?: unknown;
361
- }
362
- interface ProvConfig {
363
- apps?: {
364
- web?: AppConfig;
365
- android?: AppConfig;
366
- ios?: AppConfig;
367
- };
368
- defaults?: {
369
- waitTimeout?: number;
370
- pollInterval?: number;
371
- settleTimeout?: number;
372
- retries?: number;
373
- /** Pause after each action (tap, scroll) to let the UI settle. Default: 0 (disabled). */
374
- waitForIdleTimeout?: number;
375
- /** Delay between each character when typing. Default: 0 (instant). */
376
- typingDelay?: number;
377
- /** Starting poll interval for adaptive backoff. Default: 50ms. Set equal to pollInterval to disable adaptive backoff. */
378
- initialPollInterval?: number;
379
- /** Max age in ms before cached hierarchy is stale. Default: 100. Set to 0 to disable. */
380
- hierarchyCacheTtl?: number;
381
- /** Max depth for UI hierarchy snapshots on iOS. Default: 100. */
382
- snapshotMaxDepth?: number;
383
- /** Delay in ms between retry attempts of a failed flow. Default: 0 (immediate). */
384
- retryDelay?: number;
385
- /** Max workers per platform when using --parallel. */
386
- workers?: number;
387
- };
388
- platforms?: Platform[];
389
- /** Run platforms concurrently when they use independent resources. Default: false (serial). */
390
- parallelPlatforms?: boolean;
391
- flowDir?: string;
392
- launchOptions?: LaunchOptions;
393
- /**
394
- * Reporter names or module paths. Built-in: "console", "json", "junit", "html", "allure".
395
- * Custom reporters: provide a relative path (e.g., "./reporters/slack.ts") that default-exports
396
- * a Reporter object or a `(options: { outputDir: string }) => Reporter` factory function.
397
- */
398
- reporters?: string[];
399
- hooks?: {
400
- beforeAll?: (ctx: HookContext) => Promise<void>;
401
- beforeEach?: (ctx: HookContext) => Promise<void>;
402
- afterEach?: (ctx: HookContext) => Promise<void>;
403
- afterAll?: (ctx: HookContext) => Promise<void>;
404
- };
405
- artifacts?: ArtifactConfig;
406
- execution?: ExecutionConfig;
407
- visualRegression?: {
408
- threshold?: number;
409
- maxDiffPixelRatio?: number;
410
- baselinesDir?: string;
411
- };
412
- }
413
- declare function defineConfig(config: ProvConfig): ProvConfig;
414
-
415
- interface WaitOptions {
416
- timeout?: number;
417
- pollInterval?: number;
418
- settleTimeout?: number;
419
- /** Starting poll interval for adaptive polling. Default: 50ms. Set equal to pollInterval to disable adaptive backoff. */
420
- initialPollInterval?: number;
421
- }
422
-
423
- type Direction = "up" | "down" | "left" | "right";
424
- interface ScrollUntilVisibleOptions<_T extends string = string> extends WaitOptions {
425
- /** Where the target is relative to the current viewport. Default: "down". */
426
- direction?: Direction;
427
- /** Max number of scroll gestures to attempt before failing. Default: 5. */
428
- maxScrolls?: number;
429
- }
430
- type KeyboardDismissStrategy = "auto" | "driver" | "back";
431
- interface DismissKeyboardOptions {
432
- /** Default: "auto" (driver hideKeyboard, then Android back fallback). */
433
- strategy?: KeyboardDismissStrategy;
434
- }
435
- interface BackUntilVisibleOptions<_T extends string = string> extends WaitOptions {
436
- /** Max number of back actions to attempt before failing. Default: 3. */
437
- maxBacks?: number;
438
- }
439
-
440
- interface StorybookOpenOptions {
441
- /** Override the Storybook base URL for this call. */
442
- baseUrl?: string;
443
- /** Storybook view mode. Defaults to "story". */
444
- viewMode?: "story" | "docs";
445
- /** Story args encoded into the Storybook iframe query string. */
446
- args?: Record<string, StorybookValue>;
447
- /** Story globals encoded into the Storybook iframe query string. */
448
- globals?: Record<string, StorybookValue>;
449
- }
450
-
451
- export { type AppiumExecutionConfig as A, type BackUntilVisibleOptions as B, DeviceInfo as D, type ExtendedSelector as E, type LaunchOptions as L, type Platform as P, type RelativeSelector as R, type ScrollUntilVisibleOptions as S, type TouchAction as T, type WebExecutionConfig as W, type AppConfig as a, type ArtifactConfig as b, type BrowserConsoleLog as c, type BrowserHAR as d, type BrowserJSError as e, type BrowserMockResponse as f, type BrowserName as g, type BrowserNetworkConditions as h, type BrowserRouteMatcher as i, type DeviceStateConfig as j, type DismissKeyboardOptions as k, type ProvConfig as l, type Selector as m, type StorybookConfig as n, type StorybookOpenOptions as o, type StorybookValue as p, type TouchSequence as q, defineConfig as r, type WaitOptions as s, type Direction as t, type RawDriverService as u };