@delacour/warden-e2e 0.10.0 → 0.11.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.
@@ -9174,6 +9174,6 @@ function onlyWasSeen() {
9174
9174
 
9175
9175
  // ../../packages/e2e/src/version.ts
9176
9176
  var WORKSPACE_VERSION = "0.0.0-workspace";
9177
- var WARDEN_E2E_VERSION2 = "0.10.0";
9177
+ var WARDEN_E2E_VERSION2 = "0.11.0";
9178
9178
 
9179
9179
  export { E2eError2, registerA11yTarget, a11yTargetOf, canActOnElements, noteSpanDetail, addSpanDetail, canObserve, canDetectAlerts, settleDetailOf, DEFAULT_SETTLE_QUIET_MS, DEFAULT_SETTLE_TIMEOUT_MS, settleByHash, snapshotHash, ok, err, swipeVector, screenRect, fieldValue, PINCH_MS, ROTATE_MS, PATH_MS, centreOf, pinchRadius, rotateRadius, requireGesture, assertScale, assertDegrees, isInteractiveRole, resolveRole, normalizeText, matchesText, indexSnapshot, testIdQuery, textQuery, roleQuery, selectorExpression, renderSnapshot, renderHeader, resolve, locateByTestIdViaReact, isLocator, Locator, pickOne, textOf, scrollUntilVisible, bunExec, execError, driverError, driverErr, logEventSchema, fatalEventSchema, responseSchema, mapWireError, createLineSplitter, encodeRequest, bunSpawn, stdioTransport, socketTransport, createSimdClient, spawnSimd, connectSimd, isRecoverableLoss, CAMERA_FACINGS, CONDITION_AREAS, resolveNetwork, resolveTextSize, androidFontScale, ENV_NAMES, DEFAULT_ASSERTION_TIMEOUT_MS, readEnv, runStep, setDefaultHidRecovery, setDefaultNativeLog, setDefaultDriverFactory, hasDefaultDriverFactory, setDefaultFixtureFactory, hasDefaultFixtureFactory, attemptSession, getSession, accessibleName, announce, failing, formatIssues, toE2eError, settled, unwrap, parseUiadA11yEvents, parseInjectEvents, withA11yRead, renderA11yScreen, createDeviceA11y, IOS_DEVICE_CAPABILITIES, sniffCameraMedia, cameraFeedDir, clearCameraFeeds, isLeaseAlive, processAlive, describeOwner, isPhysicalIosId, wardenHome, defaultDbPath, ownerKey, openStore, callerFile, formatCoord, DEFAULT_SPEED_MPS, DEFAULT_INTERVAL_S, realTickerClock, startRouteTicker, startFlap, registerConditions, conditionsOf, conditionSinkFor, createDeviceConditions, parseBudgets, createDevicePerf, perfStartFor, spawnWarden, hash6, attemptDir, screenshotPath, specIdOf, realNativeLogDeps, captureNativeLog, BUN_TIMEOUT_MARGIN_MS2, ownHook, currentScope, createScope, runInScope, hooksFor, resolveUse, registrationDefaults, markOnly, onlyWasSeen, WORKSPACE_VERSION, WARDEN_E2E_VERSION2 };
package/index.mjs CHANGED
@@ -41,7 +41,7 @@ import {
41
41
  registrationDefaults,
42
42
  markOnly,
43
43
  WARDEN_E2E_VERSION2
44
- } from "./chunk-p7618aj5.mjs";
44
+ } from "./chunk-ggcjzrvh.mjs";
45
45
  // ../../packages/e2e/src/expect/expect.ts
46
46
  import { expect as bunExpect } from "bun:test";
47
47
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@delacour/warden-e2e",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "TypeScript e2e testing for React Native and Expo on iOS simulators and Android emulators, run by `warden e2e`: test, expect, screen, device, app",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -41,7 +41,7 @@
41
41
  "LICENSE"
42
42
  ],
43
43
  "peerDependencies": {
44
- "@delacour/warden": "0.10.0"
44
+ "@delacour/warden": "0.11.0"
45
45
  },
46
46
  "dependencies": {
47
47
  "zod": "^4.4.3"
package/preload.mjs CHANGED
@@ -109,7 +109,7 @@ import {
109
109
  onlyWasSeen,
110
110
  WORKSPACE_VERSION,
111
111
  WARDEN_E2E_VERSION2
112
- } from "./chunk-p7618aj5.mjs";
112
+ } from "./chunk-ggcjzrvh.mjs";
113
113
 
114
114
  // ../../packages/e2e/src/preload.ts
115
115
  import { afterAll, setDefaultTimeout } from "bun:test";
@@ -8432,6 +8432,7 @@ function createIosDriver(swap, simctl, opts) {
8432
8432
  const nativeSettle = ready.ax.default === "axbridge" && ready.ax.bridge === "available";
8433
8433
  const bridgeUp = ready.ax.bridge === "available";
8434
8434
  let settleUnsupported = !nativeSettle;
8435
+ let settleAxFailures = 0;
8435
8436
  let rebindUnsupported = false;
8436
8437
  let gestureUnsupported = false;
8437
8438
  let appOpsOutdated = false;
@@ -8622,10 +8623,20 @@ function createIosDriver(swap, simctl, opts) {
8622
8623
  noteRebind(reply.data);
8623
8624
  return reply.data.bound;
8624
8625
  }
8626
+ function noteSettleAxFailure(message) {
8627
+ settleAxFailures += 1;
8628
+ noteSpanDetail("nativeError", "E_AX_UNAVAILABLE");
8629
+ if (settleAxFailures >= 2) {
8630
+ settleUnsupported = true;
8631
+ opts.log?.(`[ios] native settle could not bind the AX observer twice in a row, polling snapshot hashes: ${message}`);
8632
+ }
8633
+ return;
8634
+ }
8625
8635
  async function settleViaHelper(quietMs, timeoutMs) {
8626
8636
  const expected = launchedBundle;
8627
8637
  const native = await request("settle", { quietMs, settleTimeoutMs: timeoutMs, ...expected === undefined ? {} : { bundleId: expected } }, { timeoutMs: timeoutMs + SETTLE_MARGIN_MS });
8628
8638
  if (native.success) {
8639
+ settleAxFailures = 0;
8629
8640
  if (expected !== undefined && native.data.reason !== "frontmost_mismatch")
8630
8641
  launchedBundle = undefined;
8631
8642
  return { success: true, data: nativeDetail(native.data) };
@@ -8637,6 +8648,8 @@ function createIosDriver(swap, simctl, opts) {
8637
8648
  data: { quiet: false, waitedMs: timeoutMs + SETTLE_MARGIN_MS, reason: "helper_timeout" }
8638
8649
  };
8639
8650
  }
8651
+ if (native.error.code === "E_AX_UNAVAILABLE")
8652
+ return noteSettleAxFailure(native.error.message);
8640
8653
  if (native.error.code !== "E_UNSUPPORTED")
8641
8654
  return native;
8642
8655
  settleUnsupported = true;