detox 20.40.0 → 20.40.2
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.40.0/detox-20.40.0-sources.jar → 20.40.2/detox-20.40.2-sources.jar} +0 -0
- package/Detox-android/com/wix/detox/20.40.2/detox-20.40.2-sources.jar.md5 +1 -0
- package/Detox-android/com/wix/detox/20.40.2/detox-20.40.2-sources.jar.sha1 +1 -0
- package/Detox-android/com/wix/detox/20.40.2/detox-20.40.2-sources.jar.sha256 +1 -0
- package/Detox-android/com/wix/detox/20.40.2/detox-20.40.2-sources.jar.sha512 +1 -0
- package/Detox-android/com/wix/detox/{20.40.0/detox-20.40.0.pom → 20.40.2/detox-20.40.2.pom} +1 -1
- package/Detox-android/com/wix/detox/20.40.2/detox-20.40.2.pom.md5 +1 -0
- package/Detox-android/com/wix/detox/20.40.2/detox-20.40.2.pom.sha1 +1 -0
- package/Detox-android/com/wix/detox/20.40.2/detox-20.40.2.pom.sha256 +1 -0
- package/Detox-android/com/wix/detox/20.40.2/detox-20.40.2.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/detox.d.ts +7 -1
- package/local-cli/utils/jestInternals.js +10 -2
- package/package.json +8 -8
- package/runners/jest/testEnvironment/index.js +8 -2
- package/runners/jest/testEnvironment/utils/{assertJestCircus27.js → validateAndPatchProjectConfig.js} +14 -5
- package/src/pilot/DetoxPilot.js +18 -2
- package/Detox-android/com/wix/detox/20.40.0/detox-20.40.0-sources.jar.md5 +0 -1
- package/Detox-android/com/wix/detox/20.40.0/detox-20.40.0-sources.jar.sha1 +0 -1
- package/Detox-android/com/wix/detox/20.40.0/detox-20.40.0-sources.jar.sha256 +0 -1
- package/Detox-android/com/wix/detox/20.40.0/detox-20.40.0-sources.jar.sha512 +0 -1
- package/Detox-android/com/wix/detox/20.40.0/detox-20.40.0.pom.md5 +0 -1
- package/Detox-android/com/wix/detox/20.40.0/detox-20.40.0.pom.sha1 +0 -1
- package/Detox-android/com/wix/detox/20.40.0/detox-20.40.0.pom.sha256 +0 -1
- package/Detox-android/com/wix/detox/20.40.0/detox-20.40.0.pom.sha512 +0 -1
- /package/Detox-android/com/wix/detox/{20.40.0/detox-20.40.0.aar → 20.40.2/detox-20.40.2.aar} +0 -0
- /package/Detox-android/com/wix/detox/{20.40.0/detox-20.40.0.aar.md5 → 20.40.2/detox-20.40.2.aar.md5} +0 -0
- /package/Detox-android/com/wix/detox/{20.40.0/detox-20.40.0.aar.sha1 → 20.40.2/detox-20.40.2.aar.sha1} +0 -0
- /package/Detox-android/com/wix/detox/{20.40.0/detox-20.40.0.aar.sha256 → 20.40.2/detox-20.40.2.aar.sha256} +0 -0
- /package/Detox-android/com/wix/detox/{20.40.0/detox-20.40.0.aar.sha512 → 20.40.2/detox-20.40.2.aar.sha512} +0 -0
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
cda086eff253bc511cfdbdbf813e3fc7
|
@@ -0,0 +1 @@
|
|
1
|
+
3aa9496fcf17c82fb56bdb6837cd70d2599069d4
|
@@ -0,0 +1 @@
|
|
1
|
+
1e4238e611bb9e23eb514288d44a3008ca2fe62e728f97d171415bd2b821fa59
|
@@ -0,0 +1 @@
|
|
1
|
+
20e0596b7f36dc247d54453883b3222f5914a9d84984372a31a95c585549f25f2c06648758246b1d841f8071f9a9a6d6599d3df47197e51295e30731a7670037
|
@@ -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.40.
|
6
|
+
<version>20.40.2</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
|
+
e1d9ee64c2de9b98c9c111b3fa696b1b
|
@@ -0,0 +1 @@
|
|
1
|
+
5115014d32913b8f02d21d5a95eceaf96cc395eb
|
@@ -0,0 +1 @@
|
|
1
|
+
96c19d1412a02f323ae2249d5415b9222b2cb5e539f9efd4ec971e55fddf5305
|
@@ -0,0 +1 @@
|
|
1
|
+
29e3a5bd9423e937788003192fcdb06392ad4acf036e01ddbcb117e8174f5c597b52ae84132b1ff3301b19933cbfb2efbdd83e944ff8690709faa215677cf98d
|
@@ -3,11 +3,11 @@
|
|
3
3
|
<groupId>com.wix</groupId>
|
4
4
|
<artifactId>detox</artifactId>
|
5
5
|
<versioning>
|
6
|
-
<latest>20.40.
|
7
|
-
<release>20.40.
|
6
|
+
<latest>20.40.2</latest>
|
7
|
+
<release>20.40.2</release>
|
8
8
|
<versions>
|
9
|
-
<version>20.40.
|
9
|
+
<version>20.40.2</version>
|
10
10
|
</versions>
|
11
|
-
<lastUpdated>
|
11
|
+
<lastUpdated>20250714113314</lastUpdated>
|
12
12
|
</versioning>
|
13
13
|
</metadata>
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
c8c68cc098d5ea979ebb5d232b745b3f
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
1a321c7835c033b9834bbac15e61ea6f78a36f49
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
95bde0b1e44cb7bc643535740ce36af75fab80a8f136e537f7691b081c70f2b3
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
232c04d61df93be67214a9c807e65ef80ae2972dc489d88a925473cfd54d9504521b326479a1b5d58d8b5f406226d24f84b699764854d72910b02d95385ffd67
|
package/Detox-ios-framework.tbz
CHANGED
Binary file
|
package/Detox-ios-src.tbz
CHANGED
Binary file
|
package/Detox-ios-xcuitest.tbz
CHANGED
Binary file
|
package/detox.d.ts
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
// * Dor Ben Baruch <https://github.com/Dor256>
|
10
10
|
|
11
11
|
import { BunyanDebugStreamOptions } from 'bunyan-debug-stream';
|
12
|
-
import type { Pilot, PromptHandler as _PromptHandler } from '@wix-pilot/core'
|
12
|
+
import type { Config as PilotConfig, Pilot, PromptHandler as _PromptHandler } from '@wix-pilot/core'
|
13
13
|
|
14
14
|
declare global {
|
15
15
|
namespace Detox {
|
@@ -1361,6 +1361,12 @@ declare global {
|
|
1361
1361
|
* @param promptHandler The prompt handler to use.
|
1362
1362
|
*/
|
1363
1363
|
init: (promptHandler: PromptHandler) => void;
|
1364
|
+
/**
|
1365
|
+
* Sets the default values for the Pilot configuration.
|
1366
|
+
* This method is not part of the public API and is subject to change.
|
1367
|
+
* @internal
|
1368
|
+
*/
|
1369
|
+
setDefaults(defaults: Partial<PilotConfig>): void;
|
1364
1370
|
}
|
1365
1371
|
|
1366
1372
|
type PromptHandler = _PromptHandler;
|
@@ -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.40.
|
4
|
+
"version": "20.40.2",
|
5
5
|
"bin": {
|
6
6
|
"detox": "local-cli/cli.js"
|
7
7
|
},
|
@@ -58,8 +58,8 @@
|
|
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
65
|
"react-native": "0.78.2",
|
@@ -68,8 +68,8 @@
|
|
68
68
|
"wtfnode": "^0.9.1"
|
69
69
|
},
|
70
70
|
"dependencies": {
|
71
|
-
"@wix-pilot/core": "^3.
|
72
|
-
"@wix-pilot/detox": "^1.0.
|
71
|
+
"@wix-pilot/core": "^3.4.1",
|
72
|
+
"@wix-pilot/detox": "^1.0.13",
|
73
73
|
"ajv": "^8.6.3",
|
74
74
|
"bunyan": "^1.8.12",
|
75
75
|
"bunyan-debug-stream": "^3.1.0",
|
@@ -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",
|
@@ -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": "4e6798ec5682611cc6b1c420c2561e2981d82d91"
|
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';
|
@@ -125,6 +125,12 @@ class DetoxCircusEnvironment extends WithEmitter(NodeEnvironment) {
|
|
125
125
|
await detox.installWorker(opts);
|
126
126
|
}
|
127
127
|
|
128
|
+
detox.worker.pilot.setDefaults({
|
129
|
+
testContext: {
|
130
|
+
getCurrentTestFilePath: () => path.resolve(this.testPath),
|
131
|
+
},
|
132
|
+
});
|
133
|
+
|
128
134
|
return detox.worker;
|
129
135
|
}
|
130
136
|
|
@@ -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
|
};
|
package/src/pilot/DetoxPilot.js
CHANGED
@@ -5,10 +5,18 @@ const detox = require('../..');
|
|
5
5
|
|
6
6
|
/** @type {Detox.PilotFacade} */
|
7
7
|
class DetoxPilot {
|
8
|
+
/**
|
9
|
+
* @param {Partial<import('@wix-pilot/core').Config>} [defaults] Arbitrary config defaults for the Pilot.
|
10
|
+
*/
|
11
|
+
constructor(defaults = {}) {
|
12
|
+
this._defaults = defaults;
|
13
|
+
}
|
14
|
+
|
8
15
|
init(promptHandler) {
|
9
|
-
|
16
|
+
this.pilot = new Pilot({
|
17
|
+
...this._defaults,
|
10
18
|
frameworkDriver: new DetoxFrameworkDriver(detox),
|
11
|
-
promptHandler: promptHandler
|
19
|
+
promptHandler: promptHandler,
|
12
20
|
});
|
13
21
|
}
|
14
22
|
|
@@ -44,6 +52,14 @@ class DetoxPilot {
|
|
44
52
|
isInitialized(){
|
45
53
|
return !!this.pilot;
|
46
54
|
}
|
55
|
+
|
56
|
+
/**
|
57
|
+
* @param {Partial<import('@wix-pilot/core').Config>} [defaults] Arbitrary config defaults for the Pilot.
|
58
|
+
* @internal
|
59
|
+
*/
|
60
|
+
setDefaults(defaults) {
|
61
|
+
Object.assign(this._defaults, defaults);
|
62
|
+
}
|
47
63
|
}
|
48
64
|
|
49
65
|
module.exports = DetoxPilot;
|
@@ -1 +0,0 @@
|
|
1
|
-
979a04ae79086d3aedcb79ae3ad77665
|
@@ -1 +0,0 @@
|
|
1
|
-
0bf2a44800742f2a45bab1072dd4e09a65d3504c
|
@@ -1 +0,0 @@
|
|
1
|
-
1e2cf7c9101332a67c7ebda6b3a9efb7e0a5b3002715149966c9ca904ff88974
|
@@ -1 +0,0 @@
|
|
1
|
-
1d194775b962f29d6a8e1a39472e398b0b96c577ae51e58b9d396fc3f9dad79074cbe31bf277360e74eff277500079fbe0303397e133d344dae2a58c65479724
|
@@ -1 +0,0 @@
|
|
1
|
-
fb9db06cd18e4b9daadb322a8f105a3f
|
@@ -1 +0,0 @@
|
|
1
|
-
1eb8a8b40ce354a2cd0aeab507bbaede730f6530
|
@@ -1 +0,0 @@
|
|
1
|
-
4d961549582781c365fc649c2d107855562c3b528bfb0ff2f225a8b51f99e614
|
@@ -1 +0,0 @@
|
|
1
|
-
df8bf51b83eec8945ba37c30b38f981e4bc4bb5c99203081f5a4c11e3717d526617453ab41618a9d25cb3bf60360d0dbd326c08b2febf1d919ca909c01acf66d
|
/package/Detox-android/com/wix/detox/{20.40.0/detox-20.40.0.aar → 20.40.2/detox-20.40.2.aar}
RENAMED
File without changes
|
/package/Detox-android/com/wix/detox/{20.40.0/detox-20.40.0.aar.md5 → 20.40.2/detox-20.40.2.aar.md5}
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|