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.
Files changed (52) hide show
  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 → 20.0.2-breaking.new-global-lifecycle.0/detox-20.0.2-breaking.new-global-lifecycle.0-javadoc.jar} +0 -0
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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
  16. 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
  17. 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
  18. 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
  19. 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
  20. 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
  21. package/Detox-android/com/wix/detox/maven-metadata.xml +4 -4
  22. package/Detox-android/com/wix/detox/maven-metadata.xml.md5 +1 -1
  23. package/Detox-android/com/wix/detox/maven-metadata.xml.sha1 +1 -1
  24. package/Detox-android/com/wix/detox/maven-metadata.xml.sha256 +1 -1
  25. package/Detox-android/com/wix/detox/maven-metadata.xml.sha512 +1 -1
  26. package/Detox-ios-src.tbz +0 -0
  27. package/Detox-ios.tbz +0 -0
  28. package/index.d.ts +5 -0
  29. package/internals.d.ts +9 -2
  30. package/local-cli/test.test.js +19 -13
  31. package/local-cli/testCommand/TestRunnerCommand.js +6 -7
  32. package/package.json +2 -2
  33. package/runners/jest/testEnvironment/listeners/DetoxCoreListener.js +4 -8
  34. package/src/configuration/composeRunnerConfig.js +1 -0
  35. package/src/ipc/IPCClient.js +3 -2
  36. package/src/ipc/IPCServer.js +9 -2
  37. package/src/ipc/state.js +14 -1
  38. package/src/realms/DetoxContext.js +1 -1
  39. package/src/realms/DetoxPrimaryContext.js +2 -2
  40. package/src/realms/DetoxSecondaryContext.js +2 -2
  41. 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
  42. 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
  43. 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
  44. 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
  45. 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
  46. 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
  47. 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
  48. 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
  49. 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
  50. 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
  51. 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
  52. 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
+ 269c444435ef2d7f7267d243b84beefc38508b035df782e1a60eb25b3882a30d
@@ -0,0 +1 @@
1
+ f6d54f916e9b35f686f67a63fe072ffc0781ae7da27daf39a0dce5145fa75de5a240402f10d48df88710730fe40d847e87f7194d999359322e97f483f815496e
@@ -0,0 +1 @@
1
+ b21e2858bc218ca7402b48d759c6277fce832c73915c874b36d319fe4be2c2d7
@@ -0,0 +1 @@
1
+ ccbe51ebb24ad5b665f2d4a9d212701096e77f14d9cf04ac8ff6b2b9a452f8fdcf4b2319060bbdc6512b1cbc11846995af3955ac63bd6ea6b75f64c9dd399c24
@@ -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.1-breaking.new-global-lifecycle.0</version>
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
+ 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.1-breaking.new-global-lifecycle.0</latest>
7
- <release>20.0.1-breaking.new-global-lifecycle.0</release>
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.1-breaking.new-global-lifecycle.0</version>
9
+ <version>20.0.2-breaking.new-global-lifecycle.0</version>
10
10
  </versions>
11
- <lastUpdated>20220810074907</lastUpdated>
11
+ <lastUpdated>20220812072754</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- b2585c88d6aa7316562eefd1276b22b8
1
+ 66edf73eb985206d4b25467aaf398b5b
@@ -1 +1 @@
1
- a08cf502a9a0fd7b00c98d8ac7406f638489da61
1
+ f08d44468bdd0e4ae5efdcfe2ce7607e2b89b953
@@ -1 +1 @@
1
- 5afa6a8108d9375f9e5ede74faae8dd51d73ae25dab9e7915cfe11503c0f4a36
1
+ d51a7e909a7633013fa58ab30ca34ed484b2b67acbd7f0484c923f04bdeb2ec6
@@ -1 +1 @@
1
- 701eeb42080f3cc2cf38ddb06f0a1185633a958dac2325d7225fc5a3aefcd982def05877242c10cec1bd569d8ac2f600f7b8f0d85c4399ccd61fdeb9e0d8f6b2
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
- * Powers the "--retries <N>" of Detox CLI under the hood.
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
 
@@ -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.failedTestFiles = ['e2e/failing1.test.js', 'e2e/failing2.test.js'];
144
- context.session.failedTestFiles.splice = jest.fn(() => {
145
- context.session.failedTestFiles = ['e2e/failing2.test.js'];
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
- expect(cliCall(2).env.DETOX_RERUN_INDEX).toBe('2');
162
- expect(cliCall(2).fullCommand).not.toMatch(/DETOX_RERUN_INDEX/);
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.failedTestFiles = ['tests/failing.test.js'];
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
- // @ts-ignore
103
- const { failedTestFiles } = detox.session;
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._ = failedTestFiles.slice();
109
- this._env.DETOX_RERUN_INDEX = 1 + (this._env.DETOX_RERUN_INDEX || 0);
110
- failedTestFiles.splice(0, Infinity);
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.1-breaking.new-global-lifecycle.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": "b05792476b6eaedeb998b8625ecc78132aee361f"
186
+ "gitHead": "cda5a555ec90aaeafe8c557157270e36a2b27688"
187
187
  }
@@ -16,13 +16,8 @@ class DetoxCoreListener {
16
16
  }
17
17
 
18
18
  _getTestInvocations(test) {
19
- const { DETOX_RERUN_INDEX } = process.env;
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
- await detoxInternals.reportFailedTests([this._env.testPath]);
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
 
@@ -31,6 +31,7 @@ function composeRunnerConfig(opts) {
31
31
  inspectBrk: inspectBrkHookDefault,
32
32
  jest: {
33
33
  initTimeout: 300000,
34
+ retryAfterCircusRetries: false,
34
35
  reportSpecs: undefined,
35
36
  reportWorkerAssign: true,
36
37
  },
@@ -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() {
@@ -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
- this._sessionState.failedTestFiles.push(...testFilePaths);
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({ contexts = [], failedTestFiles = [], logFiles = [], ...baseOpts }) {
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
- cea1094d1b55bc0da25e7d50cb0ab6c46054e43bd7466923c9ec3306675d5bba
@@ -1 +0,0 @@
1
- 76e5f493a41f718bff430572aa2215675e5767827dc44f6f44dda78d64768e124c9b2078d4b1669537fa00e3f34b045eadc22168fb210cab2fbc976470431913
@@ -1 +0,0 @@
1
- 081bddb05b360d8ff578b2dafa006f38bf2e52dd7e0cd7b942764a4ecf391e86
@@ -1 +0,0 @@
1
- 616c8bf9cecb7f03331a785c32f1449672e8179c849e997e5ef9ab210d25a95e16efc618c1660757dc0da90b1e09fc90df6cf1e68a0f92a6c33f331f02d74ba2
@@ -1 +0,0 @@
1
- 4a844b7f2bf2ff0c50a742633c34e8e477e45bae50a2a0126ca2ebdbfd6ee213
@@ -1 +0,0 @@
1
- 22ccfbb1ddd925f4892bed13b9bbb5061f20a022155d0c8d79bc78c993e1d3f326c67560d92f25223d9de30d7e0432af4f09ed35db9f36282bf2b790c6d215fb