detox 20.6.0 → 20.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. package/Detox-android/com/wix/detox/{20.6.0/detox-20.6.0-javadoc.jar → 20.7.1/detox-20.7.1-javadoc.jar} +0 -0
  2. package/Detox-android/com/wix/detox/20.7.1/detox-20.7.1-javadoc.jar.md5 +1 -0
  3. package/Detox-android/com/wix/detox/20.7.1/detox-20.7.1-javadoc.jar.sha1 +1 -0
  4. package/Detox-android/com/wix/detox/20.7.1/detox-20.7.1-javadoc.jar.sha256 +1 -0
  5. package/Detox-android/com/wix/detox/20.7.1/detox-20.7.1-javadoc.jar.sha512 +1 -0
  6. package/Detox-android/com/wix/detox/{20.6.0/detox-20.6.0-sources.jar → 20.7.1/detox-20.7.1-sources.jar} +0 -0
  7. package/Detox-android/com/wix/detox/20.7.1/detox-20.7.1-sources.jar.md5 +1 -0
  8. package/Detox-android/com/wix/detox/20.7.1/detox-20.7.1-sources.jar.sha1 +1 -0
  9. package/Detox-android/com/wix/detox/20.7.1/detox-20.7.1-sources.jar.sha256 +1 -0
  10. package/Detox-android/com/wix/detox/20.7.1/detox-20.7.1-sources.jar.sha512 +1 -0
  11. package/Detox-android/com/wix/detox/{20.6.0/detox-20.6.0.pom → 20.7.1/detox-20.7.1.pom} +1 -1
  12. package/Detox-android/com/wix/detox/20.7.1/detox-20.7.1.pom.md5 +1 -0
  13. package/Detox-android/com/wix/detox/20.7.1/detox-20.7.1.pom.sha1 +1 -0
  14. package/Detox-android/com/wix/detox/20.7.1/detox-20.7.1.pom.sha256 +1 -0
  15. package/Detox-android/com/wix/detox/20.7.1/detox-20.7.1.pom.sha512 +1 -0
  16. package/Detox-android/com/wix/detox/maven-metadata.xml +4 -4
  17. package/Detox-android/com/wix/detox/maven-metadata.xml.md5 +1 -1
  18. package/Detox-android/com/wix/detox/maven-metadata.xml.sha1 +1 -1
  19. package/Detox-android/com/wix/detox/maven-metadata.xml.sha256 +1 -1
  20. package/Detox-android/com/wix/detox/maven-metadata.xml.sha512 +1 -1
  21. package/Detox-ios-src.tbz +0 -0
  22. package/Detox-ios.tbz +0 -0
  23. package/package.json +8 -8
  24. package/runners/jest/testEnvironment/listeners/SpecReporter.js +1 -1
  25. package/runners/jest/testEnvironment/listeners/WorkerAssignReporter.js +1 -1
  26. package/src/DetoxWorker.js +6 -1
  27. package/src/devices/allocation/DeviceAllocator.js +13 -1
  28. package/src/devices/allocation/drivers/AllocationDriverBase.js +6 -0
  29. package/src/devices/allocation/drivers/android/attached/AttachedAndroidAllocDriver.js +10 -1
  30. package/src/devices/allocation/drivers/android/emulator/EmulatorAllocDriver.js +27 -29
  31. package/src/devices/allocation/drivers/android/genycloud/GenyAllocDriver.js +27 -19
  32. package/src/devices/allocation/drivers/ios/SimulatorAllocDriver.js +12 -7
  33. package/src/logger/DetoxLogger.js +5 -5
  34. package/src/utils/Timer.js +6 -0
  35. package/Detox-android/com/wix/detox/20.6.0/detox-20.6.0-javadoc.jar.md5 +0 -1
  36. package/Detox-android/com/wix/detox/20.6.0/detox-20.6.0-javadoc.jar.sha1 +0 -1
  37. package/Detox-android/com/wix/detox/20.6.0/detox-20.6.0-javadoc.jar.sha256 +0 -1
  38. package/Detox-android/com/wix/detox/20.6.0/detox-20.6.0-javadoc.jar.sha512 +0 -1
  39. package/Detox-android/com/wix/detox/20.6.0/detox-20.6.0-sources.jar.md5 +0 -1
  40. package/Detox-android/com/wix/detox/20.6.0/detox-20.6.0-sources.jar.sha1 +0 -1
  41. package/Detox-android/com/wix/detox/20.6.0/detox-20.6.0-sources.jar.sha256 +0 -1
  42. package/Detox-android/com/wix/detox/20.6.0/detox-20.6.0-sources.jar.sha512 +0 -1
  43. package/Detox-android/com/wix/detox/20.6.0/detox-20.6.0.pom.md5 +0 -1
  44. package/Detox-android/com/wix/detox/20.6.0/detox-20.6.0.pom.sha1 +0 -1
  45. package/Detox-android/com/wix/detox/20.6.0/detox-20.6.0.pom.sha256 +0 -1
  46. package/Detox-android/com/wix/detox/20.6.0/detox-20.6.0.pom.sha512 +0 -1
  47. /package/Detox-android/com/wix/detox/{20.6.0/detox-20.6.0.aar → 20.7.1/detox-20.7.1.aar} +0 -0
  48. /package/Detox-android/com/wix/detox/{20.6.0/detox-20.6.0.aar.md5 → 20.7.1/detox-20.7.1.aar.md5} +0 -0
  49. /package/Detox-android/com/wix/detox/{20.6.0/detox-20.6.0.aar.sha1 → 20.7.1/detox-20.7.1.aar.sha1} +0 -0
  50. /package/Detox-android/com/wix/detox/{20.6.0/detox-20.6.0.aar.sha256 → 20.7.1/detox-20.7.1.aar.sha256} +0 -0
  51. /package/Detox-android/com/wix/detox/{20.6.0/detox-20.6.0.aar.sha512 → 20.7.1/detox-20.7.1.aar.sha512} +0 -0
@@ -0,0 +1 @@
1
+ 0113faab1da9a045e9092cea699a3624
@@ -0,0 +1 @@
1
+ 4396d3e24128bd637010664528cbdc3c66e569f3
@@ -0,0 +1 @@
1
+ 9e3bd89632ed75d18a92ff04cc07035ef532493b6f9f609dcee68dfaa909bdd6
@@ -0,0 +1 @@
1
+ 3c80dccb14cdecbd572fd81281414f6d62b2fa51a556bfe313a244469feecb431bd87e9941c86cadc4d6f886666f588a9f0d1f468089f7b4e6dcdfb9f9c37847
@@ -0,0 +1 @@
1
+ 93e60854cbce9ed76735c4235a095fde
@@ -0,0 +1 @@
1
+ ae4cade001095f5660922c0d47dfd2f7ae591543
@@ -0,0 +1 @@
1
+ e3dfc645cc611330d5118f1062dfd52daefe2e3b34045fba0ac53cdb31245750
@@ -0,0 +1 @@
1
+ d6d325d1190f5cf350cb109a4c40623aa5f2f3f5ace45cb60031d571f1e2c09e96d79600e894390c8870f8e43915eab59353d8e2ca801257153ccf1eebb81a1f
@@ -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.6.0</version>
6
+ <version>20.7.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
+ 4795ef13275062b995b0f3366fa0c45a
@@ -0,0 +1 @@
1
+ 61c2ec92afc448d83d05d289ca80fc41c151a554
@@ -0,0 +1 @@
1
+ 7558991398a08527c0357bd106b32d537c8a93c8f48c7eb4489c19025973710e
@@ -0,0 +1 @@
1
+ 254a1bd18881d46d3dea721a6e4691b9b69c97a76f8dcf67981476e29a891aafb122d3b9f8c6f4a7350ecc7e9d0616dd29801e0989e2777cd721f5d2b86b63aa
@@ -3,11 +3,11 @@
3
3
  <groupId>com.wix</groupId>
4
4
  <artifactId>detox</artifactId>
5
5
  <versioning>
6
- <latest>20.6.0</latest>
7
- <release>20.6.0</release>
6
+ <latest>20.7.1</latest>
7
+ <release>20.7.1</release>
8
8
  <versions>
9
- <version>20.6.0</version>
9
+ <version>20.7.1</version>
10
10
  </versions>
11
- <lastUpdated>20230322171518</lastUpdated>
11
+ <lastUpdated>20230430150032</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- f72e8f5e279054eb2e8e8faab020aaab
1
+ cb58d5cb0552d30f20ab086c32b9cbf4
@@ -1 +1 @@
1
- 4e3513e973cd69a3ce1b30d0756ba26660ae1ba6
1
+ 1608c2537121f49d0f095df618fabeb933236cbf
@@ -1 +1 @@
1
- 319540a82e8d028d9fe417155b17c95ae4d62f0cf9f18a751a1827a27acf1802
1
+ fd3520020aafe8c1ee7426afbee0f8849a891bbf44e7be35c22712e0e6902c15
@@ -1 +1 @@
1
- 92f9a95efb7117c43c5df7765e56d81d8ef34b2413ef04e6133d7a3d51ccb88bec0aa80bba83d302ebe4dee638270ec57e03b0a3fc972e8552fd94365065fd3a
1
+ 16f02a639ca6bee3d31f8bcbe10689e810b5e2ca35d0399539f21ee975b6e217ebc8fc1754b16f94e730e3fd8d0cfb0c8b4381a36d40fdf7f681335237583d71
package/Detox-ios-src.tbz CHANGED
Binary file
package/Detox-ios.tbz CHANGED
Binary file
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.6.0",
4
+ "version": "20.7.1",
5
5
  "bin": {
6
6
  "detox": "local-cli/cli.js"
7
7
  },
@@ -61,11 +61,11 @@
61
61
  "bunyan": "^1.8.12",
62
62
  "bunyan-debug-stream": "^3.1.0",
63
63
  "caf": "^15.0.1",
64
- "chalk": "^2.4.2",
64
+ "chalk": "^4.0.0",
65
65
  "child-process-promise": "^2.2.0",
66
66
  "execa": "^5.1.1",
67
- "find-up": "^4.1.0",
68
- "fs-extra": "^4.0.2",
67
+ "find-up": "^5.0.0",
68
+ "fs-extra": "^11.0.0",
69
69
  "funpermaproxy": "^1.1.0",
70
70
  "glob": "^8.0.3",
71
71
  "ini": "^1.3.4",
@@ -73,7 +73,7 @@
73
73
  "lodash": "^4.17.11",
74
74
  "multi-sort-stream": "^1.0.3",
75
75
  "multipipe": "^4.0.0",
76
- "node-ipc": "^9.2.1",
76
+ "node-ipc": "9.2.1",
77
77
  "proper-lockfile": "^3.0.2",
78
78
  "resolve-from": "^5.0.0",
79
79
  "sanitize-filename": "^1.6.1",
@@ -88,8 +88,8 @@
88
88
  "trace-event-lib": "^1.3.1",
89
89
  "which": "^1.3.1",
90
90
  "ws": "^7.0.0",
91
- "yargs": "^16.0.3",
92
- "yargs-parser": "^20.2.9",
91
+ "yargs": "^17.0.0",
92
+ "yargs-parser": "^21.0.0",
93
93
  "yargs-unparser": "^2.0.0"
94
94
  },
95
95
  "peerDependencies": {
@@ -200,5 +200,5 @@
200
200
  }
201
201
  }
202
202
  },
203
- "gitHead": "03e23e76b54f1e7de70495e0ec8a8db45872b0e6"
203
+ "gitHead": "5de4e8574369d0b9eaa298e581def9feb6d7e453"
204
204
  }
@@ -1,4 +1,4 @@
1
- const chalk = require('chalk').default;
1
+ const chalk = require('chalk');
2
2
  const noop = require('lodash/noop');
3
3
 
4
4
  const { config, log, session } = require('../../../../internals');
@@ -1,6 +1,6 @@
1
1
  const path = require('path');
2
2
 
3
- const chalk = require('chalk').default;
3
+ const chalk = require('chalk');
4
4
  const _ = require('lodash');
5
5
 
6
6
  const { device } = require('../../../..');
@@ -138,6 +138,8 @@ class DetoxWorker {
138
138
  this._deviceAllocator = deviceAllocatorFactory.createDeviceAllocator(commonDeps);
139
139
  this._deviceCookie = yield this._deviceAllocator.allocate(this._deviceConfig);
140
140
 
141
+ yield this._deviceAllocator.postAllocate(this._deviceCookie);
142
+
141
143
  this.device = runtimeDeviceFactory.createRuntimeDevice(
142
144
  this._deviceCookie,
143
145
  commonDeps,
@@ -200,9 +202,12 @@ class DetoxWorker {
200
202
  }
201
203
 
202
204
  if (this.device) {
203
- const shutdown = this._behaviorConfig ? this._behaviorConfig.cleanup.shutdownDevice : false;
204
205
  // @ts-ignore
205
206
  await this.device._cleanup();
207
+ }
208
+
209
+ if (this._deviceCookie) {
210
+ const shutdown = this._behaviorConfig ? this._behaviorConfig.cleanup.shutdownDevice : false;
206
211
  await this._deviceAllocator.free(this._deviceCookie, { shutdown });
207
212
  }
208
213
 
@@ -8,7 +8,7 @@ class DeviceAllocator {
8
8
  */
9
9
  constructor(allocationDriver) {
10
10
  this._driver = allocationDriver;
11
- traceMethods(log, this, ['allocate', 'free']);
11
+ traceMethods(log, this, ['allocate', 'postAllocate', 'free']);
12
12
  }
13
13
 
14
14
  /**
@@ -19,6 +19,18 @@ class DeviceAllocator {
19
19
  return this._driver.allocate(deviceConfig);
20
20
  }
21
21
 
22
+ /**
23
+ * @param {DeviceCookie} deviceCookie
24
+ * @return {Promise<unknown>}
25
+ */
26
+ postAllocate(deviceCookie) {
27
+ if (typeof this._driver.postAllocate !== 'function') {
28
+ return Promise.resolve();
29
+ }
30
+
31
+ return this._driver.postAllocate(deviceCookie);
32
+ }
33
+
22
34
  /**
23
35
  * @param cookie { DeviceCookie }
24
36
  * @param options { DeallocOptions }
@@ -13,6 +13,12 @@ class AllocationDriverBase {
13
13
  */
14
14
  async allocate(deviceConfig) {}
15
15
 
16
+ /**
17
+ * @param {DeviceCookie} deviceCookie
18
+ * @return {Promise<void>}
19
+ */
20
+ async postAllocate(deviceCookie) {}
21
+
16
22
  /**
17
23
  * @param cookie { DeviceCookie }
18
24
  * @param options { DeallocOptions }
@@ -25,11 +25,20 @@ class AttachedAndroidAllocDriver extends AllocationDriverBase {
25
25
  const adbNamePattern = deviceConfig.device.adbName;
26
26
  const adbName = await this._deviceRegistry.allocateDevice(() => this._freeDeviceFinder.findFreeDevice(adbNamePattern));
27
27
 
28
+ return new AttachedAndroidDeviceCookie(adbName);
29
+ }
30
+
31
+ /**
32
+ * @param {AttachedAndroidDeviceCookie} deviceCookie
33
+ * @returns {Promise<void>}
34
+ */
35
+ async postAllocate(deviceCookie) {
36
+ const { adbName } = deviceCookie;
37
+
28
38
  // TODO Also disable native animations?
29
39
  await this._adb.apiLevel(adbName);
30
40
  await this._adb.unlockScreen(adbName);
31
41
  await this._attachedAndroidLauncher.notifyLaunchCompleted(adbName);
32
- return new AttachedAndroidDeviceCookie(adbName);
33
42
  }
34
43
 
35
44
  /**
@@ -1,8 +1,6 @@
1
1
  // @ts-nocheck
2
2
  const _ = require('lodash');
3
3
 
4
- const log = require('../../../../../utils/logger').child({ cat: 'device' });
5
- const traceMethods = require('../../../../../utils/traceMethods');
6
4
  const AndroidEmulatorCookie = require('../../../../cookies/AndroidEmulatorCookie');
7
5
  const AllocationDriverBase = require('../../AllocationDriverBase');
8
6
 
@@ -23,8 +21,7 @@ class EmulatorAllocDriver extends AllocationDriverBase {
23
21
  this._emulatorVersionResolver = emulatorVersionResolver;
24
22
  this._emulatorLauncher = emulatorLauncher;
25
23
  this._allocationHelper = allocationHelper;
26
-
27
- traceMethods(log, this, ['_launchEmulator']);
24
+ this._launchInfo = {};
28
25
  }
29
26
 
30
27
  /**
@@ -38,21 +35,37 @@ class EmulatorAllocDriver extends AllocationDriverBase {
38
35
  await this._fixAvdConfigIniSkinNameIfNeeded(avdName, deviceConfig.headless);
39
36
 
40
37
  const allocResult = await this._allocationHelper.allocateDevice(avdName);
41
- const { adbName, placeholderPort, isRunning } = allocResult;
42
- const launchOptions = {
43
- bootArgs: deviceConfig.bootArgs,
44
- gpuMode: deviceConfig.gpuMode,
45
- headless: deviceConfig.headless,
46
- readonly: deviceConfig.readonly,
47
- port: placeholderPort,
38
+ const { adbName } = allocResult;
39
+
40
+ this._launchInfo[adbName] = {
41
+ avdName,
42
+ isRunning: allocResult.isRunning,
43
+ launchOptions: {
44
+ bootArgs: deviceConfig.bootArgs,
45
+ gpuMode: deviceConfig.gpuMode,
46
+ headless: deviceConfig.headless,
47
+ readonly: deviceConfig.readonly,
48
+ port: allocResult.placeholderPort,
49
+ },
48
50
  };
49
51
 
50
- await this._launchEmulator(avdName, adbName, isRunning, launchOptions);
51
- await this._prepareEmulator(adbName);
52
-
53
52
  return new AndroidEmulatorCookie(adbName);
54
53
  }
55
54
 
55
+ /**
56
+ * @param {AndroidEmulatorCookie} deviceCookie
57
+ * @returns {Promise<void>}
58
+ */
59
+ async postAllocate(deviceCookie) {
60
+ const { adbName } = deviceCookie;
61
+ const { avdName, isRunning, launchOptions } = this._launchInfo[adbName];
62
+
63
+ await this._emulatorLauncher.launch(avdName, adbName, isRunning, launchOptions);
64
+ await this._adb.apiLevel(adbName);
65
+ await this._adb.disableAndroidAnimations(adbName);
66
+ await this._adb.unlockScreen(adbName);
67
+ }
68
+
56
69
  /**
57
70
  * @param cookie { AndroidEmulatorCookie }
58
71
  * @param options { DeallocOptions }
@@ -73,21 +86,6 @@ class EmulatorAllocDriver extends AllocationDriverBase {
73
86
  const binaryVersion = _.get(rawBinaryVersion, 'major');
74
87
  return await patchAvdSkinConfig(avdName, binaryVersion);
75
88
  }
76
-
77
- async _launchEmulator(avdName, adbName, isRunning, options) {
78
- try {
79
- await this._emulatorLauncher.launch(avdName, adbName, isRunning, options);
80
- } catch (e) {
81
- await this._allocationHelper.deallocateDevice(adbName);
82
- throw e;
83
- }
84
- }
85
-
86
- async _prepareEmulator(adbName) {
87
- await this._adb.apiLevel(adbName);
88
- await this._adb.disableAndroidAnimations(adbName);
89
- await this._adb.unlockScreen(adbName);
90
- }
91
89
  }
92
90
 
93
91
  module.exports = EmulatorAllocDriver;
@@ -1,22 +1,25 @@
1
- // @ts-nocheck
2
- const DetoxRuntimeError = require('../../../../../errors/DetoxRuntimeError');
1
+ const { DetoxRuntimeError } = require('../../../../../errors');
2
+ const Timer = require('../../../../../utils/Timer');
3
3
  const GenycloudEmulatorCookie = require('../../../../cookies/GenycloudEmulatorCookie');
4
4
  const AllocationDriverBase = require('../../AllocationDriverBase');
5
5
 
6
6
  class GenyAllocDriver extends AllocationDriverBase {
7
7
 
8
8
  /**
9
- * @param adb { ADB }
10
- * @param recipeQuerying { GenyRecipeQuerying }
11
- * @param allocationHelper { GenyInstanceAllocationHelper }
12
- * @param instanceLauncher { GenyInstanceLauncher }
9
+ * @param {object} options
10
+ * @param {import('../../../../common/drivers/android/exec/ADB')} options.adb
11
+ * @param {import('./GenyRecipeQuerying')} options.recipeQuerying
12
+ * @param {import('./GenyInstanceAllocationHelper')} options.allocationHelper
13
+ * @param {import('./GenyInstanceLauncher')} options.instanceLauncher
13
14
  */
14
15
  constructor({ adb, recipeQuerying, allocationHelper, instanceLauncher }) {
15
16
  super();
17
+
16
18
  this._adb = adb;
17
19
  this._recipeQuerying = recipeQuerying;
18
20
  this._instanceLauncher = instanceLauncher;
19
21
  this._instanceAllocationHelper = allocationHelper;
22
+ this._launchInfo = {};
20
23
  }
21
24
 
22
25
  /**
@@ -28,21 +31,26 @@ class GenyAllocDriver extends AllocationDriverBase {
28
31
  const recipe = await this._recipeQuerying.getRecipeFromQuery(deviceQuery);
29
32
  this._assertRecipe(deviceQuery, recipe);
30
33
 
31
- const allocResult = await this._instanceAllocationHelper.allocateDevice(recipe);
32
- let { instance, isNew } = allocResult;
34
+ const { instance, isNew } = await this._instanceAllocationHelper.allocateDevice(recipe);
35
+ this._launchInfo[instance.uuid] = { isNew };
36
+ return new GenycloudEmulatorCookie(instance);
37
+ }
33
38
 
34
- try {
35
- instance = await this._instanceLauncher.launch(instance, isNew);
36
- } catch (e) {
37
- await this._instanceAllocationHelper.deallocateDevice(instance.uuid);
38
- throw e;
39
- }
40
- const { adbName } = instance;
39
+ /**
40
+ * @param {GenycloudEmulatorCookie} cookie
41
+ * @returns {Promise<void>}
42
+ */
43
+ async postAllocate(cookie) {
44
+ const { instance } = cookie;
45
+ const { isNew } = this._launchInfo[instance.uuid];
46
+ const readyInstance = cookie.instance = await this._instanceLauncher.launch(instance, isNew);
41
47
 
42
- await this._adb.disableAndroidAnimations(adbName);
43
- await this._adb.setWiFiToggle(adbName, true);
44
- await this._adb.apiLevel(adbName);
45
- return new GenycloudEmulatorCookie(instance);
48
+ const { adbName } = readyInstance;
49
+ await Timer.run(20000, 'waiting for device to respond', async () => {
50
+ await this._adb.disableAndroidAnimations(adbName);
51
+ await this._adb.setWiFiToggle(adbName, true);
52
+ await this._adb.apiLevel(adbName);
53
+ });
46
54
  }
47
55
 
48
56
  /**
@@ -16,6 +16,7 @@ class SimulatorAllocDriver extends AllocationDriverBase {
16
16
  this._deviceRegistry = deviceRegistry;
17
17
  this._applesimutils = applesimutils;
18
18
  this._simulatorLauncher = simulatorLauncher;
19
+ this._launchInfo = {};
19
20
  }
20
21
 
21
22
  /**
@@ -35,16 +36,20 @@ class SimulatorAllocDriver extends AllocationDriverBase {
35
36
  throw new DetoxRuntimeError(`Failed to find device matching ${deviceComment}`);
36
37
  }
37
38
 
38
- try {
39
- await this._simulatorLauncher.launch(udid, deviceConfig.type, deviceConfig.bootArgs, deviceConfig.headless);
40
- } catch (e) {
41
- await this._deviceRegistry.disposeDevice(udid);
42
- throw e;
43
- }
44
-
39
+ this._launchInfo[udid] = { deviceConfig };
45
40
  return new IosSimulatorCookie(udid);
46
41
  }
47
42
 
43
+ /**
44
+ * @param {IosSimulatorCookie} deviceCookie
45
+ * @returns {Promise<void>}
46
+ */
47
+ async postAllocate(deviceCookie) {
48
+ const { udid } = deviceCookie;
49
+ const { deviceConfig } = this._launchInfo[udid];
50
+ await this._simulatorLauncher.launch(udid, deviceConfig.type, deviceConfig.bootArgs, deviceConfig.headless);
51
+ }
52
+
48
53
  /**
49
54
  * @param cookie { IosSimulatorCookie }
50
55
  * @param options { DeallocOptions }
@@ -310,19 +310,19 @@ class DetoxLogger {
310
310
  /** @internal */
311
311
  static defaultOptions({ level }) {
312
312
  const ph = level === 'trace' || level === 'debug'
313
- ? value => require('chalk').default.grey(value) + ' '
314
- : value => require('chalk').default.grey(value);
313
+ ? value => require('chalk').grey(value) + ' '
314
+ : value => require('chalk').grey(value);
315
315
 
316
316
  const id = level === 'trace'
317
- ? value => require('chalk').default.yellow(`@${value}`)
317
+ ? value => require('chalk').yellow(`@${value}`)
318
318
  : undefined;
319
319
 
320
320
  const cat = level === 'trace' || level === 'debug'
321
- ? (value) => require('chalk').default.yellow(`${value}`.split(',', 1)[0])
321
+ ? (value) => require('chalk').yellow(`${value}`.split(',', 1)[0])
322
322
  : undefined;
323
323
 
324
324
  const event = level === 'trace' || level === 'debug'
325
- ? (value) => require('chalk').default.grey(`:${value}`)
325
+ ? (value) => require('chalk').grey(`:${value}`)
326
326
  : undefined;
327
327
 
328
328
  const identity = x => x;
@@ -77,6 +77,12 @@ class Timer {
77
77
  Promise.resolve().then(action),
78
78
  ]);
79
79
  }
80
+
81
+ static run(timeout, description, action) {
82
+ const timer = new Timer();
83
+ timer.schedule(timeout);
84
+ return timer.run(description, action);
85
+ }
80
86
  }
81
87
 
82
88
  module.exports = Timer;
@@ -1 +0,0 @@
1
- c051f79d02bcc98757dd1ea06512a63b
@@ -1 +0,0 @@
1
- bb48d0747cb607e73a01d64f5eb758ce00e376cb
@@ -1 +0,0 @@
1
- b31397b81cdca47b2d5dc1aca7821f2691d236114064949ad8553fd81340fe02
@@ -1 +0,0 @@
1
- 6cec7c20f0d9643b98e2fa2f4740c9bb7a4b82ae3851069bb183e16ffcace8b0ceb07cf8d19316a960beb2330ea3e0a508df80cda1561242149ce3b16357d954
@@ -1 +0,0 @@
1
- 6202d8d0f83dda9ed0c9d6962259350e
@@ -1 +0,0 @@
1
- 505b10faaca41e1b5e7f27b8829cd14aff6b5626
@@ -1 +0,0 @@
1
- f4b81a4c2c1665975ac5be02698e288a311e3cd3c728ba9b05e72a1932f7482e
@@ -1 +0,0 @@
1
- e355acd2730e5ca57bb7f2c092942b6dd98997645b43350fd2c80051f3f8a6840f2746cd2e8fbeae862ab4cac0fc6339b7f298e697f3bfb4124598370c4b2a54
@@ -1 +0,0 @@
1
- 120956f03efbba5c9cec898b7da52efe
@@ -1 +0,0 @@
1
- b6c2c0740f1de17d7dc5671d096debbe7eb46dd3
@@ -1 +0,0 @@
1
- 8fdf9933acc2bcc22588bc3cffb6348ab73f8100c5212f7e607e315bce59a265
@@ -1 +0,0 @@
1
- f3ae74b6397013d7a5af6ed08cbbd739f5e207df9463a6b6cb496bd1b9a87022f193b87207d6424f2b8b85e022836211215cd01eaa88f9adcea6515594f59e76