doc-detective 4.20.0 → 4.21.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/dist/common/src/schemas/schemas.json +2990 -2046
- package/dist/common/src/types/generated/config_v3.d.ts +42 -1
- package/dist/common/src/types/generated/config_v3.d.ts.map +1 -1
- package/dist/common/src/types/generated/context_v3.d.ts +42 -1
- package/dist/common/src/types/generated/context_v3.d.ts.map +1 -1
- package/dist/common/src/types/generated/report_v3.d.ts +42 -1
- package/dist/common/src/types/generated/report_v3.d.ts.map +1 -1
- package/dist/common/src/types/generated/resolvedTests_v3.d.ts +84 -2
- package/dist/common/src/types/generated/resolvedTests_v3.d.ts.map +1 -1
- package/dist/common/src/types/generated/spec_v3.d.ts +42 -1
- package/dist/common/src/types/generated/spec_v3.d.ts.map +1 -1
- package/dist/common/src/types/generated/startSurface_v3.d.ts +18 -16
- package/dist/common/src/types/generated/startSurface_v3.d.ts.map +1 -1
- package/dist/common/src/types/generated/step_v3.d.ts +18 -16
- package/dist/common/src/types/generated/step_v3.d.ts.map +1 -1
- package/dist/common/src/types/generated/test_v3.d.ts +82 -37
- package/dist/common/src/types/generated/test_v3.d.ts.map +1 -1
- package/dist/core/tests/androidEmulator.d.ts +137 -0
- package/dist/core/tests/androidEmulator.d.ts.map +1 -0
- package/dist/core/tests/androidEmulator.js +475 -0
- package/dist/core/tests/androidEmulator.js.map +1 -0
- package/dist/core/tests/appSurface.d.ts +55 -4
- package/dist/core/tests/appSurface.d.ts.map +1 -1
- package/dist/core/tests/appSurface.js +585 -89
- package/dist/core/tests/appSurface.js.map +1 -1
- package/dist/core/tests/findElement.d.ts.map +1 -1
- package/dist/core/tests/findElement.js +10 -1
- package/dist/core/tests/findElement.js.map +1 -1
- package/dist/core/tests/mobilePlatform.d.ts +11 -0
- package/dist/core/tests/mobilePlatform.d.ts.map +1 -0
- package/dist/core/tests/mobilePlatform.js +36 -0
- package/dist/core/tests/mobilePlatform.js.map +1 -0
- package/dist/core/tests/saveScreenshot.d.ts.map +1 -1
- package/dist/core/tests/saveScreenshot.js +7 -1
- package/dist/core/tests/saveScreenshot.js.map +1 -1
- package/dist/core/tests/typeKeys.d.ts.map +1 -1
- package/dist/core/tests/typeKeys.js +9 -1
- package/dist/core/tests/typeKeys.js.map +1 -1
- package/dist/core/tests.d.ts.map +1 -1
- package/dist/core/tests.js +324 -12
- package/dist/core/tests.js.map +1 -1
- package/dist/index.cjs +4879 -2334
- package/dist/runtime/androidInstaller.d.ts +123 -0
- package/dist/runtime/androidInstaller.d.ts.map +1 -0
- package/dist/runtime/androidInstaller.js +720 -0
- package/dist/runtime/androidInstaller.js.map +1 -0
- package/dist/runtime/androidSdk.d.ts +29 -0
- package/dist/runtime/androidSdk.d.ts.map +1 -0
- package/dist/runtime/androidSdk.js +147 -0
- package/dist/runtime/androidSdk.js.map +1 -0
- package/dist/runtime/cacheDir.d.ts +8 -0
- package/dist/runtime/cacheDir.d.ts.map +1 -1
- package/dist/runtime/cacheDir.js +7 -1
- package/dist/runtime/cacheDir.js.map +1 -1
- package/dist/runtime/installCommand.d.ts.map +1 -1
- package/dist/runtime/installCommand.js +32 -3
- package/dist/runtime/installCommand.js.map +1 -1
- package/package.json +3 -1
|
@@ -70,6 +70,7 @@ export type Test = {
|
|
|
70
70
|
steps?: [Step, ...Step[]];
|
|
71
71
|
contexts?: ResolvedContexts;
|
|
72
72
|
};
|
|
73
|
+
export type DeviceByName = string;
|
|
73
74
|
/**
|
|
74
75
|
* OpenAPI description and configuration.
|
|
75
76
|
*/
|
|
@@ -1684,7 +1685,7 @@ export type Routing63 = {
|
|
|
1684
1685
|
} | {
|
|
1685
1686
|
[k: string]: unknown;
|
|
1686
1687
|
};
|
|
1687
|
-
export type
|
|
1688
|
+
export type DeviceByName1 = string;
|
|
1688
1689
|
/**
|
|
1689
1690
|
* Wait for a specific element to be present. At least one finding field must be specified.
|
|
1690
1691
|
*/
|
|
@@ -3635,7 +3636,7 @@ export type Routing139 = {
|
|
|
3635
3636
|
} | {
|
|
3636
3637
|
[k: string]: unknown;
|
|
3637
3638
|
};
|
|
3638
|
-
export type
|
|
3639
|
+
export type DeviceByName2 = string;
|
|
3639
3640
|
/**
|
|
3640
3641
|
* Wait for a specific element to be present. At least one finding field must be specified.
|
|
3641
3642
|
*/
|
|
@@ -4019,7 +4020,7 @@ export interface Context {
|
|
|
4019
4020
|
/**
|
|
4020
4021
|
* Platforms to run tests on.
|
|
4021
4022
|
*/
|
|
4022
|
-
platforms?: ("linux" | "mac" | "windows") | ("linux" | "mac" | "windows")[];
|
|
4023
|
+
platforms?: ("linux" | "mac" | "windows" | "android" | "ios") | ("linux" | "mac" | "windows" | "android" | "ios")[];
|
|
4023
4024
|
/**
|
|
4024
4025
|
* Browsers to run tests on.
|
|
4025
4026
|
*/
|
|
@@ -4032,6 +4033,10 @@ export interface Context {
|
|
|
4032
4033
|
* Capabilities the environment must provide for this context to run. A string names a required command; an array names several; the object form checks commands (on PATH), files (paths, with `$VAR`/`$HOME` expansion), and environment variables. All entries are AND-ed. Any unmet requirement marks the context as SKIPPED — the same non-failing outcome as a `platforms` mismatch.
|
|
4033
4034
|
*/
|
|
4034
4035
|
requires?: string | [string, ...string[]] | Requirements;
|
|
4036
|
+
/**
|
|
4037
|
+
* Default device for a mobile (`android`/`ios`) context. A string references a device by name; an object refines it. The `platform` is implied by the context, so it is not required here. When the named device doesn't already exist, Doc Detective creates it with defaults (see `deviceType`/`osVersion`), provided the toolchain is installed (`doc-detective install android`). Same shape as `startSurface.device`.
|
|
4038
|
+
*/
|
|
4039
|
+
device?: DeviceByName | DeviceDescriptor;
|
|
4035
4040
|
}
|
|
4036
4041
|
/**
|
|
4037
4042
|
* Browser configuration.
|
|
@@ -4143,6 +4148,42 @@ export interface Requirements {
|
|
|
4143
4148
|
*/
|
|
4144
4149
|
env?: [string, ...string[]];
|
|
4145
4150
|
}
|
|
4151
|
+
export interface DeviceDescriptor {
|
|
4152
|
+
/**
|
|
4153
|
+
* Target platform. Selects the mobile driver. Required in `startSurface.device`; implied by the context in `context.device`.
|
|
4154
|
+
*/
|
|
4155
|
+
platform?: "android" | "ios";
|
|
4156
|
+
/**
|
|
4157
|
+
* Device name and registry identity — the same name resolves to the same device. Reference form: names an existing AVD (Android) / simulator (iOS) to reuse. If no device by this name exists, Doc Detective creates one under this name using `deviceType`/`osVersion` (or their defaults), provided the toolchain and a matching system image are installed (`doc-detective install android`).
|
|
4158
|
+
*/
|
|
4159
|
+
name?: string;
|
|
4160
|
+
/**
|
|
4161
|
+
* Abstract hardware profile used when creating a device (portable across `android`/`ios`). Doc Detective maps it to a built-in profile. Ignored when `name` already matches an existing device. Default: `phone`.
|
|
4162
|
+
*/
|
|
4163
|
+
deviceType?: "phone" | "tablet";
|
|
4164
|
+
/**
|
|
4165
|
+
* Platform version used when creating a device; must match an installed system image (install more with `doc-detective install android`). Ignored when `name` already matches an existing device. Default: the newest installed version.
|
|
4166
|
+
*/
|
|
4167
|
+
osVersion?: string;
|
|
4168
|
+
/**
|
|
4169
|
+
* Run the Android emulator without a window. Ignored where not applicable.
|
|
4170
|
+
*/
|
|
4171
|
+
headless?: boolean;
|
|
4172
|
+
/**
|
|
4173
|
+
* Initial orientation. Reserved; validated now, not yet implemented.
|
|
4174
|
+
*/
|
|
4175
|
+
orientation?: "portrait" | "landscape";
|
|
4176
|
+
/**
|
|
4177
|
+
* Pin a specific device/emulator instance by UDID. Reserved; validated now, not yet implemented.
|
|
4178
|
+
*/
|
|
4179
|
+
udid?: string;
|
|
4180
|
+
/**
|
|
4181
|
+
* Cloud device farm configuration, keyed by provider. Reserved; validated now, not yet implemented.
|
|
4182
|
+
*/
|
|
4183
|
+
provider?: {
|
|
4184
|
+
[k: string]: unknown;
|
|
4185
|
+
};
|
|
4186
|
+
}
|
|
4146
4187
|
export interface OpenAPIDescriptionTest {
|
|
4147
4188
|
[k: string]: unknown;
|
|
4148
4189
|
}
|
|
@@ -7020,7 +7061,7 @@ export interface StartSurface {
|
|
|
7020
7061
|
[k: string]: unknown;
|
|
7021
7062
|
}
|
|
7022
7063
|
/**
|
|
7023
|
-
* Open (provision) a surface and register it by name so later steps can target it with `surface`.
|
|
7064
|
+
* Open (provision) a surface and register it by name so later steps can target it with `surface`. Phases A1–A2 ship the desktop native app branch: launch a Windows or macOS application by executable path, `.app` path, bundle ID, or UWP AppUserModelID. macOS additionally requires the Accessibility permission for the process that runs Doc Detective (System Settings → Privacy & Security → Accessibility); without it the context lands as SKIPPED with a walkthrough. Phase A3 adds Android apps on a managed emulator via the `device`, `install`, and `activity` fields (iOS lands in A4). Browser/process branches and the parallel array form arrive with multi-surface Phase 6. See docs/design/native-app-surfaces.md.
|
|
7024
7065
|
*/
|
|
7025
7066
|
export interface StartSurface1 {
|
|
7026
7067
|
/**
|
|
@@ -7032,31 +7073,33 @@ export interface StartSurface1 {
|
|
|
7032
7073
|
*/
|
|
7033
7074
|
name?: string;
|
|
7034
7075
|
/**
|
|
7035
|
-
* Launch arguments (desktop apps).
|
|
7076
|
+
* Launch arguments (desktop apps). On macOS they pass to the app as a real argument array. On Windows they join into a single shell-style argument string for the driver, so an argument with embedded spaces must carry its own quotes (e.g. "\"My File.txt\"").
|
|
7036
7077
|
*/
|
|
7037
7078
|
args?: string[];
|
|
7038
7079
|
/**
|
|
7039
|
-
* Working directory for the launched app (desktop apps). Default: the run's working directory.
|
|
7080
|
+
* Working directory for the launched app (Windows desktop apps). Not supported on macOS — the driver launches apps through LaunchServices, which offers no working-directory control, so a non-default value fails with guidance there. Default: the run's working directory.
|
|
7040
7081
|
*/
|
|
7041
7082
|
workingDirectory?: string;
|
|
7042
7083
|
/**
|
|
7043
|
-
* Extra environment variables for the launched app (desktop apps).
|
|
7084
|
+
* Extra environment variables for the launched app (desktop apps). Supported on macOS; not supported by the Windows driver, where any value fails with guidance (set variables in the shell that launches Doc Detective instead).
|
|
7044
7085
|
*/
|
|
7045
7086
|
env?: {
|
|
7046
7087
|
[k: string]: string;
|
|
7047
7088
|
};
|
|
7048
7089
|
/**
|
|
7049
|
-
* Path to an installable artifact (`.apk`/`.app`/`.ipa`) to install on the device before launch.
|
|
7090
|
+
* Path to an installable artifact (`.apk`/`.app`/`.ipa`) to install on the device before launch. Lands with the Android phase (A3); on other platforms it is validated but not yet honored.
|
|
7050
7091
|
*/
|
|
7051
7092
|
install?: string;
|
|
7052
7093
|
/**
|
|
7053
|
-
* Android main activity override (defaults to the package's launcher activity).
|
|
7094
|
+
* Android main activity override (defaults to the package's launcher activity). Lands with the Android phase (A3).
|
|
7054
7095
|
*/
|
|
7055
7096
|
activity?: string;
|
|
7056
7097
|
/**
|
|
7057
|
-
* Device the app runs on. Omit for a host desktop app. A string references
|
|
7098
|
+
* Device the app runs on. Omit for a host desktop app, or (in a mobile context) to use the context's default device. A string references a device by name; an object refines it. Lands with the Android phase (A3).
|
|
7058
7099
|
*/
|
|
7059
|
-
device?:
|
|
7100
|
+
device?: DeviceByName1 | (DeviceDescriptor1 & {
|
|
7101
|
+
[k: string]: unknown;
|
|
7102
|
+
});
|
|
7060
7103
|
/**
|
|
7061
7104
|
* Escape-hatch passthrough: merged into the automation session's capabilities after the ones Doc Detective computes (namespaced per driver, e.g. `appium:noReset`). Driver- and version-specific; use sparingly.
|
|
7062
7105
|
*/
|
|
@@ -7069,17 +7112,21 @@ export interface StartSurface1 {
|
|
|
7069
7112
|
*/
|
|
7070
7113
|
timeout?: number;
|
|
7071
7114
|
}
|
|
7072
|
-
export interface
|
|
7115
|
+
export interface DeviceDescriptor1 {
|
|
7073
7116
|
/**
|
|
7074
|
-
* Target platform. Selects the mobile driver.
|
|
7117
|
+
* Target platform. Selects the mobile driver. Required in `startSurface.device`; implied by the context in `context.device`.
|
|
7075
7118
|
*/
|
|
7076
|
-
platform
|
|
7119
|
+
platform?: "android" | "ios";
|
|
7077
7120
|
/**
|
|
7078
|
-
*
|
|
7121
|
+
* Device name and registry identity — the same name resolves to the same device. Reference form: names an existing AVD (Android) / simulator (iOS) to reuse. If no device by this name exists, Doc Detective creates one under this name using `deviceType`/`osVersion` (or their defaults), provided the toolchain and a matching system image are installed (`doc-detective install android`).
|
|
7079
7122
|
*/
|
|
7080
7123
|
name?: string;
|
|
7081
7124
|
/**
|
|
7082
|
-
*
|
|
7125
|
+
* Abstract hardware profile used when creating a device (portable across `android`/`ios`). Doc Detective maps it to a built-in profile. Ignored when `name` already matches an existing device. Default: `phone`.
|
|
7126
|
+
*/
|
|
7127
|
+
deviceType?: "phone" | "tablet";
|
|
7128
|
+
/**
|
|
7129
|
+
* Platform version used when creating a device; must match an installed system image (install more with `doc-detective install android`). Ignored when `name` already matches an existing device. Default: the newest installed version.
|
|
7083
7130
|
*/
|
|
7084
7131
|
osVersion?: string;
|
|
7085
7132
|
/**
|
|
@@ -7090,10 +7137,6 @@ export interface DeviceDescriptor {
|
|
|
7090
7137
|
* Initial orientation. Reserved; validated now, not yet implemented.
|
|
7091
7138
|
*/
|
|
7092
7139
|
orientation?: "portrait" | "landscape";
|
|
7093
|
-
/**
|
|
7094
|
-
* Device kind. `emulator`/`simulator` (the default, inferred from `platform`) or `device` for real hardware. Reserved; validated now, not yet implemented.
|
|
7095
|
-
*/
|
|
7096
|
-
type?: "emulator" | "simulator" | "device";
|
|
7097
7140
|
/**
|
|
7098
7141
|
* Pin a specific device/emulator instance by UDID. Reserved; validated now, not yet implemented.
|
|
7099
7142
|
*/
|
|
@@ -10670,7 +10713,7 @@ export interface StartSurface2 {
|
|
|
10670
10713
|
[k: string]: unknown;
|
|
10671
10714
|
}
|
|
10672
10715
|
/**
|
|
10673
|
-
* Open (provision) a surface and register it by name so later steps can target it with `surface`.
|
|
10716
|
+
* Open (provision) a surface and register it by name so later steps can target it with `surface`. Phases A1–A2 ship the desktop native app branch: launch a Windows or macOS application by executable path, `.app` path, bundle ID, or UWP AppUserModelID. macOS additionally requires the Accessibility permission for the process that runs Doc Detective (System Settings → Privacy & Security → Accessibility); without it the context lands as SKIPPED with a walkthrough. Phase A3 adds Android apps on a managed emulator via the `device`, `install`, and `activity` fields (iOS lands in A4). Browser/process branches and the parallel array form arrive with multi-surface Phase 6. See docs/design/native-app-surfaces.md.
|
|
10674
10717
|
*/
|
|
10675
10718
|
export interface StartSurface3 {
|
|
10676
10719
|
/**
|
|
@@ -10682,31 +10725,33 @@ export interface StartSurface3 {
|
|
|
10682
10725
|
*/
|
|
10683
10726
|
name?: string;
|
|
10684
10727
|
/**
|
|
10685
|
-
* Launch arguments (desktop apps).
|
|
10728
|
+
* Launch arguments (desktop apps). On macOS they pass to the app as a real argument array. On Windows they join into a single shell-style argument string for the driver, so an argument with embedded spaces must carry its own quotes (e.g. "\"My File.txt\"").
|
|
10686
10729
|
*/
|
|
10687
10730
|
args?: string[];
|
|
10688
10731
|
/**
|
|
10689
|
-
* Working directory for the launched app (desktop apps). Default: the run's working directory.
|
|
10732
|
+
* Working directory for the launched app (Windows desktop apps). Not supported on macOS — the driver launches apps through LaunchServices, which offers no working-directory control, so a non-default value fails with guidance there. Default: the run's working directory.
|
|
10690
10733
|
*/
|
|
10691
10734
|
workingDirectory?: string;
|
|
10692
10735
|
/**
|
|
10693
|
-
* Extra environment variables for the launched app (desktop apps).
|
|
10736
|
+
* Extra environment variables for the launched app (desktop apps). Supported on macOS; not supported by the Windows driver, where any value fails with guidance (set variables in the shell that launches Doc Detective instead).
|
|
10694
10737
|
*/
|
|
10695
10738
|
env?: {
|
|
10696
10739
|
[k: string]: string;
|
|
10697
10740
|
};
|
|
10698
10741
|
/**
|
|
10699
|
-
* Path to an installable artifact (`.apk`/`.app`/`.ipa`) to install on the device before launch.
|
|
10742
|
+
* Path to an installable artifact (`.apk`/`.app`/`.ipa`) to install on the device before launch. Lands with the Android phase (A3); on other platforms it is validated but not yet honored.
|
|
10700
10743
|
*/
|
|
10701
10744
|
install?: string;
|
|
10702
10745
|
/**
|
|
10703
|
-
* Android main activity override (defaults to the package's launcher activity).
|
|
10746
|
+
* Android main activity override (defaults to the package's launcher activity). Lands with the Android phase (A3).
|
|
10704
10747
|
*/
|
|
10705
10748
|
activity?: string;
|
|
10706
10749
|
/**
|
|
10707
|
-
* Device the app runs on. Omit for a host desktop app. A string references
|
|
10750
|
+
* Device the app runs on. Omit for a host desktop app, or (in a mobile context) to use the context's default device. A string references a device by name; an object refines it. Lands with the Android phase (A3).
|
|
10708
10751
|
*/
|
|
10709
|
-
device?:
|
|
10752
|
+
device?: DeviceByName2 | (DeviceDescriptor2 & {
|
|
10753
|
+
[k: string]: unknown;
|
|
10754
|
+
});
|
|
10710
10755
|
/**
|
|
10711
10756
|
* Escape-hatch passthrough: merged into the automation session's capabilities after the ones Doc Detective computes (namespaced per driver, e.g. `appium:noReset`). Driver- and version-specific; use sparingly.
|
|
10712
10757
|
*/
|
|
@@ -10719,17 +10764,21 @@ export interface StartSurface3 {
|
|
|
10719
10764
|
*/
|
|
10720
10765
|
timeout?: number;
|
|
10721
10766
|
}
|
|
10722
|
-
export interface
|
|
10767
|
+
export interface DeviceDescriptor2 {
|
|
10723
10768
|
/**
|
|
10724
|
-
* Target platform. Selects the mobile driver.
|
|
10769
|
+
* Target platform. Selects the mobile driver. Required in `startSurface.device`; implied by the context in `context.device`.
|
|
10725
10770
|
*/
|
|
10726
|
-
platform
|
|
10771
|
+
platform?: "android" | "ios";
|
|
10727
10772
|
/**
|
|
10728
|
-
*
|
|
10773
|
+
* Device name and registry identity — the same name resolves to the same device. Reference form: names an existing AVD (Android) / simulator (iOS) to reuse. If no device by this name exists, Doc Detective creates one under this name using `deviceType`/`osVersion` (or their defaults), provided the toolchain and a matching system image are installed (`doc-detective install android`).
|
|
10729
10774
|
*/
|
|
10730
10775
|
name?: string;
|
|
10731
10776
|
/**
|
|
10732
|
-
*
|
|
10777
|
+
* Abstract hardware profile used when creating a device (portable across `android`/`ios`). Doc Detective maps it to a built-in profile. Ignored when `name` already matches an existing device. Default: `phone`.
|
|
10778
|
+
*/
|
|
10779
|
+
deviceType?: "phone" | "tablet";
|
|
10780
|
+
/**
|
|
10781
|
+
* Platform version used when creating a device; must match an installed system image (install more with `doc-detective install android`). Ignored when `name` already matches an existing device. Default: the newest installed version.
|
|
10733
10782
|
*/
|
|
10734
10783
|
osVersion?: string;
|
|
10735
10784
|
/**
|
|
@@ -10740,10 +10789,6 @@ export interface DeviceDescriptor1 {
|
|
|
10740
10789
|
* Initial orientation. Reserved; validated now, not yet implemented.
|
|
10741
10790
|
*/
|
|
10742
10791
|
orientation?: "portrait" | "landscape";
|
|
10743
|
-
/**
|
|
10744
|
-
* Device kind. `emulator`/`simulator` (the default, inferred from `platform`) or `device` for real hardware. Reserved; validated now, not yet implemented.
|
|
10745
|
-
*/
|
|
10746
|
-
type?: "emulator" | "simulator" | "device";
|
|
10747
10792
|
/**
|
|
10748
10793
|
* Pin a specific device/emulator instance by UDID. Reserved; validated now, not yet implemented.
|
|
10749
10794
|
*/
|