@testim/testim-cli 3.205.0 → 3.206.0

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.
@@ -55,6 +55,7 @@ class FeatureFlagsService {
55
55
  highSpeedMode: new LabFeatureFlag(),
56
56
  usePortedHtml5DragDrop: new Rox.Flag(),
57
57
  applitoolsNewIntegration: new Rox.Flag(),
58
+ testNamesToBeforeSuiteHook: new Rox.Flag(),
58
59
  };
59
60
  Rox.register('default', this.flags);
60
61
  }
@@ -2552,9 +2552,9 @@
2552
2552
  },
2553
2553
  "dependencies": {
2554
2554
  "@types/node": {
2555
- "version": "16.11.10",
2556
- "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz",
2557
- "integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA=="
2555
+ "version": "16.11.11",
2556
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.11.tgz",
2557
+ "integrity": "sha512-KB0sixD67CeecHC33MYn+eYARkqTheIRNuu97y2XMjR7Wu3XibO1vaY6VBV6O/a89SPI81cEUIYT87UqUWlZNw=="
2558
2558
  },
2559
2559
  "mkdirp": {
2560
2560
  "version": "0.5.5",
@@ -2758,9 +2758,9 @@
2758
2758
  "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
2759
2759
  },
2760
2760
  "color-string": {
2761
- "version": "1.7.4",
2762
- "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.7.4.tgz",
2763
- "integrity": "sha512-nVdUvPVgZMpRQad5dcsCMOSB5BXLljklTiaxS6ehhKxDsAI5sD7k5VmFuBt1y3Rlym8uulc/ANUN/bMWtBu6Sg==",
2761
+ "version": "1.8.2",
2762
+ "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.8.2.tgz",
2763
+ "integrity": "sha512-w5ZkKRdLsc5NOYsmnpS2DpyRW71npwZGwbRpLrJTuqjfTs2Bhrba7UiV59IX9siBlCPl2pne5NtiwnVWUzvYFA==",
2764
2764
  "requires": {
2765
2765
  "color-name": "^1.0.0",
2766
2766
  "simple-swizzle": "^0.2.2"
@@ -3554,9 +3554,9 @@
3554
3554
  "integrity": "sha512-GJCAeDBKfREgkBtgrYSf9hQy9kTb3helv0zGdzqhM7iAkW8FA/ZF97VQDbwFiwIT8MQLLOe5VlPZOEvZAqtUAQ=="
3555
3555
  },
3556
3556
  "electron-to-chromium": {
3557
- "version": "1.4.4",
3558
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.4.tgz",
3559
- "integrity": "sha512-teHtgwcmVcL46jlFvAaqjyiTLWuMrUQO1JqV303JKB4ysXG6m8fXSFhbjal9st0r9mNskI22AraJZorb1VcLVg==",
3557
+ "version": "1.4.7",
3558
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.7.tgz",
3559
+ "integrity": "sha512-UPy2MsQw1OdcbxR7fvwWZH/rXcv+V26+uvQVHx0fGa1kqRfydtfOw+NMGAvZJ63hyaH4aEBxbhSEtqbpliSNWA==",
3560
3560
  "dev": true
3561
3561
  },
3562
3562
  "emoji-regex": {
@@ -6116,9 +6116,9 @@
6116
6116
  "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w=="
6117
6117
  },
6118
6118
  "json-schema": {
6119
- "version": "0.2.3",
6120
- "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
6121
- "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
6119
+ "version": "0.4.0",
6120
+ "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz",
6121
+ "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA=="
6122
6122
  },
6123
6123
  "json-schema-traverse": {
6124
6124
  "version": "0.4.1",
@@ -6178,13 +6178,13 @@
6178
6178
  }
6179
6179
  },
6180
6180
  "jsprim": {
6181
- "version": "1.4.1",
6182
- "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
6183
- "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
6181
+ "version": "1.4.2",
6182
+ "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz",
6183
+ "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==",
6184
6184
  "requires": {
6185
6185
  "assert-plus": "1.0.0",
6186
6186
  "extsprintf": "1.3.0",
6187
- "json-schema": "0.2.3",
6187
+ "json-schema": "0.4.0",
6188
6188
  "verror": "1.10.0"
6189
6189
  }
6190
6190
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testim/testim-cli",
3
- "version": "3.205.0",
3
+ "version": "3.206.0",
4
4
  "description": "Command line interface for running Testing on your CI",
5
5
  "author": "Oren Rubin",
6
6
  "contributors": [{
@@ -178,10 +178,11 @@ class TestPlanRunner {
178
178
  const configName = configs && configs.length === 1 ? configs[0] : null;
179
179
 
180
180
  const isCodeMode = tpOptions.files.length > 0;
181
+ const testNames = tpOptions.lightweightMode && tpOptions.lightweightMode.onlyTestIdsNoSuite ? [] : _.concat(beforeTests, tests, afterTests).map(test => test.name);
181
182
 
182
183
  const testListInfoPromise = tpOptions.lightweightMode && tpOptions.lightweightMode.onlyTestIdsNoSuite ?
183
184
  { beforeTests, tests, afterTests } :
184
- testStatus.executionStart(executionId, projectId, this.startTime, testPlanName);
185
+ testStatus.executionStart(executionId, projectId, this.startTime, testPlanName, testNames);
185
186
  let childTestResults;
186
187
  if (isCodeMode) {
187
188
  childTestResults = Bluebird.try(async () => {
package/testRunStatus.js CHANGED
@@ -15,6 +15,7 @@ const _ = require('lodash');
15
15
  const { registerExitHook } = require('./processHandler');
16
16
  const { calculateCoverage } = require('./coverage/jsCoverage');
17
17
  const featureAvailabilityService = require('./commons/featureAvailabilityService');
18
+ const featureFlags = require('./commons/featureFlags');
18
19
  const { mapFilesToLocalDrive } = require('./services/localRCASaver');
19
20
 
20
21
  const gitBranch = utils.getEnvironmentGitBranch();
@@ -333,7 +334,7 @@ RunStatus.prototype.calcTestRunStatus = function () {
333
334
  }, {});
334
335
  };
335
336
 
336
- RunStatus.prototype.executionStart = function (executionId, projectId, startTime, testPlanName) {
337
+ RunStatus.prototype.executionStart = function (executionId, projectId, startTime, testPlanName, testNames) {
337
338
  logger.info('execution started', { executionId });
338
339
  const { options } = this;
339
340
  const { remoteRunId, projectData } = options;
@@ -352,8 +353,11 @@ RunStatus.prototype.executionStart = function (executionId, projectId, startTime
352
353
  ]));
353
354
 
354
355
  this.startTime = startTime || Date.now();
355
-
356
- return runHook(options.beforeSuite, { projectId, executionId })
356
+ const runHooksProps = { projectId, executionId };
357
+ if (featureFlags.flags.testNamesToBeforeSuiteHook.isEnabled()) {
358
+ runHooksProps.testNames = testNames;
359
+ }
360
+ return runHook(options.beforeSuite, runHooksProps)
357
361
  .then(params => {
358
362
  const overrideTestDataBuilder = new OverrideTestDataBuilder(params, _.cloneDeep(this.testInfoList), projectId);
359
363
  this.testInfoList = overrideTestDataBuilder.overrideTestData();