detox 20.39.0 → 20.40.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.
- package/Detox-android/com/wix/detox/{20.39.0/detox-20.39.0-sources.jar → 20.40.1/detox-20.40.1-sources.jar} +0 -0
- package/Detox-android/com/wix/detox/20.40.1/detox-20.40.1-sources.jar.md5 +1 -0
- package/Detox-android/com/wix/detox/20.40.1/detox-20.40.1-sources.jar.sha1 +1 -0
- package/Detox-android/com/wix/detox/20.40.1/detox-20.40.1-sources.jar.sha256 +1 -0
- package/Detox-android/com/wix/detox/20.40.1/detox-20.40.1-sources.jar.sha512 +1 -0
- package/Detox-android/com/wix/detox/{20.39.0/detox-20.39.0.pom → 20.40.1/detox-20.40.1.pom} +1 -1
- package/Detox-android/com/wix/detox/20.40.1/detox-20.40.1.pom.md5 +1 -0
- package/Detox-android/com/wix/detox/20.40.1/detox-20.40.1.pom.sha1 +1 -0
- package/Detox-android/com/wix/detox/20.40.1/detox-20.40.1.pom.sha256 +1 -0
- package/Detox-android/com/wix/detox/20.40.1/detox-20.40.1.pom.sha512 +1 -0
- package/Detox-android/com/wix/detox/maven-metadata.xml +4 -4
- package/Detox-android/com/wix/detox/maven-metadata.xml.md5 +1 -1
- package/Detox-android/com/wix/detox/maven-metadata.xml.sha1 +1 -1
- package/Detox-android/com/wix/detox/maven-metadata.xml.sha256 +1 -1
- package/Detox-android/com/wix/detox/maven-metadata.xml.sha512 +1 -1
- package/Detox-ios-framework.tbz +0 -0
- package/Detox-ios-src.tbz +0 -0
- package/Detox-ios-xcuitest.tbz +0 -0
- package/local-cli/utils/jestInternals.js +10 -2
- package/package.json +12 -12
- package/runners/jest/testEnvironment/index.js +2 -2
- package/runners/jest/testEnvironment/utils/{assertJestCircus27.js → validateAndPatchProjectConfig.js} +14 -5
- package/src/android/core/NativeElement.js +2 -1
- package/src/artifacts/templates/artifact/FileArtifact.js +2 -1
- package/src/artifacts/utils/temporaryPath.js +2 -1
- package/src/devices/allocation/drivers/android/emulator/AVDsResolver.js +1 -1
- package/src/devices/allocation/drivers/android/genycloud/GenyAllocDriver.js +0 -11
- package/src/devices/allocation/drivers/android/genycloud/GenyRecipeQuerying.js +3 -0
- package/src/devices/allocation/drivers/android/genycloud/services/GenyRecipesService.js +9 -6
- package/src/devices/allocation/drivers/ios/SimulatorAllocDriver.js +4 -1
- package/src/devices/common/drivers/ios/tools/AppleSimUtils.js +13 -2
- package/src/ios/expectTwo.js +2 -1
- package/src/utils/environment.js +8 -0
- package/src/utils/tempfile.js +18 -0
- package/Detox-android/com/wix/detox/20.39.0/detox-20.39.0-sources.jar.md5 +0 -1
- package/Detox-android/com/wix/detox/20.39.0/detox-20.39.0-sources.jar.sha1 +0 -1
- package/Detox-android/com/wix/detox/20.39.0/detox-20.39.0-sources.jar.sha256 +0 -1
- package/Detox-android/com/wix/detox/20.39.0/detox-20.39.0-sources.jar.sha512 +0 -1
- package/Detox-android/com/wix/detox/20.39.0/detox-20.39.0.pom.md5 +0 -1
- package/Detox-android/com/wix/detox/20.39.0/detox-20.39.0.pom.sha1 +0 -1
- package/Detox-android/com/wix/detox/20.39.0/detox-20.39.0.pom.sha256 +0 -1
- package/Detox-android/com/wix/detox/20.39.0/detox-20.39.0.pom.sha512 +0 -1
- /package/Detox-android/com/wix/detox/{20.39.0/detox-20.39.0.aar → 20.40.1/detox-20.40.1.aar} +0 -0
- /package/Detox-android/com/wix/detox/{20.39.0/detox-20.39.0.aar.md5 → 20.40.1/detox-20.40.1.aar.md5} +0 -0
- /package/Detox-android/com/wix/detox/{20.39.0/detox-20.39.0.aar.sha1 → 20.40.1/detox-20.40.1.aar.sha1} +0 -0
- /package/Detox-android/com/wix/detox/{20.39.0/detox-20.39.0.aar.sha256 → 20.40.1/detox-20.40.1.aar.sha256} +0 -0
- /package/Detox-android/com/wix/detox/{20.39.0/detox-20.39.0.aar.sha512 → 20.40.1/detox-20.40.1.aar.sha512} +0 -0
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
8c398d819033d15f727daf28426f1c50
|
@@ -0,0 +1 @@
|
|
1
|
+
bab5b4c3930fc34187b928274acd540ea9a94116
|
@@ -0,0 +1 @@
|
|
1
|
+
5b774e0b06f1679a7c5dbccdefc931b69404f0ce8c965defed3e80858f4278b3
|
@@ -0,0 +1 @@
|
|
1
|
+
a81e4fcabcafe3b7c0f88ecac3336a0ddd696e639a0f49af3fd71e2c5a63d5341755edac7fe1fc4a8cf4f5dc6416229e3e94f65b841c6162e550dd11fb49b931
|
@@ -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
|
+
<version>20.40.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
|
+
8726ce2b4d2907246a6104c59433e173
|
@@ -0,0 +1 @@
|
|
1
|
+
a81d61515430c4db7f04bb4cb41b9190848f4dc3
|
@@ -0,0 +1 @@
|
|
1
|
+
f3a39951c296b6e27292c15b2162b019eda61a359bedbeb3a9227913ed68f608
|
@@ -0,0 +1 @@
|
|
1
|
+
392753f08a6a2c0c8b9df6a833108ab292558da7b3d7cc00d47cdeabf078665791f7a1564ee042ff09232152ac10b979cd38a08b863b309a98155904ae9565ce
|
@@ -3,11 +3,11 @@
|
|
3
3
|
<groupId>com.wix</groupId>
|
4
4
|
<artifactId>detox</artifactId>
|
5
5
|
<versioning>
|
6
|
-
<latest>20.
|
7
|
-
<release>20.
|
6
|
+
<latest>20.40.1</latest>
|
7
|
+
<release>20.40.1</release>
|
8
8
|
<versions>
|
9
|
-
<version>20.
|
9
|
+
<version>20.40.1</version>
|
10
10
|
</versions>
|
11
|
-
<lastUpdated>
|
11
|
+
<lastUpdated>20250709100011</lastUpdated>
|
12
12
|
</versioning>
|
13
13
|
</metadata>
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
fd2576346d5faf67f5f7676c76d84dcb
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
7df9036abd4ce3ccafc48e98084eed1544dfc2b2
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
b94fc1a4fd83bb0567cbed695e049f611aa325fc43cd3a6adb2045c3e6921dff
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
cc22e3e9c9e7ae105d94b34cd696c7ee8d32e38c77d3317baef6c49600a98799baaba5970ea2a32fdc0d084b6c85f1f9a6799bb5cfab495da74ed6c7836f5335
|
package/Detox-ios-framework.tbz
CHANGED
Binary file
|
package/Detox-ios-src.tbz
CHANGED
Binary file
|
package/Detox-ios-xcuitest.tbz
CHANGED
Binary file
|
@@ -27,6 +27,14 @@ function getJestLocation() {
|
|
27
27
|
return path.dirname(resolveFrom(cwd, 'jest/package.json'));
|
28
28
|
}
|
29
29
|
|
30
|
+
function getJestCliArgsJsFilePath(jestCliVersion) {
|
31
|
+
if (semver.gte(jestCliVersion, '30.0.0')) {
|
32
|
+
return 'build/index.js';
|
33
|
+
}
|
34
|
+
|
35
|
+
return semver.gt(jestCliVersion, '29.1.2') ? 'build/args.js' : 'build/cli/args.js';
|
36
|
+
}
|
37
|
+
|
30
38
|
function resolveJestDependency(jestLocation, dependencyName) {
|
31
39
|
const result = resolveFrom.silent(jestLocation, dependencyName);
|
32
40
|
if (!result) {
|
@@ -52,7 +60,7 @@ function resolveJestCliArgs() {
|
|
52
60
|
try {
|
53
61
|
const jestCliManifest = resolveJestDependency(jestLocation, 'jest-cli/package.json');
|
54
62
|
const jestCliVersion = require(jestCliManifest).version;
|
55
|
-
const argsJsFilePath =
|
63
|
+
const argsJsFilePath = getJestCliArgsJsFilePath(jestCliVersion);
|
56
64
|
const argsJsFile = path.join(path.dirname(jestCliManifest), argsJsFilePath);
|
57
65
|
|
58
66
|
return require(argsJsFile);
|
@@ -73,7 +81,7 @@ async function readJestConfig(argv) {
|
|
73
81
|
|
74
82
|
function getJestBooleanArgs() {
|
75
83
|
return _(resolveJestCliArgs())
|
76
|
-
.thru(args => args.options)
|
84
|
+
.thru(args => args.yargsOptions || args.options)
|
77
85
|
.pickBy(({ type }) => type === 'boolean')
|
78
86
|
.thru(extractKnownKeys)
|
79
87
|
.value();
|
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.
|
4
|
+
"version": "20.40.1",
|
5
5
|
"bin": {
|
6
6
|
"detox": "local-cli/cli.js"
|
7
7
|
},
|
@@ -37,10 +37,10 @@
|
|
37
37
|
"@react-native-community/cli": "15.0.1",
|
38
38
|
"@react-native-community/cli-platform-android": "15.0.1",
|
39
39
|
"@react-native-community/cli-platform-ios": "15.0.1",
|
40
|
-
"@react-native/babel-preset": "0.
|
41
|
-
"@react-native/eslint-config": "0.
|
42
|
-
"@react-native/metro-config": "0.
|
43
|
-
"@react-native/typescript-config": "0.
|
40
|
+
"@react-native/babel-preset": "0.78.2",
|
41
|
+
"@react-native/eslint-config": "0.78.2",
|
42
|
+
"@react-native/metro-config": "0.78.2",
|
43
|
+
"@react-native/typescript-config": "0.78.2",
|
44
44
|
"@tsconfig/react-native": "^3.0.0",
|
45
45
|
"@types/bunyan": "^1.8.8",
|
46
46
|
"@types/child-process-promise": "^2.2.1",
|
@@ -58,11 +58,11 @@
|
|
58
58
|
"eslint-plugin-no-only-tests": "^3.1.0",
|
59
59
|
"eslint-plugin-node": "^11.1.0",
|
60
60
|
"eslint-plugin-unicorn": "^50.0.1",
|
61
|
-
"jest": "^
|
62
|
-
"jest-allure2-reporter": "^2.
|
61
|
+
"jest": "^30.0.3",
|
62
|
+
"jest-allure2-reporter": "^2.2.6",
|
63
63
|
"metro-react-native-babel-preset": "0.76.8",
|
64
64
|
"prettier": "^3.1.1",
|
65
|
-
"react-native": "0.
|
65
|
+
"react-native": "0.78.2",
|
66
66
|
"react-native-codegen": "^0.0.8",
|
67
67
|
"typescript": "~5.3.3",
|
68
68
|
"wtfnode": "^0.9.1"
|
@@ -81,7 +81,7 @@
|
|
81
81
|
"funpermaproxy": "^1.1.0",
|
82
82
|
"glob": "^8.0.3",
|
83
83
|
"ini": "^1.3.4",
|
84
|
-
"jest-environment-emit": "^1.0
|
84
|
+
"jest-environment-emit": "^1.2.0",
|
85
85
|
"json-cycle": "^1.3.0",
|
86
86
|
"lodash": "^4.17.11",
|
87
87
|
"multi-sort-stream": "^1.0.3",
|
@@ -98,7 +98,7 @@
|
|
98
98
|
"stream-json": "^1.7.4",
|
99
99
|
"strip-ansi": "^6.0.1",
|
100
100
|
"telnet-client": "1.2.8",
|
101
|
-
"
|
101
|
+
"tmp": "^0.2.1",
|
102
102
|
"trace-event-lib": "^1.3.1",
|
103
103
|
"which": "^1.3.1",
|
104
104
|
"ws": "^7.0.0",
|
@@ -107,7 +107,7 @@
|
|
107
107
|
"yargs-unparser": "^2.0.0"
|
108
108
|
},
|
109
109
|
"peerDependencies": {
|
110
|
-
"jest": "29.x.x || 28.x.x || ^27.2.5"
|
110
|
+
"jest": "30.x.x || 29.x.x || 28.x.x || ^27.2.5"
|
111
111
|
},
|
112
112
|
"peerDependenciesMeta": {
|
113
113
|
"jest": {
|
@@ -120,5 +120,5 @@
|
|
120
120
|
"browserslist": [
|
121
121
|
"node 14"
|
122
122
|
],
|
123
|
-
"gitHead": "
|
123
|
+
"gitHead": "1b27e222d29b5d0847c9c022c0d1590647af76ae"
|
124
124
|
}
|
@@ -18,7 +18,7 @@ const {
|
|
18
18
|
WorkerAssignReporter
|
19
19
|
} = require('./listeners');
|
20
20
|
const assertExistingContext = require('./utils/assertExistingContext');
|
21
|
-
const {
|
21
|
+
const { validateAndPatchProjectConfig } = require('./utils/validateAndPatchProjectConfig');
|
22
22
|
|
23
23
|
const SYNC_CIRCUS_EVENTS = new Set([
|
24
24
|
'start_describe_definition',
|
@@ -35,7 +35,7 @@ const log = detox.log.child({ cat: 'lifecycle,jest-environment' });
|
|
35
35
|
*/
|
36
36
|
class DetoxCircusEnvironment extends WithEmitter(NodeEnvironment) {
|
37
37
|
constructor(config, context) {
|
38
|
-
super(
|
38
|
+
super(validateAndPatchProjectConfig(config), assertExistingContext(context));
|
39
39
|
|
40
40
|
/** @private */
|
41
41
|
this._shouldManageDetox = detox.getStatus() === 'inactive';
|
@@ -1,6 +1,7 @@
|
|
1
1
|
const fs = require('fs');
|
2
2
|
const path = require('path');
|
3
3
|
|
4
|
+
const findUp = require('find-up');
|
4
5
|
const resolveFrom = require('resolve-from');
|
5
6
|
const semver = require('semver');
|
6
7
|
|
@@ -8,7 +9,7 @@ const { log } = require('../../../../internals');
|
|
8
9
|
const detoxPackageJson = require('../../../../package.json');
|
9
10
|
const { DetoxRuntimeError } = require('../../../../src/errors');
|
10
11
|
|
11
|
-
function
|
12
|
+
function validateAndPatchProjectConfig(maybeProjectConfig) {
|
12
13
|
const projectConfig = maybeProjectConfig.projectConfig || maybeProjectConfig;
|
13
14
|
|
14
15
|
if (!/jest-circus/.test(projectConfig.testRunner)) {
|
@@ -19,11 +20,11 @@ function assertJestCircus27(maybeProjectConfig) {
|
|
19
20
|
});
|
20
21
|
}
|
21
22
|
|
22
|
-
const circusPackageJson =
|
23
|
-
if (!
|
23
|
+
const circusPackageJson = findUp.sync('package.json', { cwd: path.dirname(projectConfig.testRunner) });
|
24
|
+
if (!circusPackageJson) {
|
24
25
|
throw new DetoxRuntimeError({
|
25
26
|
message: 'Check that you have an installed copy of "jest-circus" npm package, exiting.',
|
26
|
-
debugInfo: `Its package.json file is missing: ${
|
27
|
+
debugInfo: `Its package.json file is missing in the directory: ${path.dirname(projectConfig.testRunner)}`,
|
27
28
|
});
|
28
29
|
}
|
29
30
|
|
@@ -48,6 +49,14 @@ function assertJestCircus27(maybeProjectConfig) {
|
|
48
49
|
].join('\n'));
|
49
50
|
}
|
50
51
|
|
52
|
+
// TODO: This is a workaround to prevent Jest from failing on teardown.
|
53
|
+
// PROBLEM: Detox uses proxies which throw in non-initialized or torn down state on purpose.
|
54
|
+
// So, either we need to implement a distinction between BEFORE and AFTER the test execution,
|
55
|
+
// or we need to change dramatically the way we export those proxies (possible only in a major version bump).
|
56
|
+
if (projectConfig && projectConfig.testEnvironmentOptions) {
|
57
|
+
projectConfig.testEnvironmentOptions.globalsCleanup = 'off';
|
58
|
+
}
|
59
|
+
|
51
60
|
return maybeProjectConfig;
|
52
61
|
}
|
53
62
|
|
@@ -65,6 +74,6 @@ function assertSupportedVersion(actualVersion) {
|
|
65
74
|
}
|
66
75
|
|
67
76
|
module.exports = {
|
68
|
-
assertJestCircus27,
|
69
77
|
assertSupportedVersion,
|
78
|
+
validateAndPatchProjectConfig,
|
70
79
|
};
|
@@ -1,13 +1,14 @@
|
|
1
1
|
const path = require('path');
|
2
2
|
|
3
3
|
const fs = require('fs-extra');
|
4
|
-
|
4
|
+
|
5
5
|
|
6
6
|
const DetoxRuntimeError = require('../../errors/DetoxRuntimeError');
|
7
7
|
const invoke = require('../../invoke');
|
8
8
|
const { removeMilliseconds } = require('../../utils/dateUtils');
|
9
9
|
const { actionDescription } = require('../../utils/invocationTraceDescriptions');
|
10
10
|
const mapLongPressArguments = require('../../utils/mapLongPressArguments');
|
11
|
+
const tempfile = require('../../utils/tempfile');
|
11
12
|
const actions = require('../actions/native');
|
12
13
|
const DetoxMatcherApi = require('../espressoapi/DetoxMatcher');
|
13
14
|
const { ActionInteraction } = require('../interactions/native');
|
@@ -2,9 +2,10 @@
|
|
2
2
|
const path = require('path');
|
3
3
|
|
4
4
|
const fs = require('fs-extra');
|
5
|
-
const tempfile = require('tempfile');
|
6
5
|
|
7
6
|
const appendFile = require('../../../utils/appendFile');
|
7
|
+
const tempfile = require('../../../utils/tempfile');
|
8
|
+
|
8
9
|
|
9
10
|
const Artifact = require('./Artifact');
|
10
11
|
|
@@ -3,9 +3,10 @@ const { promisify } = require('util');
|
|
3
3
|
|
4
4
|
const glob = require('glob');
|
5
5
|
const _ = require('lodash');
|
6
|
-
const tempfile = require('tempfile');
|
7
6
|
|
8
7
|
const { useForwardSlashes } = require('../../utils/shellUtils');
|
8
|
+
const tempfile = require('../../utils/tempfile');
|
9
|
+
|
9
10
|
|
10
11
|
const globSync = glob.sync;
|
11
12
|
const globAsync = promisify(glob);
|
@@ -3,7 +3,6 @@
|
|
3
3
|
* @typedef {import('../../../../common/drivers/android/cookies').GenycloudEmulatorCookie} GenycloudEmulatorCookie
|
4
4
|
*/
|
5
5
|
|
6
|
-
const { DetoxRuntimeError } = require('../../../../../errors');
|
7
6
|
const Timer = require('../../../../../utils/Timer');
|
8
7
|
const log = require('../../../../../utils/logger').child({ cat: 'device' });
|
9
8
|
|
@@ -56,7 +55,6 @@ class GenyAllocDriver {
|
|
56
55
|
async allocate(deviceConfig) {
|
57
56
|
const deviceQuery = deviceConfig.device;
|
58
57
|
const recipe = await this._recipeQuerying.getRecipeFromQuery(deviceQuery);
|
59
|
-
this._assertRecipe(deviceQuery, recipe);
|
60
58
|
|
61
59
|
let instance = this._genyRegistry.findFreeInstance(recipe);
|
62
60
|
if (!instance) {
|
@@ -151,15 +149,6 @@ class GenyAllocDriver {
|
|
151
149
|
this._reportGlobalCleanupSummary(instances);
|
152
150
|
}
|
153
151
|
|
154
|
-
_assertRecipe(deviceQuery, recipe) {
|
155
|
-
if (!recipe) {
|
156
|
-
throw new DetoxRuntimeError({
|
157
|
-
message: `No Genymotion-Cloud template found to match the configured lookup query: ${JSON.stringify(deviceQuery)}`,
|
158
|
-
hint: `Revisit your detox configuration. Genymotion templates list is available at: https://cloud.geny.io/recipes#custom`,
|
159
|
-
});
|
160
|
-
}
|
161
|
-
}
|
162
|
-
|
163
152
|
_reportGlobalCleanupSummary(deletionLeaks) {
|
164
153
|
if (deletionLeaks.length) {
|
165
154
|
log.warn(events.GENYCLOUD_TEARDOWN, 'WARNING! Detected a Genymotion SaaS instance leakage, for the following instances:');
|
@@ -1,4 +1,4 @@
|
|
1
|
-
const
|
1
|
+
const { DetoxRuntimeError } = require('../../../../../../errors');
|
2
2
|
|
3
3
|
const Recipe = require('./dto/GenyRecipe');
|
4
4
|
|
@@ -10,15 +10,18 @@ class GenyRecipesService {
|
|
10
10
|
async getRecipeByName(recipeName) {
|
11
11
|
const { recipes } = await this.genyCloudExec.getRecipe(recipeName);
|
12
12
|
if (!recipes.length) {
|
13
|
-
|
13
|
+
throw new DetoxRuntimeError({
|
14
|
+
message: `No Genymotion-Cloud recipe found for recipe name "${recipeName}"`,
|
15
|
+
hint: `Please check your recipe name or use recipe UUID instead.`,
|
16
|
+
});
|
14
17
|
}
|
15
18
|
|
16
19
|
if (recipes.length > 1) {
|
17
20
|
const recipesInfoList = recipes.map((recipe) => ` ${recipe.name} (${recipe.uuid})`).join('\n');
|
18
|
-
|
19
|
-
|
20
|
-
`
|
21
|
-
);
|
21
|
+
throw new DetoxRuntimeError({
|
22
|
+
message: `More than one Genymotion-Cloud recipe found for recipe name ${recipeName}:\n${recipesInfoList}`,
|
23
|
+
hint: `Please specify a unique recipe name or use recipe UUID instead.`,
|
24
|
+
});
|
22
25
|
}
|
23
26
|
return new Recipe(recipes[0]);
|
24
27
|
}
|
@@ -170,7 +170,10 @@ class SimulatorAllocDriver {
|
|
170
170
|
async _queryDevices(deviceQuery) {
|
171
171
|
const result = await this._applesimutils.list(
|
172
172
|
deviceQuery,
|
173
|
-
|
173
|
+
{
|
174
|
+
trying: `Searching for device ${deviceQuery} ...`,
|
175
|
+
fields: ['udid', 'os', 'identifier'],
|
176
|
+
}
|
174
177
|
);
|
175
178
|
|
176
179
|
if (_.isEmpty(result)) {
|
@@ -2,6 +2,7 @@
|
|
2
2
|
const path = require('path');
|
3
3
|
|
4
4
|
const _ = require('lodash');
|
5
|
+
const semver = require('semver');
|
5
6
|
|
6
7
|
const DetoxRuntimeError = require('../../../../../errors/DetoxRuntimeError');
|
7
8
|
const { joinArgs } = require('../../../../../utils/argparse');
|
@@ -131,8 +132,9 @@ class AppleSimUtils {
|
|
131
132
|
}
|
132
133
|
|
133
134
|
async list(query, listOptions = {}) {
|
135
|
+
const fields = await this._buildFields(listOptions.fields);
|
134
136
|
const options = {
|
135
|
-
args: `--list ${joinArgs(query)}`,
|
137
|
+
args: `--list ${joinArgs(query)} ${fields}`,
|
136
138
|
retries: 1,
|
137
139
|
statusLogs: listOptions.trying ? { trying: listOptions.trying } : undefined,
|
138
140
|
maxBuffer: 4 * 1024 * 1024,
|
@@ -174,7 +176,7 @@ class AppleSimUtils {
|
|
174
176
|
}
|
175
177
|
|
176
178
|
async _findDeviceByUDID(udid) {
|
177
|
-
const [device] = await this.list({ byId: udid, maxResults: 1 });
|
179
|
+
const [device] = await this.list({ byId: udid, maxResults: 1 }, { fields: ['udid', 'os', 'version', 'state'] });
|
178
180
|
if (!device) {
|
179
181
|
throw new DetoxRuntimeError(`Can't find device with UDID = "${udid}"`);
|
180
182
|
}
|
@@ -579,6 +581,15 @@ class AppleSimUtils {
|
|
579
581
|
|
580
582
|
return Number.NaN;
|
581
583
|
}
|
584
|
+
|
585
|
+
async _buildFields(fields) {
|
586
|
+
const version = await environment.getAppleSimUtilsVersion();
|
587
|
+
if (fields && semver.gt(version, '0.9.10')) {
|
588
|
+
return `--fields ${fields.join(',')}`;
|
589
|
+
}
|
590
|
+
|
591
|
+
return '';
|
592
|
+
}
|
582
593
|
}
|
583
594
|
|
584
595
|
module.exports = AppleSimUtils;
|
package/src/ios/expectTwo.js
CHANGED
@@ -3,7 +3,7 @@ const path = require('path');
|
|
3
3
|
|
4
4
|
const fs = require('fs-extra');
|
5
5
|
const _ = require('lodash');
|
6
|
-
|
6
|
+
|
7
7
|
|
8
8
|
const { assertTraceDescription, assertEnum, assertNormalized } = require('../utils/assertArgument');
|
9
9
|
const { removeMilliseconds } = require('../utils/dateUtils');
|
@@ -11,6 +11,7 @@ const { actionDescription, expectDescription } = require('../utils/invocationTra
|
|
11
11
|
const { isRegExp } = require('../utils/isRegExp');
|
12
12
|
const log = require('../utils/logger').child({ cat: 'ws-client, ws' });
|
13
13
|
const mapLongPressArguments = require('../utils/mapLongPressArguments');
|
14
|
+
const tempfile = require('../utils/tempfile');
|
14
15
|
const traceInvocationCall = require('../utils/traceInvocationCall').bind(null, log);
|
15
16
|
|
16
17
|
const { systemElement, systemMatcher, systemExpect, isSystemElement } = require('./system');
|
package/src/utils/environment.js
CHANGED
@@ -177,6 +177,13 @@ const getDetoxVersion = _.once(() => {
|
|
177
177
|
return require(path.join(__dirname, '../../package.json')).version;
|
178
178
|
});
|
179
179
|
|
180
|
+
const getAppleSimUtilsVersion = _.once(async () => {
|
181
|
+
const command = `applesimutils --version`;
|
182
|
+
const output = await execAsync(command);
|
183
|
+
const match = output.match(/(\d+\.\d+\.\d+)$/);
|
184
|
+
return match ? match[1] : '0.0.0';
|
185
|
+
});
|
186
|
+
|
180
187
|
const getBuildFolderName = _.once(async () => {
|
181
188
|
const detoxVersion = getDetoxVersion();
|
182
189
|
const xcodeVersion = await execAsync('xcodebuild -version');
|
@@ -232,6 +239,7 @@ module.exports = {
|
|
232
239
|
getAvdHome,
|
233
240
|
getAvdDir,
|
234
241
|
getAvdManagerPath,
|
242
|
+
getAppleSimUtilsVersion,
|
235
243
|
getAndroidSdkManagerPath,
|
236
244
|
getGmsaasPath,
|
237
245
|
getDetoxVersion,
|
@@ -0,0 +1,18 @@
|
|
1
|
+
const tmp = require('tmp');
|
2
|
+
|
3
|
+
tmp.setGracefulCleanup();
|
4
|
+
|
5
|
+
/**
|
6
|
+
* Creates a temporary file path. If extension is provided, it will be appended to the path.
|
7
|
+
* @param {string} [extension] - Optional file extension to append to the temporary file path
|
8
|
+
* @returns {string} Path to a temporary file
|
9
|
+
*/
|
10
|
+
module.exports = function(extension) {
|
11
|
+
const _extension = (extension && extension.startsWith('.'))
|
12
|
+
? extension
|
13
|
+
: (extension && `.${extension}`);
|
14
|
+
|
15
|
+
return tmp.tmpNameSync({
|
16
|
+
template: `detox-${process.pid}-XXXXXX${_extension || ''}`,
|
17
|
+
});
|
18
|
+
};
|
@@ -1 +0,0 @@
|
|
1
|
-
dbe1858e2fa04f133bb976b0984f9464
|
@@ -1 +0,0 @@
|
|
1
|
-
f592be31cd02ff6bb6c80929c36def3f33a12473
|
@@ -1 +0,0 @@
|
|
1
|
-
a3093f21ec523b6fb8b0627582d0926a7c5b5e79d392af8e7c56b0a4fc63a4d7
|
@@ -1 +0,0 @@
|
|
1
|
-
1982c22f8098b52b4086c430c2691e5ac43fddde61dc98e44c9594e381bb50654eb98b71ad28322bfdaf634154c3335ab9a29bb60facea09961da436724ac0a5
|
@@ -1 +0,0 @@
|
|
1
|
-
c6f307ea5344738bf5a1d3515051abad
|
@@ -1 +0,0 @@
|
|
1
|
-
4170cd61d614306ea769c51c5ee014bc4944328a
|
@@ -1 +0,0 @@
|
|
1
|
-
6ecee3d1e30d164ba31da9c3446f22a31394c5d0f5a4d091b5d869c124517efb
|
@@ -1 +0,0 @@
|
|
1
|
-
ff58bdfc6ab51f6f018c121c1e68732dfa23238272e93d6aac2f9fe7c948eaa0bb2005d65df62af2e87c03f91d5965ad5e957fa69ba04e89d08bda24184f9e0f
|
/package/Detox-android/com/wix/detox/{20.39.0/detox-20.39.0.aar → 20.40.1/detox-20.40.1.aar}
RENAMED
File without changes
|
/package/Detox-android/com/wix/detox/{20.39.0/detox-20.39.0.aar.md5 → 20.40.1/detox-20.40.1.aar.md5}
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|