@ihyeon/flow-qa 0.9.7 → 0.9.8
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/src/engine.js +6 -3
- package/dist/src/mobile-runtime.js +26 -0
- package/docs/mobile.md +1 -1
- package/docs/releases.md +8 -0
- package/package.json +2 -2
package/dist/src/engine.js
CHANGED
|
@@ -6,7 +6,7 @@ import path from 'node:path';
|
|
|
6
6
|
import { fileURLToPath } from 'node:url';
|
|
7
7
|
import { selectCases } from "./case-selection.js";
|
|
8
8
|
import { compileSuite } from "./compiler.js";
|
|
9
|
-
import { acquireMobileDevice, mobileReadiness } from "./mobile-runtime.js";
|
|
9
|
+
import { acquireMobileDevice, checkMobileApp, mobileReadiness } from "./mobile-runtime.js";
|
|
10
10
|
import { failureReport, normalizeReport1, renderMarkdown, stoppedReport } from "./report.js";
|
|
11
11
|
import { configSchema, suiteSchema } from "./schema.js";
|
|
12
12
|
import { reportTarget, targetKind } from "./targets.js";
|
|
@@ -227,9 +227,12 @@ export async function runSuite(options) {
|
|
|
227
227
|
else {
|
|
228
228
|
sdkDevice = readiness.sdkDevice;
|
|
229
229
|
releaseMobileDevice = acquireMobileDevice(selectedTarget.platform, readiness.deviceId);
|
|
230
|
+
if (!releaseMobileDevice)
|
|
231
|
+
blockAll(executionSuite, 'Selected mobile device is in use.');
|
|
232
|
+
if (!options.signal?.aborted && await (options.checkMobileApp ?? checkMobileApp)(selectedTarget, readiness.sdkDevice) === 'missing') {
|
|
233
|
+
blockAll(executionSuite, `Selected app ${selectedTarget.bundleId} is not installed on the selected ${selectedTarget.platform === 'ios' ? 'simulator' : 'emulator'}. Install it on that device and retry.`);
|
|
234
|
+
}
|
|
230
235
|
}
|
|
231
|
-
if (!releaseMobileDevice)
|
|
232
|
-
blockAll(executionSuite, 'Selected mobile device is in use.');
|
|
233
236
|
}
|
|
234
237
|
const executable = runnableSuite(executionSuite, blocked);
|
|
235
238
|
const testFile = path.join(runDir, TEST_FILE);
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { execFile } from 'node:child_process';
|
|
2
|
+
import { promisify } from 'node:util';
|
|
1
3
|
const INVENTORY_TIMEOUT_MS = 10_000;
|
|
2
4
|
const IOS_UDID = /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i;
|
|
3
5
|
const ANDROID_EMULATOR = /^emulator-\d+$/;
|
|
4
6
|
const activeDevices = new Set();
|
|
7
|
+
const execFileAsync = promisify(execFile);
|
|
5
8
|
// agent-device's --device name lookup is case-insensitive and treats _ as a space.
|
|
6
9
|
const normalizedName = (value) => value.replaceAll('_', ' ').replace(/\s+/g, ' ').trim().toLowerCase();
|
|
7
10
|
async function localDevices(platform) {
|
|
@@ -56,6 +59,29 @@ export async function mobileReadiness(target, listDevices = localDevices) {
|
|
|
56
59
|
}
|
|
57
60
|
return { ready: true, deviceId: selected.id, sdkDevice };
|
|
58
61
|
}
|
|
62
|
+
/** Check only virtual devices whose installed apps can be queried without launching the app. */
|
|
63
|
+
export const checkMobileApp = async (target, sdkDevice) => {
|
|
64
|
+
if (target.platform === 'ios' && IOS_UDID.test(sdkDevice)) {
|
|
65
|
+
try {
|
|
66
|
+
await execFileAsync('xcrun', ['simctl', 'get_app_container', sdkDevice, target.bundleId, 'app'], { timeout: 10_000, maxBuffer: 64 * 1024 });
|
|
67
|
+
return 'installed';
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
const result = error;
|
|
71
|
+
return result.code === 2 && /No such file or directory/i.test(result.stderr ?? '') ? 'missing' : 'unknown';
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
if (target.platform === 'android' && ANDROID_EMULATOR.test(sdkDevice)) {
|
|
75
|
+
try {
|
|
76
|
+
const { stdout } = await execFileAsync('adb', ['-s', sdkDevice, 'shell', 'pm', 'path', target.bundleId], { timeout: 10_000, maxBuffer: 64 * 1024 });
|
|
77
|
+
return stdout.split(/\r?\n/).some((line) => line.startsWith('package:')) ? 'installed' : stdout.trim() === '' ? 'missing' : 'unknown';
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
return 'unknown';
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return 'unknown';
|
|
84
|
+
};
|
|
59
85
|
/** Avoid simultaneous runs on the same device within this process. */
|
|
60
86
|
export function acquireMobileDevice(platform, deviceId) {
|
|
61
87
|
const key = JSON.stringify([platform, deviceId]);
|
package/docs/mobile.md
CHANGED
|
@@ -34,7 +34,7 @@ Saving a target only writes configuration. It does not contact a model, boot a d
|
|
|
34
34
|
|
|
35
35
|
For an iOS simulator, prepare Xcode, an installed simulator runtime, a booted simulator, and a simulator build of the app installed on it. For Android, prepare the Android SDK and a booted emulator or an authorized connected device with the app installed. Physical iOS devices additionally need pairing, Developer Mode, and signing of the upstream automation runner. Follow the [mobile engine's setup instructions](https://e2e.tester.army/docs/mobile#physical-devices) for device-specific requirements.
|
|
36
36
|
|
|
37
|
-
Flow QA does not download SDKs, create or boot simulators, or install application builds. A missing or unavailable selected device blocks the run; a saved target is not evidence of a working device or app. For physical device IDs that the underlying engine resolves by name, the device name must be unique after case and whitespace normalization; ambiguous selection blocks the run. Chromium is only required for web targets.
|
|
37
|
+
Flow QA does not download SDKs, create or boot simulators, or install application builds. A missing or unavailable selected device blocks the run; a saved target is not evidence of a working device or app. Before a run on a booted iOS simulator or Android emulator, Flow QA also checks whether the configured app ID is installed. A confirmed missing app blocks the run with no test attempts and tells you to install it on that device. If the local app query cannot establish installation, the native engine still runs and its result remains visible; physical devices retain this engine-level check. For physical device IDs that the underlying engine resolves by name, the device name must be unique after case and whitespace normalization; ambiguous selection blocks the run. Chromium is only required for web targets.
|
|
38
38
|
|
|
39
39
|
## Native steps
|
|
40
40
|
|
package/docs/releases.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Releases and verification
|
|
2
2
|
|
|
3
|
+
## 0.9.8 — block a native run when the selected simulator lacks the app
|
|
4
|
+
|
|
5
|
+
Before launching a test on a booted iOS simulator or Android emulator, Flow QA checks whether the registered app ID is installed. A confirmed missing app now produces a blocked report with zero attempts and an installation instruction. It no longer appears as an engine error after a failed launch. When the local query cannot confirm installation, the native engine still decides the result; physical device behavior is unchanged. No app is installed by this check.
|
|
6
|
+
|
|
7
|
+
The direct `agent-device` dependency matches the version used by `@e2e-dev/mobile` (0.21.35). Previously, the first native run replaced the 0.21.22 readiness daemon with 0.21.35 and the next run could be blocked by a version conflict. A regression check keeps the two declared versions aligned.
|
|
8
|
+
|
|
9
|
+
On 2026-11-18, an iOS 18.6 simulator launched its installed Settings app and passed the Korean title assertion twice in the same local daemon state. A missing bundle returned a blocked report with no native process or test attempt. The fresh tarball consumer repeated the blocked and passing cases. The local 135-test check, package check, and package smoke passed. Android, physical devices, and a published npm version were not tested in this local verification.
|
|
10
|
+
|
|
3
11
|
## 0.9.7 — reopen archived reports and compare repeated web runs
|
|
4
12
|
|
|
5
13
|
The CLI and local UI render archived normalized reports in both English and Korean. A passing run saved by an older release now reads consistently in either language. The original Markdown snapshot stays available on disk.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ihyeon/flow-qa",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Hyeonse Im",
|
|
6
6
|
"repository": {
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@e2e-dev/mobile": "0.12.5",
|
|
67
67
|
"@e2e-dev/web": "0.11.1",
|
|
68
68
|
"@hyeonse/design-system": "https://codeload.github.com/hyeonse-swing/hyeonse-design-system/tar.gz/38978c6a86f422fc0e63e919f600bc2dd3451e5c",
|
|
69
|
-
"agent-device": "0.21.
|
|
69
|
+
"agent-device": "0.21.35",
|
|
70
70
|
"ai": "7.0.107",
|
|
71
71
|
"e2e": "0.22.0",
|
|
72
72
|
"playwright": "1.63.0",
|