detox 20.47.0 → 20.48.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.
Files changed (39) hide show
  1. package/Detox-android/com/wix/detox/{20.47.0/detox-20.47.0-sources.jar → 20.48.0/detox-20.48.0-sources.jar} +0 -0
  2. package/Detox-android/com/wix/detox/20.48.0/detox-20.48.0-sources.jar.md5 +1 -0
  3. package/Detox-android/com/wix/detox/20.48.0/detox-20.48.0-sources.jar.sha1 +1 -0
  4. package/Detox-android/com/wix/detox/20.48.0/detox-20.48.0-sources.jar.sha256 +1 -0
  5. package/Detox-android/com/wix/detox/20.48.0/detox-20.48.0-sources.jar.sha512 +1 -0
  6. package/Detox-android/com/wix/detox/{20.47.0/detox-20.47.0.pom → 20.48.0/detox-20.48.0.pom} +1 -1
  7. package/Detox-android/com/wix/detox/20.48.0/detox-20.48.0.pom.md5 +1 -0
  8. package/Detox-android/com/wix/detox/20.48.0/detox-20.48.0.pom.sha1 +1 -0
  9. package/Detox-android/com/wix/detox/20.48.0/detox-20.48.0.pom.sha256 +1 -0
  10. package/Detox-android/com/wix/detox/20.48.0/detox-20.48.0.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 +5 -4
  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.0/detox-20.48.0.aar} +0 -0
  36. /package/Detox-android/com/wix/detox/{20.47.0/detox-20.47.0.aar.md5 → 20.48.0/detox-20.48.0.aar.md5} +0 -0
  37. /package/Detox-android/com/wix/detox/{20.47.0/detox-20.47.0.aar.sha1 → 20.48.0/detox-20.48.0.aar.sha1} +0 -0
  38. /package/Detox-android/com/wix/detox/{20.47.0/detox-20.47.0.aar.sha256 → 20.48.0/detox-20.48.0.aar.sha256} +0 -0
  39. /package/Detox-android/com/wix/detox/{20.47.0/detox-20.47.0.aar.sha512 → 20.48.0/detox-20.48.0.aar.sha512} +0 -0
@@ -0,0 +1 @@
1
+ 453f9ff5b43da5e112d2c31305f49e63
@@ -0,0 +1 @@
1
+ 3ff1b4d0ee5efbad222ab1976840acbccbc24439
@@ -0,0 +1 @@
1
+ 56790193e3592a55bebac837bd3ea245e1891fa959e0226061b66392336ffb61
@@ -0,0 +1 @@
1
+ b01cb627e7cfab0dcb08d7d3c3018ae022976dd09444e6539e8bf3792e928745420fc1193c88b9ed49eb275ed0f0b0e5ee88ad30b25faa88ca6459c255048347
@@ -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.0</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
+ 2a9ae34fa5bda20823e89d9483c27928
@@ -0,0 +1 @@
1
+ 8404808a8d56d28e2bb8891ab2cb84b1d9bb6b26
@@ -0,0 +1 @@
1
+ 3036fa8df787b9549a5c0910e59dc74337521490115139d83c7362209e5dcc49
@@ -0,0 +1 @@
1
+ dd23369dac22b5fd0a5fd1bdcd6d14ffc2b23c62eff9c854a6032da53f63ee863f4b7aa608687ad9e68dd58b17d2c64bf913dd35940b8bd0dc1ea9e48a28700a
@@ -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.0</latest>
7
+ <release>20.48.0</release>
8
8
  <versions>
9
- <version>20.47.0</version>
9
+ <version>20.48.0</version>
10
10
  </versions>
11
- <lastUpdated>20260126091115</lastUpdated>
11
+ <lastUpdated>20260321080202</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- c960a54df8b950d614c9c4d96a7d4c77
1
+ 18ac819c7a79fe400418a86ea8afbbd6
@@ -1 +1 @@
1
- 28758e138cb7fed15377c58d979d49755a9475d7
1
+ c3b219bf184e6f5de69a9bf81e98d99369597170
@@ -1 +1 @@
1
- 3427ee3268354b80962e298697e781cb6ef4cbcb315e10f8df061e1554c18e58
1
+ 587e83fe78034c762a02b1c9cb4fb3821856fa51530ab2832fce1ad444dd38ea
@@ -1 +1 @@
1
- d1bae5c6265c48655efa323ab2bb79680c92b92c7cf85566b2ddce257bd530fb4192ab4eb3c46dbf7c36cef778dc983cf6e977b7cc6a85b4e83d5991deb318d0
1
+ 319a34388c77ecadd520219d0fc1894d01902eb22f7f3e2d62625444e0f307ada6b677646a03bf1b7306084f26bf3aba16708a8c049b5c03b3b42d3477af24c0
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.0",
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;
@@ -243,9 +243,9 @@ class AppleSimUtils {
243
243
  }
244
244
  }
245
245
 
246
- async launch(udid, bundleId, launchArgs, languageAndLocale) {
246
+ async launch(udid, bundleId, launchArgs, languageAndLocale, arch) {
247
247
  const frameworkPath = await environment.getFrameworkPath();
248
- const result = await this._launchMagically(frameworkPath, udid, bundleId, launchArgs, languageAndLocale);
248
+ const result = await this._launchMagically(frameworkPath, udid, bundleId, launchArgs, languageAndLocale, arch);
249
249
  await this._printLoggingHint(udid, bundleId);
250
250
 
251
251
  return this._parseLaunchId(result);
@@ -505,15 +505,16 @@ class AppleSimUtils {
505
505
  return _.map(args, (v, k) => [`-${k}`, `${v}`]);
506
506
  }
507
507
 
508
- async _launchMagically(frameworkPath, udid, bundleId, launchArgs, languageAndLocale) {
508
+ async _launchMagically(frameworkPath, udid, bundleId, launchArgs, languageAndLocale, arch) {
509
509
  let dylibs = `${frameworkPath}/Detox`;
510
510
  if (process.env.SIMCTL_CHILD_DYLD_INSERT_LIBRARIES) {
511
511
  dylibs = `${process.env.SIMCTL_CHILD_DYLD_INSERT_LIBRARIES}:${dylibs}`;
512
512
  }
513
513
 
514
+ const archArgs = arch ? `--arch=${arch} ` : '';
514
515
  const cmdArgs = quote(_.flatten(this._mergeLaunchArgs(launchArgs, languageAndLocale)));
515
516
  let launchBin = `SIMCTL_CHILD_GULGeneratedClassDisposeDisabled=YES SIMCTL_CHILD_DYLD_INSERT_LIBRARIES="${dylibs}" ` +
516
- `/usr/bin/xcrun simctl launch ${udid} ${bundleId} --args ${cmdArgs}`;
517
+ `/usr/bin/xcrun simctl launch ${archArgs}${udid} ${bundleId} --args ${cmdArgs}`;
517
518
 
518
519
  const result = await childProcess.execWithRetriesAndLogs(launchBin, {
519
520
  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