detox 20.0.1-breaking.new-global-lifecycle.0 → 20.0.2-breaking.new-global-lifecycle.0
Sign up to get free protection for your applications and to get access to all the features.
- package/Detox-android/com/wix/detox/{20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0-javadoc.jar → 20.0.2-breaking.new-global-lifecycle.0/detox-20.0.2-breaking.new-global-lifecycle.0-javadoc.jar} +0 -0
- package/Detox-android/com/wix/detox/20.0.2-breaking.new-global-lifecycle.0/detox-20.0.2-breaking.new-global-lifecycle.0-javadoc.jar.md5 +1 -0
- package/Detox-android/com/wix/detox/20.0.2-breaking.new-global-lifecycle.0/detox-20.0.2-breaking.new-global-lifecycle.0-javadoc.jar.sha1 +1 -0
- package/Detox-android/com/wix/detox/20.0.2-breaking.new-global-lifecycle.0/detox-20.0.2-breaking.new-global-lifecycle.0-javadoc.jar.sha256 +1 -0
- package/Detox-android/com/wix/detox/20.0.2-breaking.new-global-lifecycle.0/detox-20.0.2-breaking.new-global-lifecycle.0-javadoc.jar.sha512 +1 -0
- package/Detox-android/com/wix/detox/{20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0-sources.jar → 20.0.2-breaking.new-global-lifecycle.0/detox-20.0.2-breaking.new-global-lifecycle.0-sources.jar} +0 -0
- package/Detox-android/com/wix/detox/20.0.2-breaking.new-global-lifecycle.0/detox-20.0.2-breaking.new-global-lifecycle.0-sources.jar.md5 +1 -0
- package/Detox-android/com/wix/detox/20.0.2-breaking.new-global-lifecycle.0/detox-20.0.2-breaking.new-global-lifecycle.0-sources.jar.sha1 +1 -0
- package/Detox-android/com/wix/detox/20.0.2-breaking.new-global-lifecycle.0/detox-20.0.2-breaking.new-global-lifecycle.0-sources.jar.sha256 +1 -0
- package/Detox-android/com/wix/detox/20.0.2-breaking.new-global-lifecycle.0/detox-20.0.2-breaking.new-global-lifecycle.0-sources.jar.sha512 +1 -0
- package/Detox-android/com/wix/detox/{20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0.aar → 20.0.2-breaking.new-global-lifecycle.0/detox-20.0.2-breaking.new-global-lifecycle.0.aar} +0 -0
- package/Detox-android/com/wix/detox/{20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0.aar.md5 → 20.0.2-breaking.new-global-lifecycle.0/detox-20.0.2-breaking.new-global-lifecycle.0.aar.md5} +0 -0
- package/Detox-android/com/wix/detox/{20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0.aar.sha1 → 20.0.2-breaking.new-global-lifecycle.0/detox-20.0.2-breaking.new-global-lifecycle.0.aar.sha1} +0 -0
- package/Detox-android/com/wix/detox/{20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0.aar.sha256 → 20.0.2-breaking.new-global-lifecycle.0/detox-20.0.2-breaking.new-global-lifecycle.0.aar.sha256} +0 -0
- package/Detox-android/com/wix/detox/{20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0.aar.sha512 → 20.0.2-breaking.new-global-lifecycle.0/detox-20.0.2-breaking.new-global-lifecycle.0.aar.sha512} +0 -0
- package/Detox-android/com/wix/detox/{20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0.pom → 20.0.2-breaking.new-global-lifecycle.0/detox-20.0.2-breaking.new-global-lifecycle.0.pom} +1 -1
- package/Detox-android/com/wix/detox/20.0.2-breaking.new-global-lifecycle.0/detox-20.0.2-breaking.new-global-lifecycle.0.pom.md5 +1 -0
- package/Detox-android/com/wix/detox/20.0.2-breaking.new-global-lifecycle.0/detox-20.0.2-breaking.new-global-lifecycle.0.pom.sha1 +1 -0
- package/Detox-android/com/wix/detox/20.0.2-breaking.new-global-lifecycle.0/detox-20.0.2-breaking.new-global-lifecycle.0.pom.sha256 +1 -0
- package/Detox-android/com/wix/detox/20.0.2-breaking.new-global-lifecycle.0/detox-20.0.2-breaking.new-global-lifecycle.0.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-src.tbz +0 -0
- package/Detox-ios.tbz +0 -0
- package/index.d.ts +5 -0
- package/internals.d.ts +9 -2
- package/local-cli/test.test.js +19 -13
- package/local-cli/testCommand/TestRunnerCommand.js +6 -7
- package/package.json +2 -2
- package/runners/jest/testEnvironment/listeners/DetoxCoreListener.js +4 -8
- package/src/configuration/composeRunnerConfig.js +1 -0
- package/src/ipc/IPCClient.js +3 -2
- package/src/ipc/IPCServer.js +9 -2
- package/src/ipc/state.js +14 -1
- package/src/realms/DetoxContext.js +1 -1
- package/src/realms/DetoxPrimaryContext.js +2 -2
- package/src/realms/DetoxSecondaryContext.js +2 -2
- package/Detox-android/com/wix/detox/20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0-javadoc.jar.md5 +0 -1
- package/Detox-android/com/wix/detox/20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0-javadoc.jar.sha1 +0 -1
- package/Detox-android/com/wix/detox/20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0-javadoc.jar.sha256 +0 -1
- package/Detox-android/com/wix/detox/20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0-javadoc.jar.sha512 +0 -1
- package/Detox-android/com/wix/detox/20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0-sources.jar.md5 +0 -1
- package/Detox-android/com/wix/detox/20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0-sources.jar.sha1 +0 -1
- package/Detox-android/com/wix/detox/20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0-sources.jar.sha256 +0 -1
- package/Detox-android/com/wix/detox/20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0-sources.jar.sha512 +0 -1
- package/Detox-android/com/wix/detox/20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0.pom.md5 +0 -1
- package/Detox-android/com/wix/detox/20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0.pom.sha1 +0 -1
- package/Detox-android/com/wix/detox/20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0.pom.sha256 +0 -1
- package/Detox-android/com/wix/detox/20.0.1-breaking.new-global-lifecycle.0/detox-20.0.1-breaking.new-global-lifecycle.0.pom.sha512 +0 -1
@@ -0,0 +1 @@
|
|
1
|
+
91f1e6b3345b09b266fc6b1f4387d693
|
@@ -0,0 +1 @@
|
|
1
|
+
a2d07ea0b1bd401ae5cd41fc9f07bbbfb4fee96f
|
@@ -0,0 +1 @@
|
|
1
|
+
269c444435ef2d7f7267d243b84beefc38508b035df782e1a60eb25b3882a30d
|
@@ -0,0 +1 @@
|
|
1
|
+
f6d54f916e9b35f686f67a63fe072ffc0781ae7da27daf39a0dce5145fa75de5a240402f10d48df88710730fe40d847e87f7194d999359322e97f483f815496e
|
@@ -0,0 +1 @@
|
|
1
|
+
613e288168a5ebe791c1b253a0aac51c
|
@@ -0,0 +1 @@
|
|
1
|
+
112918ac48c1f2763d5f0fddfa8aba44a35a0c57
|
@@ -0,0 +1 @@
|
|
1
|
+
b21e2858bc218ca7402b48d759c6277fce832c73915c874b36d319fe4be2c2d7
|
@@ -0,0 +1 @@
|
|
1
|
+
ccbe51ebb24ad5b665f2d4a9d212701096e77f14d9cf04ac8ff6b2b9a452f8fdcf4b2319060bbdc6512b1cbc11846995af3955ac63bd6ea6b75f64c9dd399c24
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -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.0.
|
6
|
+
<version>20.0.2-breaking.new-global-lifecycle.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
|
+
e68998c30e0c3aefe7cdc34b641fd5e2
|
@@ -0,0 +1 @@
|
|
1
|
+
4afd3a2fcdb10c26d6a56a9b8f5c64a05b0152b5
|
@@ -0,0 +1 @@
|
|
1
|
+
23b6942ae16e58bb84494f4080b72ef018817833f5a3af6971844ca7d35854ba
|
@@ -0,0 +1 @@
|
|
1
|
+
461b3793c3c8fe77b4d7c1494716ae1ce17bf133c99b637f639f176e52c72fdfcf1a2621ce18136f151aa50798007cc68e0eee46a87674a0a22e68534b5f43f6
|
@@ -3,11 +3,11 @@
|
|
3
3
|
<groupId>com.wix</groupId>
|
4
4
|
<artifactId>detox</artifactId>
|
5
5
|
<versioning>
|
6
|
-
<latest>20.0.
|
7
|
-
<release>20.0.
|
6
|
+
<latest>20.0.2-breaking.new-global-lifecycle.0</latest>
|
7
|
+
<release>20.0.2-breaking.new-global-lifecycle.0</release>
|
8
8
|
<versions>
|
9
|
-
<version>20.0.
|
9
|
+
<version>20.0.2-breaking.new-global-lifecycle.0</version>
|
10
10
|
</versions>
|
11
|
-
<lastUpdated>
|
11
|
+
<lastUpdated>20220812072754</lastUpdated>
|
12
12
|
</versioning>
|
13
13
|
</metadata>
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
66edf73eb985206d4b25467aaf398b5b
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
f08d44468bdd0e4ae5efdcfe2ce7607e2b89b953
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
d51a7e909a7633013fa58ab30ca34ed484b2b67acbd7f0484c923f04bdeb2ec6
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
04a047b23b9ed5229c4f124c08719bb7e1b468cc5fab450a9403adfd7f7c109ebae29182f6c3763e9b7915c4ff60c5971ea8f8417e8d5b8b7877961310c1f484
|
package/Detox-ios-src.tbz
CHANGED
Binary file
|
package/Detox-ios.tbz
CHANGED
Binary file
|
package/index.d.ts
CHANGED
@@ -141,6 +141,11 @@ declare global {
|
|
141
141
|
* Device init timeout
|
142
142
|
*/
|
143
143
|
initTimeout?: number | undefined;
|
144
|
+
/**
|
145
|
+
* Insist on CLI-based retry mechanism even when the failed tests have been handled
|
146
|
+
* by jest.retryTimes(n) mechanism from Jest Circus.
|
147
|
+
*/
|
148
|
+
retryAfterCircusRetries?: boolean;
|
144
149
|
reportSpecs?: boolean | undefined;
|
145
150
|
reportWorkerAssign?: boolean | undefined;
|
146
151
|
};
|
package/internals.d.ts
CHANGED
@@ -47,9 +47,14 @@ declare global {
|
|
47
47
|
onRunFinish(event: unknown): Promise<void>;
|
48
48
|
|
49
49
|
/**
|
50
|
-
*
|
50
|
+
* Reports to Detox CLI about failed tests that could have been re-run if
|
51
|
+
* {@link Detox.DetoxTestRunnerConfig#retries} is set to a non-zero.
|
52
|
+
*
|
53
|
+
* @param testFilePaths array of failed test files' paths
|
54
|
+
* @param permanent whether the failure is permanent, and the tests
|
55
|
+
* should not be re-run.
|
51
56
|
*/
|
52
|
-
reportFailedTests(testFilePaths: string[]): Promise<void>;
|
57
|
+
reportFailedTests(testFilePaths: string[], permanent?: boolean): Promise<void>;
|
53
58
|
// endregion
|
54
59
|
|
55
60
|
readonly config: RuntimeConfig;
|
@@ -74,6 +79,8 @@ declare global {
|
|
74
79
|
|
75
80
|
type SessionState = Readonly<{
|
76
81
|
failedTestFiles: string[];
|
82
|
+
testFilesToRetry: string[];
|
83
|
+
testSessionIndex: number;
|
77
84
|
workersCount: number;
|
78
85
|
}>;
|
79
86
|
|
package/local-cli/test.test.js
CHANGED
@@ -140,26 +140,32 @@ describe('CLI', () => {
|
|
140
140
|
|
141
141
|
test.each([['-R'], ['--retries']])('%s <value> should execute unsuccessful run N extra times', async (__retries) => {
|
142
142
|
const context = require('../internals');
|
143
|
-
context.session.
|
144
|
-
context.session.
|
145
|
-
|
146
|
-
|
143
|
+
context.session.testFilesToRetry = ['e2e/failing1.test.js', 'e2e/failing2.test.js'];
|
144
|
+
context.session.testFilesToRetry.splice = jest.fn()
|
145
|
+
.mockImplementationOnce(() => ['e2e/failing1.test.js', 'e2e/failing2.test.js'])
|
146
|
+
.mockImplementationOnce(() => ['e2e/failing2.test.js']);
|
147
147
|
|
148
148
|
mockExitCode(1);
|
149
149
|
|
150
150
|
await run(__retries, 2).catch(_.noop);
|
151
151
|
|
152
|
-
expect(cliCall(0).env).not.toHaveProperty('DETOX_RERUN_INDEX');
|
153
152
|
expect(cliCall(0).argv).toEqual([expect.stringMatching(/executable$/), '--config', 'e2e/config.json']);
|
154
|
-
expect(cliCall(0).fullCommand).not.toMatch(/DETOX_RERUN_INDEX/);
|
155
|
-
|
156
|
-
expect(cliCall(1).env.DETOX_RERUN_INDEX).toBe('1');
|
157
153
|
expect(cliCall(1).argv).toEqual([expect.stringMatching(/executable$/), '--config', 'e2e/config.json', 'e2e/failing1.test.js', 'e2e/failing2.test.js']);
|
158
|
-
expect(cliCall(1).fullCommand).not.toMatch(/DETOX_RERUN_INDEX/);
|
159
|
-
|
160
154
|
expect(cliCall(2).argv).toEqual([expect.stringMatching(/executable$/), '--config', 'e2e/config.json', 'e2e/failing2.test.js']);
|
161
|
-
|
162
|
-
|
155
|
+
});
|
156
|
+
|
157
|
+
test.each([['-R'], ['--retries']])('%s <value> should bail if has permanently failed tests', async (__retries) => {
|
158
|
+
const context = require('../internals');
|
159
|
+
context.session.failedTestFiles = ['e2e/failing1.test.js'];
|
160
|
+
context.session.testFilesToRetry = ['e2e/failing2.test.js'];
|
161
|
+
|
162
|
+
mockExitCode(1);
|
163
|
+
|
164
|
+
await run(__retries, 2).catch(_.noop);
|
165
|
+
|
166
|
+
expect(cliCall(0).env).not.toHaveProperty('DETOX_RERUN_INDEX');
|
167
|
+
expect(cliCall(0).argv).toEqual([expect.stringMatching(/executable$/), '--config', 'e2e/config.json']);
|
168
|
+
expect(cliCall(1)).toBe(null);
|
163
169
|
});
|
164
170
|
|
165
171
|
test.each([['-R'], ['--retries']])('%s <value> should not restart test runner if there are no failing tests paths', async (__retries) => {
|
@@ -172,7 +178,7 @@ describe('CLI', () => {
|
|
172
178
|
|
173
179
|
test.each([['-R'], ['--retries']])('%s <value> should retain -- <...explicitPassthroughArgs>', async (__retries) => {
|
174
180
|
const context = require('../internals');
|
175
|
-
context.session.
|
181
|
+
context.session.testFilesToRetry = ['tests/failing.test.js'];
|
176
182
|
|
177
183
|
mockExitCode(1);
|
178
184
|
|
@@ -88,7 +88,7 @@ class TestRunnerCommand {
|
|
88
88
|
try {
|
89
89
|
if (launchError) {
|
90
90
|
const list = this._argv._.map((file, index) => ` ${index + 1}. ${file}`).join('\n');
|
91
|
-
detox.log.error(
|
91
|
+
detox.log.error({ event: 'RETRY_RUN' },
|
92
92
|
`There were failing tests in the following files:\n${list}\n\n` +
|
93
93
|
'Detox CLI is going to restart the test runner with those files...\n'
|
94
94
|
);
|
@@ -99,15 +99,14 @@ class TestRunnerCommand {
|
|
99
99
|
} catch (e) {
|
100
100
|
launchError = e;
|
101
101
|
|
102
|
-
|
103
|
-
|
104
|
-
if (_.isEmpty(failedTestFiles)) {
|
102
|
+
const { failedTestFiles, testFilesToRetry } = detox.session;
|
103
|
+
if (!_.isEmpty(failedTestFiles) || _.isEmpty(testFilesToRetry)) {
|
105
104
|
throw e;
|
106
105
|
}
|
107
106
|
|
108
|
-
this._argv._ =
|
109
|
-
|
110
|
-
|
107
|
+
this._argv._ = testFilesToRetry.splice(0, Infinity);
|
108
|
+
// @ts-ignore
|
109
|
+
detox.session.testSessionIndex++; // it is always a primary context, so we can update it
|
111
110
|
}
|
112
111
|
} while (launchError && --runsLeft > 0);
|
113
112
|
|
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.0.
|
4
|
+
"version": "20.0.2-breaking.new-global-lifecycle.0",
|
5
5
|
"bin": {
|
6
6
|
"detox": "local-cli/cli.js"
|
7
7
|
},
|
@@ -183,5 +183,5 @@
|
|
183
183
|
}
|
184
184
|
}
|
185
185
|
},
|
186
|
-
"gitHead": "
|
186
|
+
"gitHead": "cda5a555ec90aaeafe8c557157270e36a2b27688"
|
187
187
|
}
|
@@ -16,13 +16,8 @@ class DetoxCoreListener {
|
|
16
16
|
}
|
17
17
|
|
18
18
|
_getTestInvocations(test) {
|
19
|
-
const {
|
20
|
-
|
21
|
-
if (!isNaN(DETOX_RERUN_INDEX)) {
|
22
|
-
return Number(DETOX_RERUN_INDEX) * this._testRunTimes + test.invocations;
|
23
|
-
} else {
|
24
|
-
return test.invocations;
|
25
|
-
}
|
19
|
+
const { testSessionIndex } = detoxInternals.session;
|
20
|
+
return testSessionIndex * this._testRunTimes + test.invocations;
|
26
21
|
}
|
27
22
|
|
28
23
|
async setup() {
|
@@ -103,7 +98,8 @@ class DetoxCoreListener {
|
|
103
98
|
|
104
99
|
async run_finish(_event, state) {
|
105
100
|
if (this._hasFailedTests(state.rootDescribeBlock)) {
|
106
|
-
|
101
|
+
const handledByJestCircus = this._testRunTimes > 1 && !detoxInternals.config.runnerConfig.jest.retryAfterCircusRetries;
|
102
|
+
await detoxInternals.reportFailedTests([this._env.testPath], handledByJestCircus);
|
107
103
|
}
|
108
104
|
}
|
109
105
|
|
package/src/ipc/IPCClient.js
CHANGED
@@ -53,9 +53,10 @@ class IPCClient {
|
|
53
53
|
|
54
54
|
/**
|
55
55
|
* @param {string[]} testFilePaths
|
56
|
+
* @param {Boolean} permanent
|
56
57
|
*/
|
57
|
-
async reportFailedTests(testFilePaths) {
|
58
|
-
await this._emit('failedTests', { testFilePaths });
|
58
|
+
async reportFailedTests(testFilePaths, permanent) {
|
59
|
+
await this._emit('failedTests', { testFilePaths, permanent });
|
59
60
|
}
|
60
61
|
|
61
62
|
async _connectToServer() {
|
package/src/ipc/IPCServer.js
CHANGED
@@ -57,6 +57,8 @@ class IPCServer {
|
|
57
57
|
|
58
58
|
this._ipc.server.emit(socket, 'registerContextDone', {
|
59
59
|
failedTestFiles: this._sessionState.failedTestFiles,
|
60
|
+
testFilesToRetry: this._sessionState.testFilesToRetry,
|
61
|
+
testSessionIndex: this._sessionState.testSessionIndex,
|
60
62
|
});
|
61
63
|
}
|
62
64
|
|
@@ -71,8 +73,12 @@ class IPCServer {
|
|
71
73
|
}
|
72
74
|
}
|
73
75
|
|
74
|
-
onFailedTests({ testFilePaths }, socket) {
|
75
|
-
|
76
|
+
onFailedTests({ testFilePaths, permanent }, socket = null) {
|
77
|
+
if (permanent) {
|
78
|
+
this._sessionState.failedTestFiles.push(...testFilePaths);
|
79
|
+
} else {
|
80
|
+
this._sessionState.testFilesToRetry.push(...testFilePaths);
|
81
|
+
}
|
76
82
|
|
77
83
|
if (socket) {
|
78
84
|
this._ipc.server.emit(socket, 'failedTestsDone', {});
|
@@ -80,6 +86,7 @@ class IPCServer {
|
|
80
86
|
|
81
87
|
this._ipc.server.broadcast('sessionStateUpdate', {
|
82
88
|
failedTestFiles: this._sessionState.failedTestFiles,
|
89
|
+
testFilesToRetry: this._sessionState.testFilesToRetry,
|
83
90
|
});
|
84
91
|
}
|
85
92
|
}
|
package/src/ipc/state.js
CHANGED
@@ -44,6 +44,8 @@ class SecondarySessionState extends SessionState {
|
|
44
44
|
detoxConfig = null,
|
45
45
|
detoxIPCServer = '',
|
46
46
|
failedTestFiles = [],
|
47
|
+
testFilesToRetry = [],
|
48
|
+
testSessionIndex = 0,
|
47
49
|
workerId = undefined,
|
48
50
|
workersCount = 0
|
49
51
|
}) {
|
@@ -54,18 +56,29 @@ class SecondarySessionState extends SessionState {
|
|
54
56
|
this.detoxConfig = detoxConfig;
|
55
57
|
this.detoxIPCServer = detoxIPCServer;
|
56
58
|
this.failedTestFiles = failedTestFiles;
|
59
|
+
this.testFilesToRetry = testFilesToRetry;
|
60
|
+
this.testSessionIndex = testSessionIndex;
|
57
61
|
this.workerId = workerId;
|
58
62
|
this.workersCount = workersCount;
|
59
63
|
}
|
60
64
|
}
|
61
65
|
|
62
66
|
class PrimarySessionState extends SecondarySessionState {
|
63
|
-
constructor({
|
67
|
+
constructor({
|
68
|
+
contexts = [],
|
69
|
+
logFiles = [],
|
70
|
+
failedTestFiles = [],
|
71
|
+
testFilesToRetry = [],
|
72
|
+
testSessionIndex = 0,
|
73
|
+
...baseOpts
|
74
|
+
}) {
|
64
75
|
super(baseOpts);
|
65
76
|
|
66
77
|
this.contexts = contexts;
|
67
78
|
this.failedTestFiles = failedTestFiles;
|
68
79
|
this.logFiles = logFiles;
|
80
|
+
this.testSessionIndex = testSessionIndex;
|
81
|
+
this.testFilesToRetry = testFilesToRetry;
|
69
82
|
}
|
70
83
|
}
|
71
84
|
|
@@ -93,7 +93,7 @@ class DetoxContext {
|
|
93
93
|
[symbols.config] = funpermaproxy(() => this[symbols.session].detoxConfig);
|
94
94
|
[symbols.session] = funpermaproxy(() => this[$sessionState]);
|
95
95
|
/** @abstract */
|
96
|
-
[symbols.reportFailedTests](_testFilePaths) {}
|
96
|
+
[symbols.reportFailedTests](_testFilePaths, _permanent) {}
|
97
97
|
/**
|
98
98
|
* @abstract
|
99
99
|
* @param {Partial<DetoxInternals.DetoxGlobalSetupOptions>} _opts
|
@@ -34,9 +34,9 @@ class DetoxPrimaryContext extends DetoxContext {
|
|
34
34
|
}
|
35
35
|
|
36
36
|
//#region Internal members
|
37
|
-
async [symbols.reportFailedTests](testFilePaths) {
|
37
|
+
async [symbols.reportFailedTests](testFilePaths, permanent = false) {
|
38
38
|
if (this[_ipcServer]) {
|
39
|
-
this[_ipcServer].onFailedTests({ testFilePaths });
|
39
|
+
this[_ipcServer].onFailedTests({ testFilePaths, permanent });
|
40
40
|
}
|
41
41
|
}
|
42
42
|
|
@@ -21,9 +21,9 @@ class DetoxSecondaryContext extends DetoxContext {
|
|
21
21
|
}
|
22
22
|
|
23
23
|
//#region Internal members
|
24
|
-
async [symbols.reportFailedTests](testFilePaths) {
|
24
|
+
async [symbols.reportFailedTests](testFilePaths, permanent = false) {
|
25
25
|
if (this[_ipcClient]) {
|
26
|
-
await this[_ipcClient].reportFailedTests(testFilePaths);
|
26
|
+
await this[_ipcClient].reportFailedTests(testFilePaths, permanent);
|
27
27
|
} else {
|
28
28
|
throw new DetoxInternalError('Detected an attempt to report failed tests using a non-initialized context.');
|
29
29
|
}
|
@@ -1 +0,0 @@
|
|
1
|
-
937f993292c31bbc63081e5948da3f98
|
@@ -1 +0,0 @@
|
|
1
|
-
1241bd41fd22394ae5188a93cbfc937e3d7e1a7f
|
@@ -1 +0,0 @@
|
|
1
|
-
cea1094d1b55bc0da25e7d50cb0ab6c46054e43bd7466923c9ec3306675d5bba
|
@@ -1 +0,0 @@
|
|
1
|
-
76e5f493a41f718bff430572aa2215675e5767827dc44f6f44dda78d64768e124c9b2078d4b1669537fa00e3f34b045eadc22168fb210cab2fbc976470431913
|
@@ -1 +0,0 @@
|
|
1
|
-
b9a7e18eb5db9c29387800d177dc855e
|
@@ -1 +0,0 @@
|
|
1
|
-
e315ec89f403a1b0c2261c72bb6a614752aea946
|
@@ -1 +0,0 @@
|
|
1
|
-
081bddb05b360d8ff578b2dafa006f38bf2e52dd7e0cd7b942764a4ecf391e86
|
@@ -1 +0,0 @@
|
|
1
|
-
616c8bf9cecb7f03331a785c32f1449672e8179c849e997e5ef9ab210d25a95e16efc618c1660757dc0da90b1e09fc90df6cf1e68a0f92a6c33f331f02d74ba2
|
@@ -1 +0,0 @@
|
|
1
|
-
409fa95566cf0ec6633fce554ae87b8b
|
@@ -1 +0,0 @@
|
|
1
|
-
8086a11b6780db7eb68ab43d29e7680b01e72479
|
@@ -1 +0,0 @@
|
|
1
|
-
4a844b7f2bf2ff0c50a742633c34e8e477e45bae50a2a0126ca2ebdbfd6ee213
|
@@ -1 +0,0 @@
|
|
1
|
-
22ccfbb1ddd925f4892bed13b9bbb5061f20a022155d0c8d79bc78c993e1d3f326c67560d92f25223d9de30d7e0432af4f09ed35db9f36282bf2b790c6d215fb
|