@allwright.dev/vitest 0.0.48 → 0.0.50
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/index.js +6 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { launchConfiguredBrowser, mobile, resolveConfig, setServerAddr, shutdown, } from "@allwright.dev/core";
|
|
2
2
|
import { expect as vitestExpect, test as base } from "vitest";
|
|
3
|
+
const DEFAULT_ANDROID_CONNECT_TIMEOUT_MS = 30_000;
|
|
4
|
+
const DEFAULT_ANDROID_LAUNCH_TIMEOUT_MS = 60_000;
|
|
3
5
|
export const test = base.extend({
|
|
4
6
|
allwright: async ({}, use) => {
|
|
5
7
|
await use({});
|
|
@@ -72,7 +74,8 @@ function resolveAndroidConnectOptions(config, options) {
|
|
|
72
74
|
device: options.android?.connectOptions?.device ?? config.mobile.android?.device,
|
|
73
75
|
adbEndpoint: options.android?.connectOptions?.adbEndpoint,
|
|
74
76
|
preserveAppState: options.android?.connectOptions?.preserveAppState ?? false,
|
|
75
|
-
timeoutMs: options.android?.connectOptions?.timeoutMs
|
|
77
|
+
timeoutMs: options.android?.connectOptions?.timeoutMs ??
|
|
78
|
+
DEFAULT_ANDROID_CONNECT_TIMEOUT_MS,
|
|
76
79
|
};
|
|
77
80
|
}
|
|
78
81
|
function resolveAndroidLaunchOptions(config, options) {
|
|
@@ -81,7 +84,8 @@ function resolveAndroidLaunchOptions(config, options) {
|
|
|
81
84
|
appId: options.android?.launchOptions?.appId ?? config.mobile.android?.appId,
|
|
82
85
|
launchActivity: options.android?.launchOptions?.launchActivity ?? config.mobile.android?.appActivity,
|
|
83
86
|
stopBeforeLaunch: options.android?.launchOptions?.stopBeforeLaunch ?? false,
|
|
84
|
-
timeoutMs: options.android?.launchOptions?.timeoutMs
|
|
87
|
+
timeoutMs: options.android?.launchOptions?.timeoutMs ??
|
|
88
|
+
DEFAULT_ANDROID_LAUNCH_TIMEOUT_MS,
|
|
85
89
|
};
|
|
86
90
|
if (!launchOptions.apkPath && !launchOptions.appId) {
|
|
87
91
|
throw new Error("androidPage fixture requires android launch options with `apkPath` or `appId`, or config.mobile.android.app configured");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allwright.dev/vitest",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.50",
|
|
4
4
|
"description": "Vitest fixtures for the allwright TypeScript client.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"prepublishOnly": "bun run build"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@allwright.dev/core": "0.0.
|
|
42
|
+
"@allwright.dev/core": "0.0.50"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"typescript": "^5.9.2",
|