@sun-asterisk/sungen 3.2.24-beta.5 → 3.2.24
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/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/audit.js +9 -1
- package/dist/cli/commands/audit.js.map +1 -1
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/biometric-action.hbs +9 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/check-action.hbs +11 -6
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/deep-link-action.hbs +8 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/location-services-action.hbs +11 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/reinstall-app-action.hbs +21 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/restart-app-action.hbs +16 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/set-connectivity-action.hbs +11 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/uncheck-action.hbs +9 -5
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/checked-assertion.hbs +10 -4
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/device-log-assertion.hbs +16 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/disappears-within-assertion.hbs +5 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/not-checked-assertion.hbs +6 -4
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/state-with-filter-assertion.hbs +4 -3
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/still-visible-after-assertion.hbs +4 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/gestures/pull-to-refresh-action.hbs +3 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/gestures/swipe-action.hbs +3 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/partials/appium-selector.hbs +7 -1
- package/dist/generators/test-generator/adapters/appium/templates/test-file.hbs +129 -15
- package/dist/generators/test-generator/template-engine.d.ts.map +1 -1
- package/dist/generators/test-generator/template-engine.js +3 -0
- package/dist/generators/test-generator/template-engine.js.map +1 -1
- package/dist/generators/test-generator/utils/selector-resolver.d.ts.map +1 -1
- package/dist/generators/test-generator/utils/selector-resolver.js +4 -0
- package/dist/generators/test-generator/utils/selector-resolver.js.map +1 -1
- package/dist/harness/audit.d.ts.map +1 -1
- package/dist/harness/audit.js +38 -2
- package/dist/harness/audit.js.map +1 -1
- package/dist/harness/capability-plan.d.ts.map +1 -1
- package/dist/harness/capability-plan.js +6 -1
- package/dist/harness/capability-plan.js.map +1 -1
- package/dist/harness/parse.d.ts +1 -0
- package/dist/harness/parse.d.ts.map +1 -1
- package/dist/harness/parse.js +1 -0
- package/dist/harness/parse.js.map +1 -1
- package/dist/harness/script-check.d.ts.map +1 -1
- package/dist/harness/script-check.js +6 -2
- package/dist/harness/script-check.js.map +1 -1
- package/dist/harness/sensors.d.ts +31 -0
- package/dist/harness/sensors.d.ts.map +1 -1
- package/dist/harness/sensors.js +79 -1
- package/dist/harness/sensors.js.map +1 -1
- package/dist/harness/viewpoint-ledger.d.ts +21 -0
- package/dist/harness/viewpoint-ledger.d.ts.map +1 -1
- package/dist/harness/viewpoint-ledger.js +57 -5
- package/dist/harness/viewpoint-ledger.js.map +1 -1
- package/dist/orchestrator/mobile-runtime-scaffolder.d.ts.map +1 -1
- package/dist/orchestrator/mobile-runtime-scaffolder.js +5 -1
- package/dist/orchestrator/mobile-runtime-scaffolder.js.map +1 -1
- package/dist/orchestrator/templates/ai-src/commands/create-test.md +23 -0
- package/dist/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md +10 -4
- package/dist/orchestrator/templates/ai-src/skills/sungen-mobile-gestures/SKILL.md +23 -0
- package/dist/orchestrator/templates/env.appium.example +11 -0
- package/dist/orchestrator/templates/specs-db.d.ts.map +1 -1
- package/dist/orchestrator/templates/specs-db.js +79 -6
- package/dist/orchestrator/templates/specs-db.js.map +1 -1
- package/dist/orchestrator/templates/specs-db.ts +70 -7
- package/dist/orchestrator/templates/wdio.conf.ts +100 -3
- package/dist/utils/selector-types.d.ts +1 -1
- package/dist/utils/selector-types.d.ts.map +1 -1
- package/dist/utils/selector-types.js +1 -0
- package/dist/utils/selector-types.js.map +1 -1
- package/package.json +3 -3
- package/src/cli/commands/audit.ts +9 -1
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/biometric-action.hbs +9 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/check-action.hbs +11 -6
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/deep-link-action.hbs +8 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/location-services-action.hbs +11 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/reinstall-app-action.hbs +21 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/restart-app-action.hbs +16 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/set-connectivity-action.hbs +11 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/uncheck-action.hbs +9 -5
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/checked-assertion.hbs +10 -4
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/device-log-assertion.hbs +16 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/disappears-within-assertion.hbs +5 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/not-checked-assertion.hbs +6 -4
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/state-with-filter-assertion.hbs +4 -3
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/still-visible-after-assertion.hbs +4 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/gestures/pull-to-refresh-action.hbs +3 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/gestures/swipe-action.hbs +3 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/partials/appium-selector.hbs +7 -1
- package/src/generators/test-generator/adapters/appium/templates/test-file.hbs +129 -15
- package/src/generators/test-generator/template-engine.ts +4 -0
- package/src/generators/test-generator/utils/selector-resolver.ts +4 -0
- package/src/harness/audit.ts +39 -2
- package/src/harness/capability-plan.ts +3 -1
- package/src/harness/parse.ts +2 -0
- package/src/harness/script-check.ts +6 -2
- package/src/harness/sensors.ts +73 -1
- package/src/harness/viewpoint-ledger.ts +68 -5
- package/src/orchestrator/mobile-runtime-scaffolder.ts +5 -1
- package/src/orchestrator/templates/ai-src/commands/create-test.md +23 -0
- package/src/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md +10 -4
- package/src/orchestrator/templates/ai-src/skills/sungen-mobile-gestures/SKILL.md +23 -0
- package/src/orchestrator/templates/env.appium.example +11 -0
- package/src/orchestrator/templates/specs-db.ts +70 -7
- package/src/orchestrator/templates/wdio.conf.ts +100 -3
- package/src/utils/selector-types.ts +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/audit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA6HpC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/audit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA6HpC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA+D3D"}
|
|
@@ -195,9 +195,17 @@ function registerAuditCommand(program) {
|
|
|
195
195
|
// The baseline is only ever written HERE, never by the measurement itself:
|
|
196
196
|
// a first sighting has nothing to compare against, and any later change is
|
|
197
197
|
// a human decision (`--accept-viewpoint`) — see harness/viewpoint-baseline.ts.
|
|
198
|
+
//
|
|
199
|
+
// …with one exception that used to be silent. Auto-accepting a `new` viewpoint is only
|
|
200
|
+
// safe when the yardstick came FIRST. When a suite already exists, the first sighting is
|
|
201
|
+
// the yardstick being introduced against those tests — possibly derived from them — and
|
|
202
|
+
// blessing it automatically is what let a viewpoint drafted after generation score
|
|
203
|
+
// atomicLedger + traceability at 100% on its very first audit (#622). That case needs the
|
|
204
|
+
// same human decision as a change.
|
|
198
205
|
const unitId = (0, audit_1.catalogIdFromScreenDir)(dir);
|
|
199
206
|
const vb = report.viewpointBaseline;
|
|
200
|
-
|
|
207
|
+
const postHoc = vb.status === 'new' && report.scenarioCount > 0;
|
|
208
|
+
if ((vb.status === 'new' && !postHoc) || (options.acceptViewpoint && (vb.status === 'changed' || postHoc))) {
|
|
201
209
|
(0, viewpoint_baseline_1.acceptViewpointBaseline)(process.cwd(), unitId, { hash: vb.hash, ids: vb.ids });
|
|
202
210
|
if (options.acceptViewpoint && !options.json) {
|
|
203
211
|
console.log(`\n ✓ test-viewpoint.md accepted as the baseline for ${name} (${vb.ids.length} viewpoint id(s)).`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../../src/cli/commands/audit.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6HA,oDAuDC;AAnLD,2CAA6B;AAC7B,uCAAyB;AACzB,+CAAoF;AACpF,yDAAsD;AACtD,yEAA2E;AAC3E,kDAA8C;AAG9C,SAAS,GAAG,CAAC,KAAa,EAAE,KAAK,GAAG,EAAE;IACpC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC;IACpC,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;AAC/C,CAAC;AAED,SAAS,MAAM,CAAC,CAAc;IAC5B,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC;IACtB,CAAC,CAAC,EAAE,CAAC,CAAC;IACN,CAAC,CAAC,sBAAsB,CAAC,CAAC,MAAM,KAAK,C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AAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;YAC/C,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,MAAM,CAAC,CAAC;gBACf,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;gBAClE,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YAClB,CAAC;YACD,oFAAoF;YACpF,2FAA2F;YAC3F,8FAA8F;YAC9F,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,UAAU,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1D,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YACxE,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACvB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/dist/generators/test-generator/adapters/appium/templates/steps/actions/biometric-action.hbs
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Simulated biometric input — EMULATOR/SIMULATOR only (a real device needs a real finger; the
|
|
2
|
+
// command is rejected there and the step fails loud). Android: `mobile: fingerprint` — finger 1
|
|
3
|
+
// must be ENROLLED on the emulator (Settings → Security); an unenrolled id gives the no-match
|
|
4
|
+
// path. iOS Simulator: `mobile: sendBiometricMatch` (Features → Touch/Face ID enrolled).
|
|
5
|
+
if (driver.isIOS) {
|
|
6
|
+
await driver.execute('mobile: sendBiometricMatch', { type: '{{#if faceId}}faceId{{else}}touchId{{/if}}', match: {{#if match}}true{{else}}false{{/if}} });
|
|
7
|
+
} else {
|
|
8
|
+
await driver.execute('mobile: fingerprint', { fingerprintId: {{#if match}}1{{else}}9{{/if}} });
|
|
9
|
+
}
|
package/dist/generators/test-generator/adapters/appium/templates/steps/actions/check-action.hbs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{{!-- WebdriverIO/Appium has no .check(). Ensure the toggle ends up ON: read the current state and
|
|
2
2
|
tap only if it's not already on, so the step is idempotent (re-running a passing test, or
|
|
3
3
|
running under `noReset` with unknown persisted state, won't flip it back off). State is read
|
|
4
|
-
the same way the checked/unchecked assertions read it —
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
the same way the checked/unchecked assertions read it — through the __assertCheckedState
|
|
5
|
+
oracle's __probeCheckedSignals (test-file preamble), which weighs `checked`/`value`, `selected`
|
|
6
|
+
and isSelected() on the node and its descendants, because no single one of them is reliable on
|
|
7
|
+
a custom-rendered control. The tap itself uses
|
|
7
8
|
the trailing-edge coordinate method (not a centre .click()): on a full-width composite row the
|
|
8
9
|
a11y node merges the label with the switch, so a centre tap lands on the label and doesn't
|
|
9
10
|
flip the control. --}}
|
|
@@ -12,9 +13,13 @@ await (async () => {
|
|
|
12
13
|
// Fail loud with the REAL cause when the element never resolved — getElementRect(undefined)
|
|
13
14
|
// otherwise throws a cryptic `Malformed type for "elementId"` that masks the not-found (#430).
|
|
14
15
|
if (!__cb.elementId) throw new Error((__cb as any).error?.message || `Element not found: ${__cb.selector}`);
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
// Read the CURRENT state through the same oracle the checked assertions use. The old read here
|
|
17
|
+
// was `getAttribute('checked') === 'true'` with an isSelected() fallback in a `catch` — but on
|
|
18
|
+
// Android that read never throws (UiAutomator2 defaults `checked` to "false" on every node), so
|
|
19
|
+
// the fallback never fired and a custom-rendered toggle already ON read as OFF. This step then
|
|
20
|
+
// tapped it and turned it OFF — the idempotence guard silently inverted.
|
|
21
|
+
const __signals = await __probeCheckedSignals(__cb);
|
|
22
|
+
const __on = __signals.some(s => s.value);
|
|
18
23
|
if (__on) return;
|
|
19
24
|
|
|
20
25
|
const r = await driver.getElementRect(__cb.elementId);
|
package/dist/generators/test-generator/adapters/appium/templates/steps/actions/deep-link-action.hbs
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Open a deep link into the app — VIEW intent on Android, XCUITest deepLink on iOS (Simulator).
|
|
2
|
+
// THE entry point for push-param / universal-link routing scenarios.
|
|
3
|
+
await (async () => {
|
|
4
|
+
{{#if dataRef}}const __url = String(testData.get('{{dataRef}}'));{{else}}const __url = '{{escapeQuotes url}}';{{/if}}
|
|
5
|
+
const __pkg = __resolveAppId();
|
|
6
|
+
await driver.execute('mobile: deepLink', driver.isIOS ? { url: __url, bundleId: __pkg } : { url: __url, package: __pkg });
|
|
7
|
+
await driver.pause(1500); // let the routed screen mount before the next step asserts on it
|
|
8
|
+
})();
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Android-only: XCUITest cannot toggle Location Services — fail loud, never silently skip.
|
|
2
|
+
if (driver.isIOS) {
|
|
3
|
+
throw new Error('turn device location {{#if on}}on{{else}}off{{/if}}: iOS/XCUITest cannot toggle Location Services — run this scenario on Android or tag it @platform:android');
|
|
4
|
+
}
|
|
5
|
+
// `mobile: toggleGps` flips blindly, so read `mobile: isGpsEnabled` first and only toggle when the
|
|
6
|
+
// state differs (idempotent). NOTE: the execute-method aliases, not the legacy JSONWP wrappers —
|
|
7
|
+
// WDIO v9 removed driver.isLocationServicesEnabled()/toggleLocationServices().
|
|
8
|
+
await (async () => {
|
|
9
|
+
const __locOn = await driver.execute('mobile: isGpsEnabled');
|
|
10
|
+
if (__locOn !== {{#if on}}true{{else}}false{{/if}}) { await driver.execute('mobile: toggleGps'); }
|
|
11
|
+
})();
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Reinstall the app: remove → install from the session's build file → launch → settle.
|
|
2
|
+
// Persistence oracles (dismissals, pins) hinge on what survives a reinstall.
|
|
3
|
+
await (async () => {
|
|
4
|
+
const __pkg = __resolveAppId();
|
|
5
|
+
const __caps = (driver.requestedCapabilities || {}) as Record<string, string>;
|
|
6
|
+
const __appPath = __caps['appium:app'] || __caps['app'];
|
|
7
|
+
if (!__appPath) {
|
|
8
|
+
throw new Error('reinstall the app: the session must install from a build file — set APP_APK (Android) / IOS_APP (iOS) so the appium:app capability is present.');
|
|
9
|
+
}
|
|
10
|
+
try { await driver.removeApp(__pkg); } catch { /* not installed */ }
|
|
11
|
+
await driver.installApp(__appPath);
|
|
12
|
+
await driver.activateApp(__pkg);
|
|
13
|
+
let __prevHad = false;
|
|
14
|
+
await driver
|
|
15
|
+
.waitUntil(async () => {
|
|
16
|
+
const src = await driver.getPageSource();
|
|
17
|
+
const has = /content-desc="[^"]+"|\btext="[^"]+"/.test(src);
|
|
18
|
+
const ok = has && __prevHad; __prevHad = has; return ok;
|
|
19
|
+
}, { timeout: 45000, interval: 400 })
|
|
20
|
+
.catch(() => { /* best-effort — first launch after install can be the slowest */ });
|
|
21
|
+
})();
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Restart the app: kill → relaunch → wait for rendered content (same settle oracle as the
|
|
2
|
+
// per-scenario relaunch hook — a cold start first paints a contentless skeleton).
|
|
3
|
+
await (async () => {
|
|
4
|
+
const __pkg = __resolveAppId();
|
|
5
|
+
try { await driver.terminateApp(__pkg); } catch { /* not running */ }
|
|
6
|
+
await driver.pause(500);
|
|
7
|
+
await driver.activateApp(__pkg);
|
|
8
|
+
let __prevHad = false;
|
|
9
|
+
await driver
|
|
10
|
+
.waitUntil(async () => {
|
|
11
|
+
const src = await driver.getPageSource();
|
|
12
|
+
const has = /content-desc="[^"]+"|\btext="[^"]+"/.test(src);
|
|
13
|
+
const ok = has && __prevHad; __prevHad = has; return ok;
|
|
14
|
+
}, { timeout: 30000, interval: 400 })
|
|
15
|
+
.catch(() => { /* best-effort — the next step has its own wait */ });
|
|
16
|
+
})();
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Android-only: XCUITest exposes no connectivity control — fail loud, never silently skip.
|
|
2
|
+
if (driver.isIOS) {
|
|
3
|
+
throw new Error('turn {{kind}} {{#if on}}on{{else}}off{{/if}}: iOS/XCUITest cannot toggle device connectivity — run this scenario on Android or tag it @platform:android');
|
|
4
|
+
}
|
|
5
|
+
{{#if isAirplane}}
|
|
6
|
+
// Airplane {{#if on}}ON kills wifi+data{{else}}OFF restores wifi+data{{/if}} — set all three explicitly.
|
|
7
|
+
await driver.execute('mobile: setConnectivity', { wifi: {{#if on}}false{{else}}true{{/if}}, data: {{#if on}}false{{else}}true{{/if}}, airplaneMode: {{#if on}}true{{else}}false{{/if}} });
|
|
8
|
+
{{else}}
|
|
9
|
+
await driver.execute('mobile: setConnectivity', { {{kindKey}}: {{#if on}}true{{else}}false{{/if}} });
|
|
10
|
+
{{/if}}
|
|
11
|
+
await driver.pause(1500); // let the radio state settle before the next step acts on the UI
|
package/dist/generators/test-generator/adapters/appium/templates/steps/actions/uncheck-action.hbs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{{!-- WebdriverIO/Appium has no .uncheck(). Ensure the toggle ends up OFF: tap only if currently on,
|
|
2
2
|
so the step is idempotent under repeat runs / persisted `noReset` state. State read + tap
|
|
3
|
-
method mirror check-action.hbs (see there for why):
|
|
4
|
-
|
|
3
|
+
method mirror check-action.hbs (see there for why): state via __probeCheckedSignals (the
|
|
4
|
+
multi-signal oracle), then a trailing-edge coordinate tap rather
|
|
5
5
|
than a centre .click() (a centre tap on a full-width composite row hits the label, not the
|
|
6
6
|
switch). --}}
|
|
7
7
|
await (async () => {
|
|
@@ -9,9 +9,13 @@ await (async () => {
|
|
|
9
9
|
// Fail loud with the REAL cause when the element never resolved — getElementRect(undefined)
|
|
10
10
|
// otherwise throws a cryptic `Malformed type for "elementId"` that masks the not-found (#430).
|
|
11
11
|
if (!__cb.elementId) throw new Error((__cb as any).error?.message || `Element not found: ${__cb.selector}`);
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
// Read the CURRENT state through the same oracle the checked assertions use. The old read here
|
|
13
|
+
// was `getAttribute('checked') === 'true'` with an isSelected() fallback in a `catch` — but on
|
|
14
|
+
// Android that read never throws (UiAutomator2 defaults `checked` to "false" on every node), so
|
|
15
|
+
// the fallback never fired and a custom-rendered toggle already ON read as OFF. This step then
|
|
16
|
+
// tapped it and turned it ON — the idempotence guard silently inverted.
|
|
17
|
+
const __signals = await __probeCheckedSignals(__cb);
|
|
18
|
+
const __on = __signals.some(s => s.value);
|
|
15
19
|
if (!__on) return;
|
|
16
20
|
|
|
17
21
|
const r = await driver.getElementRect(__cb.elementId);
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
{{!-- Checkbox/toggle state via the __assertCheckedState oracle (test-file preamble), NOT a bare
|
|
2
|
+
toHaveAttribute. A single `checked`(Android)/`value`(iOS) read cannot be trusted on its own:
|
|
3
|
+
UiAutomator2 defaults `checked` to "false" on EVERY node, so a custom-rendered control that
|
|
4
|
+
publishes no checked semantics (Flutter without Semantics(checked:), RN without
|
|
5
|
+
accessibilityState) reports a confident false while sitting visibly ON. The oracle probes
|
|
6
|
+
`checked`/`value`, `selected` and isSelected() on the node AND on its descendants (on a
|
|
7
|
+
composite row the state routinely sits on an inner node), and passes on ANY positive signal.
|
|
8
|
+
`selected` alone is no substitute either — toBeSelected() is always false for a Flutter
|
|
9
|
+
Switch, which is why this template stopped using it. --}}
|
|
10
|
+
await __assertCheckedState(await ({{> locator}}), true, '{{escapeQuotes selectorRef}}');
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{{!-- Device-log oracle (Android: logcat · iOS: syslog) — makes SILENT failure modes and analytics
|
|
2
|
+
events observable. getLogs returns entries SINCE THE LAST CALL (incremental buffer), so
|
|
3
|
+
poll-accumulate up to 10s before failing loud with the log type in the message. --}}
|
|
4
|
+
await (async () => {
|
|
5
|
+
{{#if dataRef}}const __needle = String(testData.get('{{dataRef}}'));{{else}}const __needle = '{{escapeQuotes value}}';{{/if}}
|
|
6
|
+
const __type = driver.isIOS ? 'syslog' : 'logcat';
|
|
7
|
+
let __buf = '';
|
|
8
|
+
const __t0 = Date.now();
|
|
9
|
+
while (Date.now() - __t0 < 10000) {
|
|
10
|
+
const __entries = (await driver.getLogs(__type)) as Array<{ message?: string } | string>;
|
|
11
|
+
__buf += __entries.map((e) => (typeof e === 'string' ? e : (e && e.message) || '')).join('\n') + '\n';
|
|
12
|
+
if (__buf.includes(__needle)) return;
|
|
13
|
+
await driver.pause(500);
|
|
14
|
+
}
|
|
15
|
+
throw new Error(`device log (${__type}) did not contain ${JSON.stringify(__needle)} within 10s`);
|
|
16
|
+
})();
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{{!-- The element must vanish within the window (auto-dismiss / expiry oracle). Plain $() on
|
|
2
|
+
purpose — never __ensureVisible: scroll-hunting for something that should disappear would
|
|
3
|
+
drag the screen away. A 2s grace absorbs accessibility-tree churn latency without hiding a
|
|
4
|
+
genuinely stuck element. --}}
|
|
5
|
+
await $({{> appium-selector-expr}}).waitForDisplayed({ reverse: true, timeout: {{seconds}} * 1000 + 2000, timeoutMsg: '{{selectorRef}} still visible after the {{seconds}}s disappear window' });
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
{{!-- The unchecked twin of checked-assertion — same __assertCheckedState oracle, expected=false.
|
|
2
|
+
Deliberately NOT symmetric with the checked direction: "unchecked" requires that NO probed
|
|
3
|
+
signal anywhere (node or descendant, `checked`/`value`/`selected`/isSelected()) reads
|
|
4
|
+
positive, so a visibly-ON custom-rendered control cannot slip through as a false PASS the way
|
|
5
|
+
a single Android `checked="false"` read would let it. --}}
|
|
6
|
+
await __assertCheckedState(await ({{> locator}}), false, '{{escapeQuotes selectorRef}}');
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{{!-- State-with-filter (mobile): $$ over the base selector, per-OS text read (hand-rolled — no
|
|
2
2
|
CSS filter() combinator on Appium) matched against dataValue, then assert the state on the
|
|
3
|
-
match. checked/selected
|
|
3
|
+
match. checked/selected go through the __assertCheckedState oracle (mirrors checked-assertion) —
|
|
4
|
+
a single `checked`/`value` read is unreliable on a custom-rendered control;
|
|
4
5
|
empty is a text read; enabled/focused use direct WDIO matchers. A state with no
|
|
5
6
|
native-mobile analog (sorted*, aria-busy loading) fails loud, matching sorted-assertion's
|
|
6
7
|
house style. --}}
|
|
@@ -13,8 +14,8 @@
|
|
|
13
14
|
if (String(__s.find(s => s && String(s).trim() !== '') ?? '').trim() === __expected) { __el = __c; break; }
|
|
14
15
|
}
|
|
15
16
|
if (!__el) throw new Error(`[sungen] No match with text "${__expected}" to assert state on`);
|
|
16
|
-
{{#if (or selectedProbe (eq stateAssertion "toBeChecked()"))}}await
|
|
17
|
-
{{else if (eq stateAssertion "toBeChecked({ checked: false })")}}await
|
|
17
|
+
{{#if (or selectedProbe (eq stateAssertion "toBeChecked()"))}}await __assertCheckedState(__el, true, `item with "${__expected}"`);
|
|
18
|
+
{{else if (eq stateAssertion "toBeChecked({ checked: false })")}}await __assertCheckedState(__el, false, `item with "${__expected}"`);
|
|
18
19
|
{{else if (eq stateAssertion "toBeEnabled()")}}await expect(__el).toBeEnabled();
|
|
19
20
|
{{else if (eq stateAssertion "toBeFocused()")}}await expect(__el).toBeFocused();
|
|
20
21
|
{{else if (eq stateAssertion "toBeEmpty()")}}await expect(__el).toHaveText('');
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
{{!-- The element must SURVIVE the window (e.g. a barcode valid for 60s, a banner that must not
|
|
2
|
+
auto-dismiss). Wait out the window first, then run the platform-aware visibility oracle. --}}
|
|
3
|
+
await driver.pause({{seconds}} * 1000);
|
|
4
|
+
await __assertVisible({{> appium-selector-expr}});
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
await (async () => { const e = await {{> locator}};
|
|
2
|
+
// Fail loud on a missing target — an undefined elementId otherwise surfaces as the opaque
|
|
3
|
+
// server error "The swipe area coordinates must be provided if element is not set".
|
|
4
|
+
if (!e.elementId) { throw new Error('pull-to-refresh target not found: ' + {{> appium-selector-expr}}); }
|
|
2
5
|
// Pull-to-refresh = drag the content down. Platform-native swipe per OS.
|
|
3
6
|
if (driver.isIOS) { await driver.execute('mobile: swipe', { elementId: e.elementId, direction: 'down' }); }
|
|
4
7
|
else { await driver.execute('mobile: swipeGesture', { elementId: e.elementId, direction: 'down', percent: 0.9, speed: 5000 }); }
|
package/dist/generators/test-generator/adapters/appium/templates/steps/gestures/swipe-action.hbs
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
await (async () => { const e = await {{> locator}};
|
|
2
|
+
// Fail loud on a missing target — an undefined elementId otherwise surfaces as the opaque
|
|
3
|
+
// server error "The swipe area coordinates must be provided if element is not set".
|
|
4
|
+
if (!e.elementId) { throw new Error('swipe target not found: ' + {{> appium-selector-expr}}); }
|
|
2
5
|
// Platform-native swipe: XCUITest `mobile: swipe` (direction only) vs UiAutomator2 `mobile: swipeGesture`.
|
|
3
6
|
if (driver.isIOS) { await driver.execute('mobile: swipe', { elementId: e.elementId, direction: '{{direction}}' }); }
|
|
4
7
|
else { await driver.execute('mobile: swipeGesture', { elementId: e.elementId, direction: '{{direction}}', percent: 0.75 }); }
|
package/dist/generators/test-generator/adapters/appium/templates/steps/partials/appium-selector.hbs
CHANGED
|
@@ -8,7 +8,13 @@
|
|
|
8
8
|
{{~#case 'xpath'}}{{escapeQuotes value}}{{/case~}}
|
|
9
9
|
{{~#case 'android-uiautomator'}}android={{escapeQuotes value}}{{/case~}}
|
|
10
10
|
{{~#case 'ios-predicate'}}-ios predicate string:{{escapeQuotes value}}{{/case~}}
|
|
11
|
-
{{
|
|
11
|
+
{{~!--
|
|
12
|
+
'id' — Appium's id strategy prepends `<appPackage>:id/` to any value WITHOUT a colon, so a bare
|
|
13
|
+
Compose testTagsAsResourceId value ("bottom_bar") silently never matches. Bare values therefore
|
|
14
|
+
compile to an exact UiSelector.resourceId match (Android); package-qualified classic View ids
|
|
15
|
+
("com.foo:id/btn") keep the plain id strategy, which passes them through unchanged.
|
|
16
|
+
--~}}
|
|
17
|
+
{{~#case 'id'}}{{#if (includes value ':')}}id={{escapeQuotes value}}{{else}}android=new UiSelector().resourceId("{{escapeQuotes value}}"){{/if}}{{/case~}}
|
|
12
18
|
{{~#case 'locator'}}{{escapeQuotes value}}{{/case~}}
|
|
13
19
|
{{~#case 'css'}}{{escapeQuotes value}}{{/case~}}
|
|
14
20
|
{{~#default}}~{{escapeQuotes value}}{{/default~}}
|
|
@@ -72,20 +72,38 @@ async function __ensureVisible(selector: string): Promise<WebdriverIO.Element> {
|
|
|
72
72
|
}
|
|
73
73
|
const safeBottom = Math.round(winH * 0.82); // above the floating bottom-nav band
|
|
74
74
|
let lastY: number | null = null;
|
|
75
|
+
let lastEl: WebdriverIO.Element | null = null;
|
|
75
76
|
for (let __i = 0; __i < 12; __i++) {
|
|
76
77
|
let y: number | null = null;
|
|
78
|
+
let existsUndisplayed = false;
|
|
77
79
|
try {
|
|
78
80
|
const el = await $(selector);
|
|
79
81
|
if (await el.isDisplayed()) {
|
|
80
82
|
const r = await driver.getElementRect(el.elementId);
|
|
81
|
-
|
|
83
|
+
// Done when the element sits fully above the floating bottom-nav band — OR is simply too
|
|
84
|
+
// tall to ever fit there (a scroll container / full-screen list): demanding "fully above"
|
|
85
|
+
// from such an element makes the loop scroll a page that was already correct, dragging
|
|
86
|
+
// list-hosted siblings (e.g. the top bar as first list item) out of the viewport.
|
|
87
|
+
if (r.y + r.height <= safeBottom || r.height >= safeBottom) return el;
|
|
82
88
|
y = r.y;
|
|
89
|
+
lastEl = el;
|
|
90
|
+
} else if (el.elementId) {
|
|
91
|
+
existsUndisplayed = true; // in the tree, just not visible right now
|
|
83
92
|
}
|
|
84
93
|
} catch { /* off-screen / not in tree yet → keep scrolling */ }
|
|
94
|
+
// Overlay grace (Android mirror of the iOS render grace above): the element is IN the tree but
|
|
95
|
+
// reports not-displayed — typically a launch popup/overlay covering it that auto-dismisses
|
|
96
|
+
// within seconds. Scrolling now would carry a list-hosted element (a Compose top bar is often
|
|
97
|
+
// the first list item) clean out of the viewport, where a down-only loop can never recover it —
|
|
98
|
+
// so wait the overlay out before the first scroll.
|
|
99
|
+
if (existsUndisplayed && __i < 4) { await driver.pause(1200); continue; }
|
|
85
100
|
// No-progress break: the element is on screen but a prior scroll didn't move it — it's a FIXED
|
|
86
101
|
// element (e.g. a bottom-nav tab, intentionally in the nav band) or we've hit the end of the
|
|
87
102
|
// scrollable. Stop rather than burn the whole budget; the caller acts on it where it is.
|
|
88
|
-
|
|
103
|
+
// Return the RESOLVED element, never a fresh $() stub: on an animation-churned tree (a looping
|
|
104
|
+
// banner is enough) a from-scratch re-find takes seconds and outlasts the caller's assertion
|
|
105
|
+
// budget — the element we just measured is the one the caller should act on.
|
|
106
|
+
if (y !== null && lastY !== null && Math.abs(y - lastY) < 2) return lastEl ?? $(selector);
|
|
89
107
|
lastY = y;
|
|
90
108
|
await driver.execute('mobile: scrollGesture', { left: 60, top: 420, width: 960, height: 1320, direction: 'down', percent: 0.5 });
|
|
91
109
|
await driver.pause(300);
|
|
@@ -116,6 +134,74 @@ async function __assertVisible(selector: string): Promise<void> {
|
|
|
116
134
|
}
|
|
117
135
|
throw new Error(`Expect ${JSON.stringify(selector)} to be displayed — iOS geometry oracle: rect=${JSON.stringify(r)} is not on screen (0x0 = not rendered / scrolled out)`);
|
|
118
136
|
}
|
|
137
|
+
|
|
138
|
+
// Checkbox / toggle / radio state oracle. There is NO single authoritative source for it on
|
|
139
|
+
// mobile, and the standard one lies in a way that cannot be detected from the read itself:
|
|
140
|
+
// UiAutomator2 puts `checked` on EVERY Android node and defaults it to "false" when the widget
|
|
141
|
+
// publishes no checked semantics. So a custom-rendered control — a Flutter widget without
|
|
142
|
+
// `Semantics(checked: …)`, an RN `Pressable` without `accessibilityState={ checked: … }` — is not
|
|
143
|
+
// ABSENT from the tree, it reports a confident false while sitting visibly ON, and a strict
|
|
144
|
+
// `toHaveAttribute('checked','true')` fails with no way to see why.
|
|
145
|
+
// Hence: probe every signal both runtimes expose, and let the DIRECTION of the assertion decide
|
|
146
|
+
// how to combine them (__assertCheckedState below).
|
|
147
|
+
// Android: `checked`, `selected`, isSelected() iOS: `value` ("1"/"0"), `selected`, isSelected()
|
|
148
|
+
// Descendants are probed too, bounded: on a composite row (label + control merged into one a11y
|
|
149
|
+
// node) the state routinely sits on an inner node while the queried outer node reports the default.
|
|
150
|
+
// A child xpath must start with `.//` — a leading `//` is ABSOLUTE in Appium even when chained.
|
|
151
|
+
async function __probeCheckedSignals(el: WebdriverIO.Element): Promise<{ source: string; value: boolean }[]> {
|
|
152
|
+
const out: { source: string; value: boolean }[] = [];
|
|
153
|
+
const read = async (node: WebdriverIO.Element, prefix: string): Promise<void> => {
|
|
154
|
+
for (const attr of driver.isIOS ? ['value', 'selected'] : ['checked', 'selected']) {
|
|
155
|
+
let raw: string | null = null;
|
|
156
|
+
try { raw = await node.getAttribute(attr); } catch { continue; } // attribute unsupported on this node
|
|
157
|
+
const v = String(raw ?? '').trim().toLowerCase();
|
|
158
|
+
if (v === 'true' || v === '1') out.push({ source: `${prefix}${attr}="${raw}"`, value: true });
|
|
159
|
+
else if (v === 'false' || v === '0') out.push({ source: `${prefix}${attr}="${raw}"`, value: false });
|
|
160
|
+
// anything else (empty, a real iOS `value` string like "Off") carries no parseable state → skip
|
|
161
|
+
}
|
|
162
|
+
try { out.push({ source: `${prefix}isSelected()`, value: await node.isSelected() }); } catch { /* not supported here */ }
|
|
163
|
+
};
|
|
164
|
+
await read(el, '');
|
|
165
|
+
// Only descend when the node itself yielded nothing positive — otherwise we already have the
|
|
166
|
+
// answer and a subtree walk would turn one assertion into dozens of round-trips for nothing.
|
|
167
|
+
if (!out.some(s => s.value)) {
|
|
168
|
+
let kids: WebdriverIO.Element[] = [];
|
|
169
|
+
try { kids = await el.$$('.//*'); } catch { /* no child query on this node */ }
|
|
170
|
+
for (const k of kids.slice(0, 8)) await read(k, 'descendant.');
|
|
171
|
+
}
|
|
172
|
+
return out;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// Assert checked/unchecked from the probed signals. The two directions are deliberately NOT
|
|
176
|
+
// symmetric, because the evidence isn't:
|
|
177
|
+
// checked → ANY credible positive signal passes. One runtime exposing the state is enough;
|
|
178
|
+
// demanding the standard attribute is what breaks custom-rendered controls.
|
|
179
|
+
// unchecked → NO signal anywhere may be positive. Strictly stronger than reading one attribute,
|
|
180
|
+
// so a visibly-ON custom toggle can't slip through as a false PASS.
|
|
181
|
+
// Polls like WDIO's own matchers do — a tap-then-assert reads the tree mid-animation.
|
|
182
|
+
// KNOWN LIMIT, stated rather than hidden: on Android a UiAutomator2-defaulted `checked="false"` is
|
|
183
|
+
// indistinguishable from a genuine false — that information is not in the tree. So `unchecked`
|
|
184
|
+
// passes on "no positive signal anywhere", which is the strongest available evidence, not proof.
|
|
185
|
+
async function __assertCheckedState(el: WebdriverIO.Element, expected: boolean, label: string): Promise<void> {
|
|
186
|
+
// Fail loud with the REAL cause when the element never resolved (mirrors check-action, #430).
|
|
187
|
+
if (!el.elementId) throw new Error((el as any).error?.message || `Element not found: ${el.selector}`);
|
|
188
|
+
let signals: { source: string; value: boolean }[] = [];
|
|
189
|
+
for (let __i = 0; __i < 10; __i++) {
|
|
190
|
+
signals = await __probeCheckedSignals(el);
|
|
191
|
+
if (signals.some(s => s.value) === expected) return;
|
|
192
|
+
await driver.pause(500);
|
|
193
|
+
}
|
|
194
|
+
const want = expected ? 'checked' : 'unchecked';
|
|
195
|
+
if (signals.length === 0) {
|
|
196
|
+
throw new Error(
|
|
197
|
+
`Expect ${label} to be ${want} — the control publishes NO checked/selected state, on itself or any child. ` +
|
|
198
|
+
`A custom-rendered control has to publish it for any tool to read it: Flutter → wrap it in Semantics(checked: …); ` +
|
|
199
|
+
`React Native → accessibilityState={ checked: … }. Until then assert a visible consequence instead ` +
|
|
200
|
+
`(a label/text change), or tag the scenario @manual.`,
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
throw new Error(`Expect ${label} to be ${want} — read [${signals.map(s => `${s.source} → ${s.value}`).join(', ')}]`);
|
|
204
|
+
}
|
|
119
205
|
{{#if singleAuthRole}}
|
|
120
206
|
import * as fs from 'node:fs';
|
|
121
207
|
import * as path from 'node:path';
|
|
@@ -133,7 +219,9 @@ function __authSelector(s: { type: string; value: string }): string {
|
|
|
133
219
|
case 'accessibility-id': case 'testid': case 'label': case 'placeholder': case 'text': return '~' + s.value;
|
|
134
220
|
case 'android-uiautomator': return 'android=' + s.value;
|
|
135
221
|
case 'ios-predicate': return '-ios predicate string:' + s.value;
|
|
136
|
-
|
|
222
|
+
// Appium's id strategy prepends `<appPackage>:id/` to colon-less values, which breaks bare
|
|
223
|
+
// Compose testTagsAsResourceId ids — match those exactly via UiSelector on Android instead.
|
|
224
|
+
case 'id': return (!driver.isIOS && !s.value.includes(':')) ? 'android=new UiSelector().resourceId("' + s.value + '")' : 'id=' + s.value;
|
|
137
225
|
case 'xpath': case 'locator': default: return s.value;
|
|
138
226
|
}
|
|
139
227
|
}
|
|
@@ -205,10 +293,29 @@ async function __ensureAuth(role: string): Promise<void> {
|
|
|
205
293
|
}
|
|
206
294
|
|
|
207
295
|
// ── Mode B: legacy authedMarker (present on the landing screen ⟺ logged in) ──
|
|
208
|
-
|
|
209
|
-
|
|
296
|
+
// markerTimeoutMs: contract override for slow-booting apps — a cold start that needs 10-15s+ to
|
|
297
|
+
// render the landing screen false-negatives the 6s default into "logged out" and then blocks the
|
|
298
|
+
// spec when the login form never appears.
|
|
299
|
+
const __budget = cfg.markerTimeoutMs || 6000;
|
|
300
|
+
// When the contract also names a loggedOutMarker (an element unique to the login screen), the
|
|
301
|
+
// state is decided by WHICHEVER marker renders first (alternating short probes): a slow-booting
|
|
302
|
+
// landing screen costs only its real boot time instead of gambling on one fixed timeout, and a
|
|
303
|
+
// genuine logged-out state is detected without waiting out the full authed budget first.
|
|
304
|
+
if (cfg.loggedOutMarker) {
|
|
305
|
+
let loggedOut = false;
|
|
306
|
+
const __t0 = Date.now();
|
|
307
|
+
while (Date.now() - __t0 < __budget) {
|
|
308
|
+
if (await present(cfg.authedMarker, 3000)) return; // logged in — nothing to do
|
|
309
|
+
if (await present(cfg.loggedOutMarker, 3000)) { loggedOut = true; break; }
|
|
310
|
+
}
|
|
311
|
+
if (!loggedOut) {
|
|
312
|
+
throw new Error(`@auth:${role} could not decide the login state within ${__budget}ms — neither authedMarker nor loggedOutMarker rendered. Check the markers in ${rel}.`);
|
|
313
|
+
}
|
|
314
|
+
} else if (await present(cfg.authedMarker, __budget)) {
|
|
315
|
+
return; // idempotent — already authenticated (session kept by noReset)
|
|
316
|
+
}
|
|
210
317
|
await runSteps(cfg.loginSteps);
|
|
211
|
-
if (!(await
|
|
318
|
+
if (!(await present(cfg.authedMarker, __budget))) {
|
|
212
319
|
throw new Error(`@auth:${role} login failed — verify credentials / loginSteps / authedMarker in ${rel}.`);
|
|
213
320
|
}
|
|
214
321
|
}
|
|
@@ -267,25 +374,32 @@ describe('{{featureName}}', () => {
|
|
|
267
374
|
// of cold-starting, which strands top-of-screen elements above the viewport.
|
|
268
375
|
await driver.pause(500);
|
|
269
376
|
await driver.activateApp(__APP_PKG__);
|
|
377
|
+
// Restore the NATIVE context — a prior scenario that entered a WebView (`switch to [X] frame`)
|
|
378
|
+
// without switching back would otherwise poison every following native find.
|
|
379
|
+
try { await driver.switchContext('NATIVE_APP'); } catch { /* single-context session */ }
|
|
270
380
|
// Restore portrait so a prior scenario's `rotate to landscape` can't leak into this one — the
|
|
271
381
|
// app relaunch above resets in-app state, but device orientation is OS-level and persists.
|
|
272
382
|
try { await driver.setOrientation('PORTRAIT'); } catch { /* orientation control not supported */ }
|
|
273
383
|
// Settle after a cold (re)launch: a Flutter app first renders a BLANK accessibility skeleton
|
|
274
384
|
// (nested FrameLayout/View, no content-desc) for several seconds before the real tree appears.
|
|
275
|
-
//
|
|
276
|
-
//
|
|
277
|
-
//
|
|
278
|
-
//
|
|
279
|
-
//
|
|
280
|
-
|
|
385
|
+
// So require rendered content — at least one non-empty content-desc/text — on two consecutive
|
|
386
|
+
// reads before proceeding. A generous timeout covers slow cold renders on a stressed emulator.
|
|
387
|
+
// Best-effort: a timeout never fails the scenario, it just falls through to the step's own
|
|
388
|
+
// auto-wait.
|
|
389
|
+
// "Settled" = rendered content present on TWO consecutive reads. Deliberately NOT full source
|
|
390
|
+
// equality: a UI with any looping animation (a rotating promo carousel is enough) never yields
|
|
391
|
+
// two identical snapshots, so an equality oracle starves and burns the whole timeout on every
|
|
392
|
+
// scenario. Two content-bearing reads still reject the blank first-frame skeleton (no
|
|
393
|
+
// content-desc/text at all) that a single read could false-positive on.
|
|
394
|
+
let __prevHadContent = false;
|
|
281
395
|
await driver
|
|
282
396
|
.waitUntil(
|
|
283
397
|
async () => {
|
|
284
398
|
const src = await driver.getPageSource();
|
|
285
399
|
const hasContent = /content-desc="[^"]+"|\btext="[^"]+"/.test(src);
|
|
286
|
-
const
|
|
287
|
-
|
|
288
|
-
return
|
|
400
|
+
const settled = hasContent && __prevHadContent;
|
|
401
|
+
__prevHadContent = hasContent;
|
|
402
|
+
return settled;
|
|
289
403
|
},
|
|
290
404
|
{ timeout: 30000, interval: 400, timeoutMsg: 'UI did not settle (no rendered content)' },
|
|
291
405
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-engine.d.ts","sourceRoot":"","sources":["../../../src/generators/test-generator/template-engine.ts"],"names":[],"mappings":"AAIA,qBAAa,cAAc;IACzB,OAAO,CAAC,SAAS,CAAsD;IACvE,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,iBAAiB,CAAS;IAClC,OAAO,CAAC,WAAW,CAA2B;IAC9C,uFAAuF;IACvF,OAAO,CAAC,iBAAiB,CAA2B;gBAExC,YAAY,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;KAClD,GAAG,MAAM;IAIV,eAAe,CAAC,IAAI,EAAE;QACpB,KAAK,EAAE,KAAK,CAAC;YAAE,OAAO,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KAClD,GAAG,MAAM;IAIV,eAAe,CAAC,IAAI,EAAE;QACpB,KAAK,EAAE,KAAK,CAAC;YAAE,OAAO,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KAClD,GAAG,MAAM;IAIV,cAAc,CAAC,IAAI,EAAE;QACnB,KAAK,EAAE,KAAK,CAAC;YAAE,OAAO,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KAClD,GAAG,MAAM;IAIV,cAAc,CAAC,IAAI,EAAE;QACnB,YAAY,EAAE,MAAM,CAAC;QACrB,KAAK,EAAE,KAAK,CAAC;YAAE,OAAO,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;QACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,GAAG,MAAM;CAGX"}
|
|
@@ -43,6 +43,9 @@ class TemplateEngine {
|
|
|
43
43
|
return '';
|
|
44
44
|
return String(text).replace(/[.*+?^${}()|[\]\\/]/g, '\\$&');
|
|
45
45
|
});
|
|
46
|
+
handlebars_1.default.registerHelper('includes', function (text, search) {
|
|
47
|
+
return typeof text === 'string' && text.includes(search);
|
|
48
|
+
});
|
|
46
49
|
// Comparison helpers for conditional logic
|
|
47
50
|
handlebars_1.default.registerHelper('eq', function (a, b) {
|
|
48
51
|
return a === b;
|