@testim/testim-cli 3.214.0 → 3.215.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.
@@ -3501,9 +3501,9 @@
3501
3501
  "integrity": "sha512-GJCAeDBKfREgkBtgrYSf9hQy9kTb3helv0zGdzqhM7iAkW8FA/ZF97VQDbwFiwIT8MQLLOe5VlPZOEvZAqtUAQ=="
3502
3502
  },
3503
3503
  "electron-to-chromium": {
3504
- "version": "1.4.29",
3505
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.29.tgz",
3506
- "integrity": "sha512-N2Jbwxo5Rum8G2YXeUxycs1sv4Qme/ry71HG73bv8BvZl+I/4JtRgK/En+ST/Wh/yF1fqvVCY4jZBgMxnhjtBA==",
3504
+ "version": "1.4.30",
3505
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.30.tgz",
3506
+ "integrity": "sha512-609z9sIMxDHg+TcR/VB3MXwH+uwtrYyeAwWc/orhnr90ixs6WVGSrt85CDLGUdNnLqCA7liv426V20EecjvflQ==",
3507
3507
  "dev": true
3508
3508
  },
3509
3509
  "emoji-regex": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testim/testim-cli",
3
- "version": "3.214.0",
3
+ "version": "3.215.0",
4
4
  "description": "Command line interface for running Testing on your CI",
5
5
  "author": "Oren Rubin",
6
6
  "contributors": [{
package/runOptions.js CHANGED
@@ -17,6 +17,7 @@ const utils = require('./utils');
17
17
  const runOptionsAgentFlow = require('./runOptionsAgentFlow');
18
18
  const runOptionsUtils = require('./runOptionsUtils');
19
19
  const localRunnerCache = require('./commons/runnerFileCache');
20
+ const chalk = require('chalk');
20
21
 
21
22
  const camelizeHyphenValues = (prop) => prop.replace(/-([a-z])/g, (m, w) => w.toUpperCase());
22
23
 
@@ -109,6 +110,10 @@ const printUsage = () => {
109
110
  return line.includes('--exit-code-ignore-failing-tests');
110
111
  }
111
112
 
113
+ function isDeprecatedHighSpeed(line) {
114
+ return line.includes('--high-speed'); // high speed mode was renamed to turbo mode
115
+ }
116
+
112
117
  program.help((txt) => {
113
118
  const lines = txt.split('\n');
114
119
  return lines
@@ -123,12 +128,18 @@ const printUsage = () => {
123
128
  !isUserId(ln) &&
124
129
  !isWebdriverTimeout(ln) &&
125
130
  !isSaveRCALocally(ln) &&
126
- !isExitCodeIgnoreFailingTests(ln)
131
+ !isExitCodeIgnoreFailingTests(ln) &&
132
+ !isDeprecatedHighSpeed(ln)
127
133
  )
128
134
  .join('\n');
129
135
  });
130
136
  };
131
137
 
138
+ const printDeprecationWarning = (deprecatedUsage, newUsage) => {
139
+ const newUsageString = newUsage ? `Please use ${newUsage} instead.` : '';
140
+ console.log(chalk.yellow(`\nWARNING: ${deprecatedUsage} is deprecated. ${newUsageString}\n`));
141
+ };
142
+
132
143
  const CODE_COVERAGE_REPORTER_OPTIONS = [
133
144
  'clover',
134
145
  'html',
@@ -323,7 +334,8 @@ program
323
334
  .option('--version [version]', 'print the current version of the Testim CLI and exit', false)
324
335
  .option('--monitor-performance', 'collect test playback performance data')
325
336
 
326
- .option('--high-speed', 'run in high speed mode')
337
+ .option('--high-speed', 'DEPRECATED: use --turbo-mode instead') // When removing, remove from the program.help output filter
338
+ .option('--turbo-mode', 'run in turbo mode')
327
339
  .option('--lightweight-mode [settings]', 'run lightweight mode')
328
340
  .option('--create-prefeched-data [location]', 'prefech data into local cache file')
329
341
  .option('--use-prefeched-data [location]', 'use prefeched data from local cache file, and force using only cached data')
@@ -958,6 +970,12 @@ module.exports = {
958
970
  }
959
971
  }
960
972
 
973
+ /** Handling deprecation of High speed mode (renamed to Turbo mode) */
974
+ if (program.highSpeed) {
975
+ printDeprecationWarning('--high-speed', ' --turbo-mode');
976
+ program.turboMode = true;
977
+ }
978
+
961
979
  if (program.lightweightMode) {
962
980
  try {
963
981
  const DEFAULTS = {
@@ -987,7 +1005,7 @@ module.exports = {
987
1005
  } catch (err) {
988
1006
  return Promise.reject(new ArgError(`failed to parse lightweightMode settings error: ${err.message}`));
989
1007
  }
990
- } else if (program.highSpeed && program.mode === CLI_MODE.EXTENSION) {
1008
+ } else if (program.turboMode && program.mode === CLI_MODE.EXTENSION) {
991
1009
  program.lightweightMode = {
992
1010
  general: true,
993
1011
  disableLabs: false,
@@ -1007,7 +1025,7 @@ module.exports = {
1007
1025
  uploadAssetsAndResultsOnFailure: true,
1008
1026
  preloadTests: false,
1009
1027
  disableProjectDefaults: false,
1010
- type: 'highSpeed',
1028
+ type: 'turboMode',
1011
1029
  };
1012
1030
  }
1013
1031
 
package/runner.js CHANGED
@@ -25,6 +25,7 @@ const FREE_PLAN_MINIMUM_BROWSER_TIMEOUT = 30 * 60 * 1000;
25
25
  const TestPlanRunner = require('./runners/TestPlanRunner');
26
26
  const labFeaturesService = require('./services/labFeaturesService');
27
27
  const featureAvailabilityService = require('./commons/featureAvailabilityService');
28
+ const featureFlagService = require('./commons/featureFlags');
28
29
 
29
30
  const logger = require('./commons/logger').getLogger('runner');
30
31
 
@@ -268,12 +269,12 @@ async function init(options) {
268
269
  await labFeaturesService.loadLabFeatures(projectById.id, companyByProjectId.activePlan);
269
270
  }
270
271
 
271
- if (options.lightweightMode && options.lightweightMode.type === 'highSpeed' && (!labFeaturesService.isFeatureAvailableForProject('highSpeedMode') || options.company.planType === 'free')) {
272
+ if (options.lightweightMode && options.lightweightMode.type === 'turboMode' && (featureFlagService.flags.highSpeedMode.getValue() === 'disabled' || options.company.planType === 'free')) {
272
273
  delete options.lightweightMode;
273
274
  }
274
275
 
275
- if (options.lightweightMode && options.lightweightMode.type === 'highSpeed') {
276
- console.log('High-speed mode will ignore step delays. Test artifacts like screenshots and logs will only be saved for failed runs. For more information see our docs: https://help.testim.io/docs/high-speed-mode');
276
+ if (options.lightweightMode && options.lightweightMode.type === 'turboMode') {
277
+ console.log('\nTurbo mode will ignore step delays. Test artifacts like screenshots and logs will only be saved for failed runs. For more information see our docs: https://help.testim.io/docs/turbo-mode');
277
278
  }
278
279
 
279
280
  gridService.keepAlive.start(project);