@delacour/warden-e2e 0.6.0 → 0.8.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/{chunk-yb1hcjqm.mjs → chunk-vs5npy59.mjs} +3370 -218
- package/index.mjs +247 -16
- package/package.json +2 -2
- package/preload.mjs +8264 -2387
- package/types/core/src/a11y/a11y.config.d.ts +47 -0
- package/types/core/src/affected/affected.schema.d.ts +142 -1
- package/types/core/src/allocate.d.ts +2 -1
- package/types/core/src/android-keyguard.d.ts +36 -0
- package/types/core/src/batch/preset.schema.d.ts +13 -1
- package/types/core/src/biometrics.d.ts +15 -0
- package/types/core/src/builds/app-option.schema.d.ts +1 -1
- package/types/core/src/builds/builds.defaults.d.ts +15 -0
- package/types/core/src/builds/config.d.ts +5 -1
- package/types/core/src/builds/config.schema.d.ts +275 -2
- package/types/core/src/builds/define-config.d.ts +159 -0
- package/types/core/src/builds/install-device.d.ts +37 -0
- package/types/core/src/builds/install.d.ts +17 -3
- package/types/core/src/builds/kinds.d.ts +21 -3
- package/types/core/src/builds/lock.d.ts +38 -0
- package/types/core/src/builds/resolve.d.ts +12 -2
- package/types/core/src/camera-mode.d.ts +17 -0
- package/types/core/src/camera-placeholder.d.ts +9 -0
- package/types/core/src/camera-profile.d.ts +12 -0
- package/types/core/src/claim-errors.d.ts +34 -0
- package/types/core/src/conditions/a11y-keys.d.ts +45 -0
- package/types/core/src/conditions/camera-media.d.ts +30 -0
- package/types/core/src/conditions/conditions.config.d.ts +141 -0
- package/types/core/src/conditions/conditions.d.ts +22 -0
- package/types/core/src/conditions/conditions.types.d.ts +171 -0
- package/types/core/src/conditions/inject-state.d.ts +13 -0
- package/types/core/src/conditions/launch-settings.d.ts +14 -0
- package/types/core/src/conditions/network.presets.d.ts +42 -0
- package/types/core/src/conditions/text-size.d.ts +19 -0
- package/types/core/src/golden/android-biometrics.d.ts +35 -0
- package/types/core/src/ios-runner/build.d.ts +28 -0
- package/types/core/src/ios-runner/cache.d.ts +44 -0
- package/types/core/src/ios-runner/classify.d.ts +7 -0
- package/types/core/src/ios-runner/pack.d.ts +17 -0
- package/types/core/src/ios-runner/runner-build.types.d.ts +76 -0
- package/types/core/src/ios-runner/signing.d.ts +40 -0
- package/types/core/src/ios-runner/sim-build.d.ts +36 -0
- package/types/core/src/ios-runner/stage.d.ts +26 -0
- package/types/core/src/lease-events.d.ts +126 -0
- package/types/core/src/netproxy/control.d.ts +75 -0
- package/types/core/src/netproxy/decide.d.ts +22 -0
- package/types/core/src/netproxy/handle-file.d.ts +12 -0
- package/types/core/src/netproxy/lease-proxy.d.ts +53 -0
- package/types/core/src/netproxy/netproxy.main.d.ts +40 -0
- package/types/core/src/netproxy/pipe.d.ts +37 -0
- package/types/core/src/netproxy/proxy.d.ts +48 -0
- package/types/core/src/netproxy/shaping.d.ts +43 -0
- package/types/core/src/ownership.d.ts +44 -0
- package/types/core/src/providers/android.d.ts +46 -2
- package/types/core/src/providers/provider.types.d.ts +9 -0
- package/types/core/src/queue.d.ts +43 -0
- package/types/core/src/store.d.ts +61 -5
- package/types/core/src/types.d.ts +57 -0
- package/types/core/src/xcode.d.ts +22 -0
- package/types/e2e/src/a11y/a11y-target.d.ts +23 -0
- package/types/e2e/src/a11y/a11y.types.d.ts +81 -0
- package/types/e2e/src/a11y/announcements.d.ts +24 -0
- package/types/e2e/src/a11y/audit.d.ts +22 -0
- package/types/e2e/src/a11y/native/atf.d.ts +51 -0
- package/types/e2e/src/a11y/native/xcuitest.d.ts +60 -0
- package/types/e2e/src/a11y/order.d.ts +5 -0
- package/types/e2e/src/a11y/rules/duplicate-name.d.ts +6 -0
- package/types/e2e/src/a11y/rules/hidden-focusable.d.ts +3 -0
- package/types/e2e/src/a11y/rules/image-no-name.d.ts +6 -0
- package/types/e2e/src/a11y/rules/label-in-name.d.ts +7 -0
- package/types/e2e/src/a11y/rules/missing-name.d.ts +3 -0
- package/types/e2e/src/a11y/rules/role-in-name.d.ts +3 -0
- package/types/e2e/src/a11y/rules/rule.context.d.ts +22 -0
- package/types/e2e/src/a11y/rules/target-size.d.ts +21 -0
- package/types/e2e/src/a11y/rules/text-clipped.d.ts +9 -0
- package/types/e2e/src/a11y/speech.d.ts +26 -0
- package/types/e2e/src/a11y/talkback-log.d.ts +13 -0
- package/types/e2e/src/alert-buttons.d.ts +9 -0
- package/types/e2e/src/app.d.ts +3 -2
- package/types/e2e/src/conditions/condition-events.d.ts +68 -0
- package/types/e2e/src/conditions/device-conditions.d.ts +198 -0
- package/types/e2e/src/conditions/geo.d.ts +15 -0
- package/types/e2e/src/conditions/gpx.d.ts +8 -0
- package/types/e2e/src/conditions/lease-recorder.d.ts +27 -0
- package/types/e2e/src/conditions/lease-store.d.ts +9 -0
- package/types/e2e/src/conditions/location-plan.d.ts +17 -0
- package/types/e2e/src/conditions/location-scenarios.data.d.ts +17 -0
- package/types/e2e/src/conditions/route-ticker.d.ts +53 -0
- package/types/e2e/src/conditions/scheduler.d.ts +83 -0
- package/types/e2e/src/device-a11y.d.ts +97 -0
- package/types/e2e/src/device.d.ts +67 -4
- package/types/e2e/src/driver/a11y-events.d.ts +30 -0
- package/types/e2e/src/driver/a11y-read.d.ts +12 -0
- package/types/e2e/src/driver/android/android-animations.d.ts +7 -0
- package/types/e2e/src/driver/android/android-app.d.ts +4 -0
- package/types/e2e/src/driver/android/android-argv.d.ts +21 -0
- package/types/e2e/src/driver/android/android-camera-host.d.ts +23 -0
- package/types/e2e/src/driver/android/android-camera.d.ts +28 -0
- package/types/e2e/src/driver/android/android-clock.d.ts +28 -0
- package/types/e2e/src/driver/android/android-device.d.ts +8 -0
- package/types/e2e/src/driver/android/android-driver.d.ts +22 -0
- package/types/e2e/src/driver/android/android-network.d.ts +66 -0
- package/types/e2e/src/driver/android/android-phone.d.ts +47 -0
- package/types/e2e/src/driver/android/android-screen-reader.d.ts +23 -0
- package/types/e2e/src/driver/android/android-settings.d.ts +41 -0
- package/types/e2e/src/driver/android/android-spoken.d.ts +18 -0
- package/types/e2e/src/driver/android/android-state.d.ts +10 -0
- package/types/e2e/src/driver/android/android-talkback.d.ts +57 -0
- package/types/e2e/src/driver/android/atf-device.d.ts +23 -0
- package/types/e2e/src/driver/android/atf-dex.generated.d.ts +7 -0
- package/types/e2e/src/driver/android/uiad-dex.generated.d.ts +5 -5
- package/types/e2e/src/driver/android/uiad-ops.d.ts +27 -1
- package/types/e2e/src/driver/android/uiad-protocol.d.ts +8 -0
- package/types/e2e/src/driver/android/uiad-screen-reader.d.ts +33 -0
- package/types/e2e/src/driver/clock-recorder.d.ts +9 -0
- package/types/e2e/src/driver/device-settings.d.ts +10 -0
- package/types/e2e/src/driver/driver.types.d.ts +242 -1
- package/types/e2e/src/driver/element-actions.d.ts +16 -0
- package/types/e2e/src/driver/ios/device/capabilities.d.ts +3 -0
- package/types/e2e/src/driver/ios/device/device-driver.d.ts +49 -0
- package/types/e2e/src/driver/ios/device/devicectl.d.ts +38 -0
- package/types/e2e/src/driver/ios/device/runner-protocol.d.ts +21 -0
- package/types/e2e/src/driver/ios/hid-recovery.d.ts +15 -0
- package/types/e2e/src/driver/ios/inject.d.ts +124 -0
- package/types/e2e/src/driver/ios/ios-a11y.d.ts +73 -0
- package/types/e2e/src/driver/ios/ios-audit.d.ts +36 -0
- package/types/e2e/src/driver/ios/ios-driver.d.ts +50 -1
- package/types/e2e/src/driver/ios/ios-network.d.ts +51 -0
- package/types/e2e/src/driver/ios/ios-settings.d.ts +44 -0
- package/types/e2e/src/driver/ios/sim-runner.d.ts +41 -0
- package/types/e2e/src/driver/ios/simctl.d.ts +41 -1
- package/types/e2e/src/driver/ios/simd-transport.d.ts +11 -2
- package/types/e2e/src/driver/ios/type-budget.d.ts +6 -1
- package/types/e2e/src/driver/native-audit.d.ts +26 -0
- package/types/e2e/src/driver/network-proxy.d.ts +52 -0
- package/types/e2e/src/driver/open.d.ts +20 -0
- package/types/e2e/src/driver/physical-conditions.d.ts +11 -0
- package/types/e2e/src/driver/requirements.d.ts +14 -0
- package/types/e2e/src/driver/screen-reader.d.ts +26 -0
- package/types/e2e/src/driver/typing.d.ts +1 -1
- package/types/e2e/src/env.d.ts +47 -0
- package/types/e2e/src/expect/a11y-matchers.d.ts +33 -0
- package/types/e2e/src/expect/expect.d.ts +7 -2
- package/types/e2e/src/expect/matchers.d.ts +14 -0
- package/types/e2e/src/fixture-session.d.ts +4 -0
- package/types/e2e/src/fixtures.d.ts +6 -1
- package/types/e2e/src/index.d.ts +6 -0
- package/types/e2e/src/runner/callsite.d.ts +3 -1
- package/types/e2e/src/runner/scope.d.ts +1 -0
- package/types/e2e/src/runner/test.d.ts +6 -0
- package/types/e2e/src/screen/render.d.ts +8 -0
- package/types/e2e/src/traced-device.d.ts +2 -1
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type Result } from "../../../types/src/result";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
/** Every rule id an audit can report (`native` = XCUITest / ATF findings). Keep in step with `A11yRuleId` in `@delacour/warden-e2e`. */
|
|
4
|
+
export declare const A11Y_RULE_IDS: readonly ["missing-name", "image-no-name", "target-size", "target-size-platform", "duplicate-name", "role-in-name", "label-in-name", "hidden-focusable", "text-clipped", "native"];
|
|
5
|
+
/**
|
|
6
|
+
* `a11y` (top level, or per `e2e.<suite>`): how `device.a11yAudit()` / `toPassA11yAudit()` judge a screen.
|
|
7
|
+
* `ignore` drops a rule (everywhere, or only on the element with that `identifier`); `minSeverity` is the lowest
|
|
8
|
+
* severity that fails (default `error`); `rules` limits the audit to those rules.
|
|
9
|
+
*/
|
|
10
|
+
export declare const a11yAuditConfigSchema: z.ZodObject<{
|
|
11
|
+
ignore: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
12
|
+
rule: z.ZodEnum<{
|
|
13
|
+
"missing-name": "missing-name";
|
|
14
|
+
"image-no-name": "image-no-name";
|
|
15
|
+
"target-size": "target-size";
|
|
16
|
+
"target-size-platform": "target-size-platform";
|
|
17
|
+
"duplicate-name": "duplicate-name";
|
|
18
|
+
"role-in-name": "role-in-name";
|
|
19
|
+
"label-in-name": "label-in-name";
|
|
20
|
+
"hidden-focusable": "hidden-focusable";
|
|
21
|
+
"text-clipped": "text-clipped";
|
|
22
|
+
native: "native";
|
|
23
|
+
}>;
|
|
24
|
+
identifier: z.ZodOptional<z.ZodString>;
|
|
25
|
+
}, z.core.$strict>>>;
|
|
26
|
+
minSeverity: z.ZodOptional<z.ZodEnum<{
|
|
27
|
+
error: "error";
|
|
28
|
+
warning: "warning";
|
|
29
|
+
}>>;
|
|
30
|
+
rules: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
31
|
+
"missing-name": "missing-name";
|
|
32
|
+
"image-no-name": "image-no-name";
|
|
33
|
+
"target-size": "target-size";
|
|
34
|
+
"target-size-platform": "target-size-platform";
|
|
35
|
+
"duplicate-name": "duplicate-name";
|
|
36
|
+
"role-in-name": "role-in-name";
|
|
37
|
+
"label-in-name": "label-in-name";
|
|
38
|
+
"hidden-focusable": "hidden-focusable";
|
|
39
|
+
"text-clipped": "text-clipped";
|
|
40
|
+
native: "native";
|
|
41
|
+
}>>>;
|
|
42
|
+
}, z.core.$strict>;
|
|
43
|
+
export type A11yAuditConfig = z.infer<typeof a11yAuditConfigSchema>;
|
|
44
|
+
/** The suite's keys over the top-level ones (a suite's `ignore` / `rules` replace, not extend); undefined when neither is set. */
|
|
45
|
+
export declare function mergeA11yAuditConfig(top: A11yAuditConfig | undefined, suite: A11yAuditConfig | undefined): A11yAuditConfig | undefined;
|
|
46
|
+
/** `WARDEN_A11Y_AUDIT`: the JSON `warden e2e` writes. */
|
|
47
|
+
export declare function parseA11yAuditEnv(raw: string): Result<A11yAuditConfig>;
|
|
@@ -39,12 +39,19 @@ export declare const e2eMetroSchema: z.ZodObject<{
|
|
|
39
39
|
prewarm: z.ZodDefault<z.ZodBoolean>;
|
|
40
40
|
readyTimeout: z.ZodDefault<z.ZodString>;
|
|
41
41
|
}, z.core.$strict>;
|
|
42
|
+
/** `physical` on a suite or leg: `true` = any ready physical device, `{ ids }` = exactly these (adb serials / CoreDevice UDIDs). Never booted, created or arranged. */
|
|
43
|
+
export declare const physicalSchema: z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
|
|
44
|
+
ids: z.ZodArray<z.ZodString>;
|
|
45
|
+
}, z.core.$strict>]>;
|
|
42
46
|
/** `e2e.<suite>.devices[]`: one leg of the run, with its own device pool. */
|
|
43
47
|
export declare const e2eDeviceLegSchema: z.ZodObject<{
|
|
44
48
|
profile: z.ZodString;
|
|
45
49
|
count: z.ZodDefault<z.ZodNumber>;
|
|
46
50
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
47
51
|
default: z.ZodDefault<z.ZodBoolean>;
|
|
52
|
+
physical: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
|
|
53
|
+
ids: z.ZodArray<z.ZodString>;
|
|
54
|
+
}, z.core.$strict>]>>;
|
|
48
55
|
}, z.core.$strict>;
|
|
49
56
|
/** `perf` (top level, or per `e2e.<suite>`): ceilings `device.perf.stop()` holds the report to. Each is lower-is-better. */
|
|
50
57
|
export declare const perfConfigSchema: z.ZodObject<{
|
|
@@ -92,6 +99,9 @@ export declare const e2eSuiteSchema: z.ZodObject<{
|
|
|
92
99
|
count: z.ZodDefault<z.ZodNumber>;
|
|
93
100
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
94
101
|
default: z.ZodDefault<z.ZodBoolean>;
|
|
102
|
+
physical: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
|
|
103
|
+
ids: z.ZodArray<z.ZodString>;
|
|
104
|
+
}, z.core.$strict>]>>;
|
|
95
105
|
}, z.core.$strict>>>;
|
|
96
106
|
metro: z.ZodOptional<z.ZodObject<{
|
|
97
107
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -108,6 +118,9 @@ export declare const e2eSuiteSchema: z.ZodObject<{
|
|
|
108
118
|
ios: "ios";
|
|
109
119
|
android: "android";
|
|
110
120
|
}>>;
|
|
121
|
+
physical: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
|
|
122
|
+
ids: z.ZodArray<z.ZodString>;
|
|
123
|
+
}, z.core.$strict>]>>;
|
|
111
124
|
base: z.ZodDefault<z.ZodString>;
|
|
112
125
|
maxDepth: z.ZodOptional<z.ZodNumber>;
|
|
113
126
|
runAll: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
@@ -138,8 +151,8 @@ export declare const e2eSuiteSchema: z.ZodObject<{
|
|
|
138
151
|
variant: z.ZodOptional<z.ZodString>;
|
|
139
152
|
kind: z.ZodOptional<z.ZodEnum<{
|
|
140
153
|
release: "release";
|
|
141
|
-
dev: "dev";
|
|
142
154
|
simulator: "simulator";
|
|
155
|
+
dev: "dev";
|
|
143
156
|
}>>;
|
|
144
157
|
}, z.core.$strict>]>>;
|
|
145
158
|
ports: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -152,6 +165,12 @@ export declare const e2eSuiteSchema: z.ZodObject<{
|
|
|
152
165
|
except: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
153
166
|
keep: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
154
167
|
}, z.core.$strict>]>>;
|
|
168
|
+
biometrics: z.ZodOptional<z.ZodBoolean>;
|
|
169
|
+
reclaim: z.ZodOptional<z.ZodEnum<{
|
|
170
|
+
none: "none";
|
|
171
|
+
uninstall: "uninstall";
|
|
172
|
+
erase: "erase";
|
|
173
|
+
}>>;
|
|
155
174
|
warmRunners: z.ZodOptional<z.ZodUndefined>;
|
|
156
175
|
warmDrivers: z.ZodOptional<z.ZodBoolean>;
|
|
157
176
|
headless: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -164,6 +183,127 @@ export declare const e2eSuiteSchema: z.ZodObject<{
|
|
|
164
183
|
peakMemoryMb: z.ZodOptional<z.ZodNumber>;
|
|
165
184
|
}, z.core.$strict>>;
|
|
166
185
|
}, z.core.$strict>>;
|
|
186
|
+
conditions: z.ZodOptional<z.ZodObject<{
|
|
187
|
+
network: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
188
|
+
edge: "edge";
|
|
189
|
+
"3g": "3g";
|
|
190
|
+
"4g": "4g";
|
|
191
|
+
lte: "lte";
|
|
192
|
+
wifi: "wifi";
|
|
193
|
+
slow: "slow";
|
|
194
|
+
lossy: "lossy";
|
|
195
|
+
online: "online";
|
|
196
|
+
offline: "offline";
|
|
197
|
+
}>, z.ZodObject<{
|
|
198
|
+
latencyMs: z.ZodOptional<z.ZodNumber>;
|
|
199
|
+
jitterMs: z.ZodOptional<z.ZodNumber>;
|
|
200
|
+
downKbps: z.ZodOptional<z.ZodNumber>;
|
|
201
|
+
upKbps: z.ZodOptional<z.ZodNumber>;
|
|
202
|
+
lossPct: z.ZodOptional<z.ZodNumber>;
|
|
203
|
+
}, z.core.$strict>]>>;
|
|
204
|
+
location: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
205
|
+
"city-run": "city-run";
|
|
206
|
+
"city-bike": "city-bike";
|
|
207
|
+
freeway: "freeway";
|
|
208
|
+
}>, z.ZodObject<{
|
|
209
|
+
lat: z.ZodNumber;
|
|
210
|
+
lon: z.ZodNumber;
|
|
211
|
+
altM: z.ZodOptional<z.ZodNumber>;
|
|
212
|
+
}, z.core.$strict>]>>;
|
|
213
|
+
clock: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
214
|
+
at: z.ZodString;
|
|
215
|
+
frozen: z.ZodOptional<z.ZodBoolean>;
|
|
216
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
217
|
+
offset: z.ZodString;
|
|
218
|
+
}, z.core.$strict>]>>;
|
|
219
|
+
permissions: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
220
|
+
location: "location";
|
|
221
|
+
locationAlways: "locationAlways";
|
|
222
|
+
camera: "camera";
|
|
223
|
+
photos: "photos";
|
|
224
|
+
photosAdd: "photosAdd";
|
|
225
|
+
contacts: "contacts";
|
|
226
|
+
contactsLimited: "contactsLimited";
|
|
227
|
+
notifications: "notifications";
|
|
228
|
+
microphone: "microphone";
|
|
229
|
+
calendar: "calendar";
|
|
230
|
+
reminders: "reminders";
|
|
231
|
+
motion: "motion";
|
|
232
|
+
mediaLibrary: "mediaLibrary";
|
|
233
|
+
siri: "siri";
|
|
234
|
+
}> & z.core.$partial, z.ZodEnum<{
|
|
235
|
+
granted: "granted";
|
|
236
|
+
denied: "denied";
|
|
237
|
+
unset: "unset";
|
|
238
|
+
}>>>;
|
|
239
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
240
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
241
|
+
a11y: z.ZodOptional<z.ZodObject<{
|
|
242
|
+
textSize: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
243
|
+
"extra-small": "extra-small";
|
|
244
|
+
small: "small";
|
|
245
|
+
medium: "medium";
|
|
246
|
+
large: "large";
|
|
247
|
+
"extra-large": "extra-large";
|
|
248
|
+
"extra-extra-large": "extra-extra-large";
|
|
249
|
+
"extra-extra-extra-large": "extra-extra-extra-large";
|
|
250
|
+
"accessibility-medium": "accessibility-medium";
|
|
251
|
+
"accessibility-large": "accessibility-large";
|
|
252
|
+
"accessibility-extra-large": "accessibility-extra-large";
|
|
253
|
+
"accessibility-extra-extra-large": "accessibility-extra-extra-large";
|
|
254
|
+
"accessibility-extra-extra-extra-large": "accessibility-extra-extra-extra-large";
|
|
255
|
+
}>, z.ZodNumber]>>;
|
|
256
|
+
boldText: z.ZodOptional<z.ZodBoolean>;
|
|
257
|
+
contrast: z.ZodOptional<z.ZodEnum<{
|
|
258
|
+
increased: "increased";
|
|
259
|
+
normal: "normal";
|
|
260
|
+
}>>;
|
|
261
|
+
reduceMotion: z.ZodOptional<z.ZodBoolean>;
|
|
262
|
+
}, z.core.$strict>>;
|
|
263
|
+
}, z.core.$strict>>;
|
|
264
|
+
a11y: z.ZodOptional<z.ZodObject<{
|
|
265
|
+
ignore: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
266
|
+
rule: z.ZodEnum<{
|
|
267
|
+
"missing-name": "missing-name";
|
|
268
|
+
"image-no-name": "image-no-name";
|
|
269
|
+
"target-size": "target-size";
|
|
270
|
+
"target-size-platform": "target-size-platform";
|
|
271
|
+
"duplicate-name": "duplicate-name";
|
|
272
|
+
"role-in-name": "role-in-name";
|
|
273
|
+
"label-in-name": "label-in-name";
|
|
274
|
+
"hidden-focusable": "hidden-focusable";
|
|
275
|
+
"text-clipped": "text-clipped";
|
|
276
|
+
native: "native";
|
|
277
|
+
}>;
|
|
278
|
+
identifier: z.ZodOptional<z.ZodString>;
|
|
279
|
+
}, z.core.$strict>>>;
|
|
280
|
+
minSeverity: z.ZodOptional<z.ZodEnum<{
|
|
281
|
+
error: "error";
|
|
282
|
+
warning: "warning";
|
|
283
|
+
}>>;
|
|
284
|
+
rules: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
285
|
+
"missing-name": "missing-name";
|
|
286
|
+
"image-no-name": "image-no-name";
|
|
287
|
+
"target-size": "target-size";
|
|
288
|
+
"target-size-platform": "target-size-platform";
|
|
289
|
+
"duplicate-name": "duplicate-name";
|
|
290
|
+
"role-in-name": "role-in-name";
|
|
291
|
+
"label-in-name": "label-in-name";
|
|
292
|
+
"hidden-focusable": "hidden-focusable";
|
|
293
|
+
"text-clipped": "text-clipped";
|
|
294
|
+
native: "native";
|
|
295
|
+
}>>>;
|
|
296
|
+
}, z.core.$strict>>;
|
|
297
|
+
camera: z.ZodOptional<z.ZodObject<{
|
|
298
|
+
back: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
299
|
+
path: z.ZodString;
|
|
300
|
+
loop: z.ZodOptional<z.ZodBoolean>;
|
|
301
|
+
}, z.core.$strict>]>>;
|
|
302
|
+
front: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
303
|
+
path: z.ZodString;
|
|
304
|
+
loop: z.ZodOptional<z.ZodBoolean>;
|
|
305
|
+
}, z.core.$strict>]>>;
|
|
306
|
+
}, z.core.$strict>>;
|
|
167
307
|
required: z.ZodDefault<z.ZodBoolean>;
|
|
168
308
|
specs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
169
309
|
entries: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
@@ -178,6 +318,7 @@ export declare const e2eSuiteSchema: z.ZodObject<{
|
|
|
178
318
|
}, z.core.$strict>;
|
|
179
319
|
export type E2eSpecConfig = z.infer<typeof e2eSpecSchema>;
|
|
180
320
|
export type E2eMetroConfig = z.infer<typeof e2eMetroSchema>;
|
|
321
|
+
export type E2ePhysical = z.infer<typeof physicalSchema>;
|
|
181
322
|
export type E2eDeviceLeg = z.infer<typeof e2eDeviceLegSchema>;
|
|
182
323
|
export type E2eSpecEntryConfig = z.infer<typeof e2eSpecEntrySchema>;
|
|
183
324
|
export type E2eSlimConfig = z.infer<typeof slimConfigSchema>;
|
|
@@ -18,6 +18,7 @@ export declare function compareRuntimeDesc(a: InventoryDevice, b: InventoryDevic
|
|
|
18
18
|
/**
|
|
19
19
|
* Pure allocation: which devices satisfy `request` given current leases. Free warden devices first
|
|
20
20
|
* (booted before shutdown, newest runtime first), then pool growth up to `max`. Foreign devices are
|
|
21
|
-
* only considered with `adopt`.
|
|
21
|
+
* only considered with `adopt`. Physical devices are never considered, even with `adopt`, unless
|
|
22
|
+
* `request.physical` asks for them: then only ready ones, no profile match, and nothing is created. Stale leases are ignored and returned for reclaim.
|
|
22
23
|
*/
|
|
23
24
|
export declare function allocate({ inventory, leases, request, now, pidAlive, skip }: AllocateInput): AllocationPlan;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Android emulator keyguard + readiness for biometrics (`+bio`) devices. Fingerprint enrollment needs a secure
|
|
3
|
+
* lock (a PIN), so an enrolled emulator boots behind a lock screen and the app cannot resolve its launcher until
|
|
4
|
+
* the user is unlocked. A restored snapshot can also come back with a black, unresponsive SystemUI that ignores
|
|
5
|
+
* wake / dismiss / PIN input until SystemUI is restarted. Emulator serials only: never run on a foreign device.
|
|
6
|
+
*/
|
|
7
|
+
import { type AsyncResult } from "../../types/src/result";
|
|
8
|
+
import type { Exec } from "./exec";
|
|
9
|
+
/** Keep the screen on and never time out, so the unlocked device does not lock again. */
|
|
10
|
+
export declare const STAY_AWAKE_COMMAND = "svc power stayon true; settings put system screen_off_timeout 2147483647";
|
|
11
|
+
/** Crashing SystemUI makes the system restart it with a fresh, responsive lock screen. */
|
|
12
|
+
export declare const SYSTEMUI_RESTART_COMMAND = "am crash com.android.systemui";
|
|
13
|
+
/** Wake, swipe the lock screen up to the PIN bouncer, type the PIN. */
|
|
14
|
+
export declare function unlockCommand(): string;
|
|
15
|
+
/** `isKeyguardShowing=` of `dumpsys window` (API 36), `undefined` when the dump has no such line. */
|
|
16
|
+
export declare function parseKeyguardShowing(dump: string): boolean | undefined;
|
|
17
|
+
export type KeyguardDeps = {
|
|
18
|
+
exec: Exec;
|
|
19
|
+
sleep: (ms: number) => Promise<void>;
|
|
20
|
+
/** the adb binary (`androidTools(env).adb`) */
|
|
21
|
+
adb: string;
|
|
22
|
+
now?: () => number;
|
|
23
|
+
};
|
|
24
|
+
/** Whether `dumpsys window` positively reports the keyguard up; an unreadable dump is not a lock screen. */
|
|
25
|
+
export declare function keyguardIsShowing(deps: KeyguardDeps, serial: string): Promise<boolean>;
|
|
26
|
+
/**
|
|
27
|
+
* Get past the lock screen (idempotent: nothing is typed when it is already gone) and keep the device awake.
|
|
28
|
+
* Up to three unlock attempts; before the last one SystemUI is restarted, which recovers a restored snapshot
|
|
29
|
+
* whose lock screen is black and ignores input.
|
|
30
|
+
*/
|
|
31
|
+
export declare function ensureUnlocked(deps: KeyguardDeps, serial: string): AsyncResult<void>;
|
|
32
|
+
/**
|
|
33
|
+
* `adb get-state` = device and the package manager answering (`pm path android`), polled for up to `timeoutMs`:
|
|
34
|
+
* `boot_completed` can precede both on a restored snapshot, and an install in that window fails `device offline`.
|
|
35
|
+
*/
|
|
36
|
+
export declare function systemReady(deps: KeyguardDeps, serial: string, timeoutMs: number): AsyncResult<void>;
|
|
@@ -4,6 +4,12 @@ export declare const slimConfigSchema: z.ZodUnion<readonly [z.ZodBoolean, z.ZodO
|
|
|
4
4
|
except: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5
5
|
keep: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6
6
|
}, z.core.$strict>]>;
|
|
7
|
+
/** `reclaim`: what happens to a device's state when its lease ends (`ReclaimMode`). */
|
|
8
|
+
export declare const reclaimSchema: z.ZodEnum<{
|
|
9
|
+
none: "none";
|
|
10
|
+
uninstall: "uninstall";
|
|
11
|
+
erase: "erase";
|
|
12
|
+
}>;
|
|
7
13
|
export declare const duration: z.ZodString;
|
|
8
14
|
export declare const portSpec: z.ZodString;
|
|
9
15
|
/** `batches.<name>` in `warden.config.ts`: a saved `warden batch` invocation. */
|
|
@@ -31,8 +37,8 @@ export declare const batchPresetSchema: z.ZodObject<{
|
|
|
31
37
|
variant: z.ZodOptional<z.ZodString>;
|
|
32
38
|
kind: z.ZodOptional<z.ZodEnum<{
|
|
33
39
|
release: "release";
|
|
34
|
-
dev: "dev";
|
|
35
40
|
simulator: "simulator";
|
|
41
|
+
dev: "dev";
|
|
36
42
|
}>>;
|
|
37
43
|
}, z.core.$strict>]>>;
|
|
38
44
|
headless: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -40,6 +46,12 @@ export declare const batchPresetSchema: z.ZodObject<{
|
|
|
40
46
|
except: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
41
47
|
keep: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
42
48
|
}, z.core.$strict>]>>;
|
|
49
|
+
biometrics: z.ZodOptional<z.ZodBoolean>;
|
|
50
|
+
reclaim: z.ZodOptional<z.ZodEnum<{
|
|
51
|
+
none: "none";
|
|
52
|
+
uninstall: "uninstall";
|
|
53
|
+
erase: "erase";
|
|
54
|
+
}>>;
|
|
43
55
|
retry: z.ZodOptional<z.ZodNumber>;
|
|
44
56
|
passes: z.ZodOptional<z.ZodNumber>;
|
|
45
57
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Biometric profiles. A profile with `biometrics: true` is a different device identity from the same profile
|
|
3
|
+
* without it: pool matching, goldens and snapshots all key on the profile string, so enrolled and plain
|
|
4
|
+
* devices never mix. The identity is the profile plus `+bio` (a character `profileSlug` never produces).
|
|
5
|
+
*/
|
|
6
|
+
export declare const BIOMETRIC_PROFILE_SUFFIX = "+bio";
|
|
7
|
+
/** Screen-lock PIN set on every biometrics device (Android needs a secure lock before it enrolls a fingerprint). */
|
|
8
|
+
export declare const BIOMETRIC_PIN = "1111";
|
|
9
|
+
/** Finger id `emu finger touch` presents once enrolled; `99` matches nothing. */
|
|
10
|
+
export declare const BIOMETRIC_FINGER_ID = 1;
|
|
11
|
+
export declare function biometricProfile(profile: string, biometrics: boolean): string;
|
|
12
|
+
export declare function splitBiometricProfile(profile: string): {
|
|
13
|
+
profile: string;
|
|
14
|
+
biometrics: boolean;
|
|
15
|
+
};
|
|
@@ -29,8 +29,8 @@ export declare const appOptionSchema: z.ZodUnion<readonly [z.ZodBoolean, z.ZodOb
|
|
|
29
29
|
variant: z.ZodOptional<z.ZodString>;
|
|
30
30
|
kind: z.ZodOptional<z.ZodEnum<{
|
|
31
31
|
release: "release";
|
|
32
|
-
dev: "dev";
|
|
33
32
|
simulator: "simulator";
|
|
33
|
+
dev: "dev";
|
|
34
34
|
}>>;
|
|
35
35
|
}, z.core.$strict>]>;
|
|
36
36
|
export type AppOption = z.infer<typeof appOptionSchema>;
|
|
@@ -12,6 +12,21 @@ export type BuildConfiguration = "Debug" | "Release";
|
|
|
12
12
|
export declare const IOS_NATIVE_PREPARE: string;
|
|
13
13
|
/** Local build command (run in the project root) when `build.<platform>` is not configured. */
|
|
14
14
|
export declare function defaultBuildCommand(platform: Platform, configuration: BuildConfiguration, framework?: AppFramework): string;
|
|
15
|
+
/** What an iOS device build is signed with: the team (always) and, when set, the bundle id that replaces the project's. */
|
|
16
|
+
export type IosDeviceBuild = {
|
|
17
|
+
team: string;
|
|
18
|
+
bundleIdentifier?: string | undefined;
|
|
19
|
+
};
|
|
20
|
+
/** The `xcodebuild -derivedDataPath` of a device build, relative to `ios/`: products land in `ios/build/Build/Products/<Config>-iphoneos`. */
|
|
21
|
+
export declare const IOS_DEVICE_DERIVED_DATA = "build";
|
|
22
|
+
/**
|
|
23
|
+
* Local build command of an iOS build for a physical device. A plain `xcodebuild` on the prebuilt workspace (the scheme
|
|
24
|
+
* has the workspace's name, as in Expo and the React Native template): `expo run:ios` would install to a device itself
|
|
25
|
+
* and cannot take the team or `-allowProvisioningUpdates`. `generic/platform=iOS` builds for any device the team's
|
|
26
|
+
* development profile lists; `-allowProvisioningUpdates` lets Xcode create that profile. A Release build runs Xcode's
|
|
27
|
+
* own bundling phase, so the JS is embedded.
|
|
28
|
+
*/
|
|
29
|
+
export declare function iosDeviceBuildCommand(configuration: BuildConfiguration, framework: AppFramework, device: IosDeviceBuild): string;
|
|
15
30
|
/** Android twin of `IOS_NATIVE_PREPARE`: generate `android/` when a CNG checkout has none. */
|
|
16
31
|
export declare const ANDROID_NATIVE_PREPARE = "{ [ -f android/gradlew ] || bunx expo prebuild --platform android --no-install; }";
|
|
17
32
|
/**
|
|
@@ -3,7 +3,7 @@ import type { z } from "zod";
|
|
|
3
3
|
import type { Platform } from "../types";
|
|
4
4
|
import { type BuildConfiguration } from "./builds.defaults";
|
|
5
5
|
import type { projectConfigSchema, wardenConfigSchema } from "./config.schema";
|
|
6
|
-
import type { BuildKind, ProjectKinds } from "./kinds";
|
|
6
|
+
import type { BuildKind, BuildTarget, ProjectKinds } from "./kinds";
|
|
7
7
|
import { type AppFramework } from "./native-ids";
|
|
8
8
|
/** The preferred config file, named in hints. */
|
|
9
9
|
export declare const CONFIG_FILE = "warden.config.ts";
|
|
@@ -45,6 +45,10 @@ export type Project = {
|
|
|
45
45
|
kinds?: ProjectKinds;
|
|
46
46
|
/** set by `projectForKind`: the kind this project is resolved as; undefined = the kind-less flow */
|
|
47
47
|
kind?: BuildKind;
|
|
48
|
+
/** set by `projectForKind` for a build signed for a physical iPhone; undefined = a simulator / emulator build */
|
|
49
|
+
target?: BuildTarget;
|
|
50
|
+
/** `projects[].ios.device.bundleIdentifier`: replaces the bundle id of builds for a physical iPhone (and the app's id there) */
|
|
51
|
+
iosDeviceBundleId?: string;
|
|
48
52
|
/** set by `projectForKind`: env of the local build (`kinds.<kind>.env`) */
|
|
49
53
|
buildEnv?: Record<string, string>;
|
|
50
54
|
cacheDirs: string[];
|