detox 20.47.0 → 20.48.1

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.
Files changed (39) hide show
  1. package/Detox-android/com/wix/detox/{20.47.0/detox-20.47.0-sources.jar → 20.48.1/detox-20.48.1-sources.jar} +0 -0
  2. package/Detox-android/com/wix/detox/20.48.1/detox-20.48.1-sources.jar.md5 +1 -0
  3. package/Detox-android/com/wix/detox/20.48.1/detox-20.48.1-sources.jar.sha1 +1 -0
  4. package/Detox-android/com/wix/detox/20.48.1/detox-20.48.1-sources.jar.sha256 +1 -0
  5. package/Detox-android/com/wix/detox/20.48.1/detox-20.48.1-sources.jar.sha512 +1 -0
  6. package/Detox-android/com/wix/detox/{20.47.0/detox-20.47.0.pom → 20.48.1/detox-20.48.1.pom} +1 -1
  7. package/Detox-android/com/wix/detox/20.48.1/detox-20.48.1.pom.md5 +1 -0
  8. package/Detox-android/com/wix/detox/20.48.1/detox-20.48.1.pom.sha1 +1 -0
  9. package/Detox-android/com/wix/detox/20.48.1/detox-20.48.1.pom.sha256 +1 -0
  10. package/Detox-android/com/wix/detox/20.48.1/detox-20.48.1.pom.sha512 +1 -0
  11. package/Detox-android/com/wix/detox/maven-metadata.xml +4 -4
  12. package/Detox-android/com/wix/detox/maven-metadata.xml.md5 +1 -1
  13. package/Detox-android/com/wix/detox/maven-metadata.xml.sha1 +1 -1
  14. package/Detox-android/com/wix/detox/maven-metadata.xml.sha256 +1 -1
  15. package/Detox-android/com/wix/detox/maven-metadata.xml.sha512 +1 -1
  16. package/Detox-ios-framework.tbz +0 -0
  17. package/Detox-ios-src.tbz +0 -0
  18. package/Detox-ios-xcuitest.tbz +0 -0
  19. package/detox.d.ts +1 -0
  20. package/package.json +1 -1
  21. package/src/configuration/composeAppsConfig.js +9 -0
  22. package/src/devices/common/drivers/ios/tools/AppleSimUtils.js +24 -6
  23. package/src/devices/runtime/RuntimeDevice.js +1 -1
  24. package/src/devices/runtime/drivers/DeviceDriverBase.js +6 -0
  25. package/src/devices/runtime/drivers/ios/SimulatorDriver.js +2 -3
  26. package/src/errors/DetoxConfigErrorComposer.js +16 -0
  27. package/Detox-android/com/wix/detox/20.47.0/detox-20.47.0-sources.jar.md5 +0 -1
  28. package/Detox-android/com/wix/detox/20.47.0/detox-20.47.0-sources.jar.sha1 +0 -1
  29. package/Detox-android/com/wix/detox/20.47.0/detox-20.47.0-sources.jar.sha256 +0 -1
  30. package/Detox-android/com/wix/detox/20.47.0/detox-20.47.0-sources.jar.sha512 +0 -1
  31. package/Detox-android/com/wix/detox/20.47.0/detox-20.47.0.pom.md5 +0 -1
  32. package/Detox-android/com/wix/detox/20.47.0/detox-20.47.0.pom.sha1 +0 -1
  33. package/Detox-android/com/wix/detox/20.47.0/detox-20.47.0.pom.sha256 +0 -1
  34. package/Detox-android/com/wix/detox/20.47.0/detox-20.47.0.pom.sha512 +0 -1
  35. /package/Detox-android/com/wix/detox/{20.47.0/detox-20.47.0.aar → 20.48.1/detox-20.48.1.aar} +0 -0
  36. /package/Detox-android/com/wix/detox/{20.47.0/detox-20.47.0.aar.md5 → 20.48.1/detox-20.48.1.aar.md5} +0 -0
  37. /package/Detox-android/com/wix/detox/{20.47.0/detox-20.47.0.aar.sha1 → 20.48.1/detox-20.48.1.aar.sha1} +0 -0
  38. /package/Detox-android/com/wix/detox/{20.47.0/detox-20.47.0.aar.sha256 → 20.48.1/detox-20.48.1.aar.sha256} +0 -0
  39. /package/Detox-android/com/wix/detox/{20.47.0/detox-20.47.0.aar.sha512 → 20.48.1/detox-20.48.1.aar.sha512} +0 -0
@@ -0,0 +1 @@
1
+ dd2e3339081f239c52fe55468f341f5e
@@ -0,0 +1 @@
1
+ 0bd8f4c5a66bbec62dd174787df45fd56bd14c88
@@ -0,0 +1 @@
1
+ 81cc0f6d07ff919548d20943fe114c31ce1980db2dcd08590788af93d1404696
@@ -0,0 +1 @@
1
+ 091b3c9f383b3f8221a7224494e15732ef23eb3a71fe6597af7d7602e34d36d501a63ff819ec4b67fa432f3fd599fc84c8833ec04f3c785a4b35f3e8bb2a809c
@@ -3,7 +3,7 @@
3
3
  <modelVersion>4.0.0</modelVersion>
4
4
  <groupId>com.wix</groupId>
5
5
  <artifactId>detox</artifactId>
6
- <version>20.47.0</version>
6
+ <version>20.48.1</version>
7
7
  <packaging>aar</packaging>
8
8
  <name>Detox</name>
9
9
  <description>Gray box end-to-end testing and automation library for mobile apps</description>
@@ -0,0 +1 @@
1
+ aada68bf0d07a8d5cf2cf7a650396102
@@ -0,0 +1 @@
1
+ 2277e1a17f96ce68a11ffe9483d3af69563983df
@@ -0,0 +1 @@
1
+ 8132f9f5fea98af5a133ea3b88d5f3aa2941450a6b62a10bc0e831eb9083dcae
@@ -0,0 +1 @@
1
+ 27943b9313fc1698c969bccff6fa5fb817b7722f48e4f4e333bf1f4b7c9699b137b3168c953e728eca01a99d568ec35a7cc0cf8c2dd67c68d0d98e65d4ac913d
@@ -3,11 +3,11 @@
3
3
  <groupId>com.wix</groupId>
4
4
  <artifactId>detox</artifactId>
5
5
  <versioning>
6
- <latest>20.47.0</latest>
7
- <release>20.47.0</release>
6
+ <latest>20.48.1</latest>
7
+ <release>20.48.1</release>
8
8
  <versions>
9
- <version>20.47.0</version>
9
+ <version>20.48.1</version>
10
10
  </versions>
11
- <lastUpdated>20260126091115</lastUpdated>
11
+ <lastUpdated>20260321141457</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- c960a54df8b950d614c9c4d96a7d4c77
1
+ 1d40ec0afb78a329fd0dd432378513e3
@@ -1 +1 @@
1
- 28758e138cb7fed15377c58d979d49755a9475d7
1
+ 81f96f640d2cca516e455907442a91b72c90b8e3
@@ -1 +1 @@
1
- 3427ee3268354b80962e298697e781cb6ef4cbcb315e10f8df061e1554c18e58
1
+ 83e331a924324238637d1f07f651373ef8e5254bd1a35ec83a1856f874cf39f0
@@ -1 +1 @@
1
- d1bae5c6265c48655efa323ab2bb79680c92b92c7cf85566b2ddce257bd530fb4192ab4eb3c46dbf7c36cef778dc983cf6e977b7cc6a85b4e83d5991deb318d0
1
+ 3f0feb69f5777a458aa402f88966308fb927b6788b7c2894c93240e9f75668e2ed02a5081d48643eadbe87d66c1bdd60494c8de3f618d3a04c9e98b7c60928f0
Binary file
package/Detox-ios-src.tbz CHANGED
Binary file
Binary file
package/detox.d.ts CHANGED
@@ -341,6 +341,7 @@ declare global {
341
341
  binaryPath: string;
342
342
  bundleId?: string;
343
343
  launchArgs?: Record<string, any>;
344
+ arch?: 'x86_64' | 'arm64';
344
345
  }
345
346
 
346
347
  interface DetoxAndroidAppConfig {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "detox",
3
3
  "description": "E2E tests and automation for mobile",
4
- "version": "20.47.0",
4
+ "version": "20.48.1",
5
5
  "bin": "local-cli/cli.js",
6
6
  "files": [
7
7
  "android",
@@ -148,6 +148,15 @@ function validateAppConfig({ appConfig, appPath, deviceConfig, errorComposer })
148
148
  if (appConfig.type !== 'android.apk' && appConfig.reversePorts) {
149
149
  throw errorComposer.unsupportedReversePorts(appPath);
150
150
  }
151
+
152
+ if (appConfig.arch !== undefined) {
153
+ if (!_.isString(appConfig.arch) || !['x86_64', 'arm64'].includes(appConfig.arch)) {
154
+ throw errorComposer.malformedAppArch(appPath);
155
+ }
156
+ if (appConfig.type !== 'ios.app') {
157
+ throw errorComposer.unsupportedAppArch(appPath);
158
+ }
159
+ }
151
160
  }
152
161
 
153
162
  module.exports = composeAppsConfig;
@@ -25,6 +25,10 @@ const SIMCTL_SET_PERMISSION_ACTIONS ={
25
25
  };
26
26
 
27
27
  class AppleSimUtils {
28
+ constructor() {
29
+ this._getMajorIOSVersion = _.memoize(this._getMajorIOSVersion.bind(this));
30
+ }
31
+
28
32
  async setPermissions(udid, bundleId, permissionsObj) {
29
33
  for (const [service, value] of Object.entries(permissionsObj)) {
30
34
  switch (service) {
@@ -243,9 +247,10 @@ class AppleSimUtils {
243
247
  }
244
248
  }
245
249
 
246
- async launch(udid, bundleId, launchArgs, languageAndLocale) {
250
+ async launch(udid, bundleId, launchArgs, languageAndLocale, arch) {
247
251
  const frameworkPath = await environment.getFrameworkPath();
248
- const result = await this._launchMagically(frameworkPath, udid, bundleId, launchArgs, languageAndLocale);
252
+ const effectiveArch = arch && (await this._isArchArgumentAccessible(udid)) ? arch : undefined;
253
+ const result = await this._launchMagically(frameworkPath, udid, bundleId, launchArgs, languageAndLocale, effectiveArch);
249
254
  await this._printLoggingHint(udid, bundleId);
250
255
 
251
256
  return this._parseLaunchId(result);
@@ -274,9 +279,21 @@ class AppleSimUtils {
274
279
  }
275
280
 
276
281
  async _isSpringBoardInaccessible(udid) {
282
+ return (await this._getMajorIOSVersion(udid)) >= 16;
283
+ }
284
+
285
+ async _isArchArgumentAccessible(udid) {
286
+ const majorIOSVersion = await this._getMajorIOSVersion(udid);
287
+ if (majorIOSVersion < 26) {
288
+ log.warn({}, `--arch is not supported on iOS ${majorIOSVersion} (requires iOS 26+)`);
289
+ return false;
290
+ }
291
+ return true;
292
+ }
293
+
294
+ async _getMajorIOSVersion(udid) {
277
295
  const device = await this._findDeviceByUDID(udid);
278
- const majorIOSVersion = parseInt(device.os.version.split('.')[0]);
279
- return majorIOSVersion >= 16;
296
+ return parseInt(_.get(device, 'os.version', '').split('.')[0]);
280
297
  }
281
298
 
282
299
  async _launchAndTerminateSettings(udid) {
@@ -505,15 +522,16 @@ class AppleSimUtils {
505
522
  return _.map(args, (v, k) => [`-${k}`, `${v}`]);
506
523
  }
507
524
 
508
- async _launchMagically(frameworkPath, udid, bundleId, launchArgs, languageAndLocale) {
525
+ async _launchMagically(frameworkPath, udid, bundleId, launchArgs, languageAndLocale, arch) {
509
526
  let dylibs = `${frameworkPath}/Detox`;
510
527
  if (process.env.SIMCTL_CHILD_DYLD_INSERT_LIBRARIES) {
511
528
  dylibs = `${process.env.SIMCTL_CHILD_DYLD_INSERT_LIBRARIES}:${dylibs}`;
512
529
  }
513
530
 
531
+ const archArgs = arch ? `--arch=${arch} ` : '';
514
532
  const cmdArgs = quote(_.flatten(this._mergeLaunchArgs(launchArgs, languageAndLocale)));
515
533
  let launchBin = `SIMCTL_CHILD_GULGeneratedClassDisposeDisabled=YES SIMCTL_CHILD_DYLD_INSERT_LIBRARIES="${dylibs}" ` +
516
- `/usr/bin/xcrun simctl launch ${udid} ${bundleId} --args ${cmdArgs}`;
534
+ `/usr/bin/xcrun simctl launch ${archArgs}${udid} ${bundleId} --args ${cmdArgs}`;
517
535
 
518
536
  const result = await childProcess.execWithRetriesAndLogs(launchBin, {
519
537
  retries: 1,
@@ -163,7 +163,7 @@ class RuntimeDevice {
163
163
  if (this._behaviorConfig.launchApp === 'manual') {
164
164
  this._processes[bundleId] = await this.deviceDriver.waitForAppLaunch(bundleId, this._prepareLaunchArgs(baseLaunchArgs), params.languageAndLocale);
165
165
  } else {
166
- this._processes[bundleId] = await this.deviceDriver.launchApp(bundleId, this._prepareLaunchArgs(baseLaunchArgs), params.languageAndLocale);
166
+ this._processes[bundleId] = await this.deviceDriver.launchApp(bundleId, this._prepareLaunchArgs(baseLaunchArgs), params.languageAndLocale, this._currentApp?.arch);
167
167
  await this.deviceDriver.waitUntilReady();
168
168
  await this.deviceDriver.waitForActive();
169
169
  }
@@ -39,6 +39,12 @@ class DeviceDriverBase {
39
39
  return {};
40
40
  }
41
41
 
42
+ // TODO: Drivers have no access to app config — RuntimeDevice decomposes it
43
+ // into positional args (binaryPath, bundleId, launchArgs, ...) and threads
44
+ // each property individually. Every new app-level property (e.g. `arch`)
45
+ // forces another parameter onto the driver API, leaking platform-specific
46
+ // concerns into a universal interface. Consider giving drivers access to
47
+ // the app config directly so this class doesn't become a growing arg list.
42
48
  async launchApp() {
43
49
  return NaN;
44
50
  }
@@ -3,7 +3,6 @@ const path = require('path');
3
3
 
4
4
  const _ = require('lodash');
5
5
 
6
-
7
6
  const temporaryPath = require('../../../../artifacts/utils/temporaryPath');
8
7
  const DetoxRuntimeError = require('../../../../errors/DetoxRuntimeError');
9
8
  const XCUITestRunner = require('../../../../ios/XCUITestRunner');
@@ -104,10 +103,10 @@ class SimulatorDriver extends IosDriver {
104
103
  await this._appStateResetFallback.resetAppState(udid, _bundleIds);
105
104
  }
106
105
 
107
- async launchApp(bundleId, launchArgs, languageAndLocale) {
106
+ async launchApp(bundleId, launchArgs, languageAndLocale, arch) {
108
107
  const { udid } = this;
109
108
  await this.emitter.emit('beforeLaunchApp', { bundleId, deviceId: udid, launchArgs });
110
- const pid = await this._applesimutils.launch(udid, bundleId, launchArgs, languageAndLocale);
109
+ const pid = await this._applesimutils.launch(udid, bundleId, launchArgs, languageAndLocale, arch);
111
110
  await this.emitter.emit('launchApp', { bundleId, deviceId: udid, launchArgs, pid });
112
111
 
113
112
  return pid;
@@ -530,6 +530,22 @@ Examine your Detox config${this._atPath()}`,
530
530
  });
531
531
  }
532
532
 
533
+ malformedAppArch(appPath) {
534
+ return new DetoxConfigError({
535
+ message: `Invalid value of "arch" property in the app config.\nExpected 'x86_64' or 'arm64':`,
536
+ debugInfo: this._focusOnAppConfig(appPath),
537
+ inspectOptions: { depth: 4 },
538
+ });
539
+ }
540
+
541
+ unsupportedAppArch(appPath) {
542
+ return new DetoxConfigError({
543
+ message: `"arch" property is only supported for ios.app configurations:`,
544
+ debugInfo: this._focusOnAppConfig(appPath),
545
+ inspectOptions: { depth: 4 },
546
+ });
547
+ }
548
+
533
549
  missingAppBinaryPath(appPath) {
534
550
  return new DetoxConfigError({
535
551
  message: `Missing "binaryPath" property in the app config.\nExpected a string:`,
@@ -1 +0,0 @@
1
- 4a2c6248931fa4d732a3c9e7c64df384
@@ -1 +0,0 @@
1
- d56bcb1dc1bd97142de6fa70f8f073c778f0a105
@@ -1 +0,0 @@
1
- 787620fb84a982918daf814c7df4b4d14f991b4ad4a01bcab4ecac0bba90a581
@@ -1 +0,0 @@
1
- a73180b8fda58367af996004e9ed7ef31c5c44417815c5598e8f6a4b0779935443fe5c15f8ad48b751d32a76e04e9ed432e0b59ec5eea22510f95a0e5165ad86
@@ -1 +0,0 @@
1
- 8897b4b97785bf50006a2d99b6a32cc2
@@ -1 +0,0 @@
1
- 7788182e126b5161ad10290029376ee6e6f9f150
@@ -1 +0,0 @@
1
- 8915215700fe10319c67d9fba1e679a29db386173ee1e03a73484e5b555f8390
@@ -1 +0,0 @@
1
- 25d700072c6fe91a83ddcb90b6926c277992b38bca5acadf90403ca069da061323d9ca6db5ace279df567bec48725cd2eed4ae3552954235eae2c805044cc141