@testim/testim-cli 3.199.0 → 3.200.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.
@@ -344,14 +344,14 @@
344
344
  }
345
345
  },
346
346
  "@babel/helper-compilation-targets": {
347
- "version": "7.16.0",
348
- "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.0.tgz",
349
- "integrity": "sha512-S7iaOT1SYlqK0sQaCi21RX4+13hmdmnxIEAnQUB/eh7GeAnRjOUgTYpLkUOiRXzD+yog1JxP0qyAQZ7ZxVxLVg==",
347
+ "version": "7.16.3",
348
+ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.3.tgz",
349
+ "integrity": "sha512-vKsoSQAyBmxS35JUOOt+07cLc6Nk/2ljLIHwmq2/NM6hdioUaqEXq/S+nXvbvXbZkNDlWOymPanJGOc4CBjSJA==",
350
350
  "dev": true,
351
351
  "requires": {
352
352
  "@babel/compat-data": "^7.16.0",
353
353
  "@babel/helper-validator-option": "^7.14.5",
354
- "browserslist": "^4.16.6",
354
+ "browserslist": "^4.17.5",
355
355
  "semver": "^6.3.0"
356
356
  },
357
357
  "dependencies": {
@@ -477,13 +477,13 @@
477
477
  "dev": true
478
478
  },
479
479
  "@babel/helpers": {
480
- "version": "7.16.0",
481
- "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.16.0.tgz",
482
- "integrity": "sha512-dVRM0StFMdKlkt7cVcGgwD8UMaBfWJHl3A83Yfs8GQ3MO0LHIIIMvK7Fa0RGOGUQ10qikLaX6D7o5htcQWgTMQ==",
480
+ "version": "7.16.3",
481
+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.16.3.tgz",
482
+ "integrity": "sha512-Xn8IhDlBPhvYTvgewPKawhADichOsbkZuzN7qz2BusOM0brChsyXMDJvldWaYMMUNiCQdQzNEioXTp3sC8Nt8w==",
483
483
  "dev": true,
484
484
  "requires": {
485
485
  "@babel/template": "^7.16.0",
486
- "@babel/traverse": "^7.16.0",
486
+ "@babel/traverse": "^7.16.3",
487
487
  "@babel/types": "^7.16.0"
488
488
  }
489
489
  },
@@ -544,15 +544,15 @@
544
544
  }
545
545
  },
546
546
  "@babel/parser": {
547
- "version": "7.16.2",
548
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.2.tgz",
549
- "integrity": "sha512-RUVpT0G2h6rOZwqLDTrKk7ksNv7YpAilTnYe1/Q+eDjxEceRMKVWbCsX7t8h6C1qCFi/1Y8WZjcEPBAFG27GPw==",
547
+ "version": "7.16.3",
548
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.3.tgz",
549
+ "integrity": "sha512-dcNwU1O4sx57ClvLBVFbEgx0UZWfd0JQX5X6fxFRCLHelFBGXFfSz6Y0FAq2PEwUqlqLkdVjVr4VASEOuUnLJw==",
550
550
  "dev": true
551
551
  },
552
552
  "@babel/runtime": {
553
- "version": "7.16.0",
554
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.0.tgz",
555
- "integrity": "sha512-Nht8L0O8YCktmsDV6FqFue7vQLRx3Hb0B37lS5y0jDRqRxlBG4wIJHnf9/bgSE2UyipKFA01YtS+npRdTWBUyw==",
553
+ "version": "7.16.3",
554
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz",
555
+ "integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==",
556
556
  "requires": {
557
557
  "regenerator-runtime": "^0.13.4"
558
558
  },
@@ -576,9 +576,9 @@
576
576
  }
577
577
  },
578
578
  "@babel/traverse": {
579
- "version": "7.16.0",
580
- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.0.tgz",
581
- "integrity": "sha512-qQ84jIs1aRQxaGaxSysII9TuDaguZ5yVrEuC0BN2vcPlalwfLovVmCjbFDPECPXcYM/wLvNFfp8uDOliLxIoUQ==",
579
+ "version": "7.16.3",
580
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.3.tgz",
581
+ "integrity": "sha512-eolumr1vVMjqevCpwVO99yN/LoGL0EyHiLO5I043aYQvwOJ9eR5UsZSClHVCzfhBduMAsSzgA/6AyqPjNayJag==",
582
582
  "dev": true,
583
583
  "requires": {
584
584
  "@babel/code-frame": "^7.16.0",
@@ -586,7 +586,7 @@
586
586
  "@babel/helper-function-name": "^7.16.0",
587
587
  "@babel/helper-hoist-variables": "^7.16.0",
588
588
  "@babel/helper-split-export-declaration": "^7.16.0",
589
- "@babel/parser": "^7.16.0",
589
+ "@babel/parser": "^7.16.3",
590
590
  "@babel/types": "^7.16.0",
591
591
  "debug": "^4.1.0",
592
592
  "globals": "^11.1.0"
@@ -3172,9 +3172,9 @@
3172
3172
  "integrity": "sha512-GJCAeDBKfREgkBtgrYSf9hQy9kTb3helv0zGdzqhM7iAkW8FA/ZF97VQDbwFiwIT8MQLLOe5VlPZOEvZAqtUAQ=="
3173
3173
  },
3174
3174
  "electron-to-chromium": {
3175
- "version": "1.3.892",
3176
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.892.tgz",
3177
- "integrity": "sha512-YDW4yIjdfMnbRoBjRZ/aNQYmT6JgQFLwmTSDRJMQdrY4MByEzppdXp3rnJ0g4LBWcsYTUvwKKClYN1ofZ0COOQ==",
3175
+ "version": "1.3.894",
3176
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.894.tgz",
3177
+ "integrity": "sha512-WY8pA4irAZ4cm/Pr7YFPtPLVqj3nU6d0SbfoHF6M7HZNONfPdAnYAarumqQ75go2LuN72uO9wGuCEqnfya/ytg==",
3178
3178
  "dev": true
3179
3179
  },
3180
3180
  "emoji-regex": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testim/testim-cli",
3
- "version": "3.199.0",
3
+ "version": "3.200.0",
4
4
  "description": "Command line interface for running Testing on your CI",
5
5
  "author": "Oren Rubin",
6
6
  "contributors": [{
@@ -7,7 +7,7 @@ class SalesforceAutoLoginStepAction extends NavigationStepAction {
7
7
  try {
8
8
  salesforceUrl = await this.updateBaseUrl(salesforceUrl);
9
9
  await this.driver.url(salesforceUrl);
10
- await Promise.delay(1000); // wait a little for the page to load (fixes screenshots and clicking on elements in username verification screen)
10
+ await Promise.delay(5000); // wait a little for the page to load (fixes screenshots and clicking on elements in username verification screen)
11
11
  let newUrl = await this.driver.getUrl();
12
12
  // Verify username screen
13
13
  const isUsernameVerificationNeeded = newUrl.includes(this.step.USERNAME_VERIFICATION_PATH_ID);
@@ -22,7 +22,7 @@ class SalesforceAutoLoginStepAction extends NavigationStepAction {
22
22
  await Promise.delay(5000);
23
23
  newUrl = await this.driver.getUrl(); // If we managed to continue correctly we want to get the new redirected url
24
24
  }
25
- await Promise.delay(700);
25
+ await Promise.delay(1500);
26
26
  return {
27
27
  success: true,
28
28
  newUrl,
@@ -24,7 +24,6 @@ const TdkHybridStepAction = require('./tdkHybridStepAction');
24
24
  const PixelValidationStepAction = require('./pixelValidationStepAction');
25
25
 
26
26
  const SalesforceAutoLoginStepAction = require('./salesforceAutoLoginStepAction');
27
- const SalesforceApexActionStepAction = require('./salesforceApexActionStepAction');
28
27
 
29
28
  const CliJsStepAction = require('./cliJsStepAction');
30
29
  const CliConditionStepAction = require('./cliConditionStepAction');
@@ -87,7 +86,6 @@ module.exports = function (driver, stepActionFactory, runMode) {
87
86
  'tdk-hybrid': TdkHybridStepAction,
88
87
 
89
88
  'salesforce-autologin': SalesforceAutoLoginStepAction,
90
- 'salesforce-apex-action': SalesforceApexActionStepAction,
91
89
  };
92
90
 
93
91
  register(STEP_ACTION_MAPPING, stepActionFactory);
@@ -150,10 +150,6 @@ class TestPlanRunner {
150
150
 
151
151
  const isCodeMode = tpOptions.files.length > 0;
152
152
 
153
- if (isCodeMode && tpOptions.mode === constants.CLI_MODE.SELENIUM) {
154
- // in selenium mode we don't need to wait for the runner and clickim to sync, so we don't need to wait for reports.
155
- testStatus.setAsyncReporting(true);
156
- }
157
153
  const testListInfoPromise = tpOptions.lightweightMode && tpOptions.lightweightMode.onlyTestIdsNoSuite ?
158
154
  { beforeTests, tests, afterTests } :
159
155
  testStatus.executionStart(executionId, projectId, this.startTime, testPlanName);
@@ -245,10 +245,6 @@ async function getTestPlanGridData(options) {
245
245
  if (testPlanGrids.includes(undefined)) {
246
246
  throw new ArgError('failed to find one of the test plan defined grid');
247
247
  }
248
- const gridTypes = _(testPlanGrids).map(grid => grid.type).uniq().value();
249
- if (gridTypes.includes('testimMobile') && gridTypes.length > 1) {
250
- throw new ArgError('Test plans cannot include two different grid types');
251
- }
252
248
  return getSerializableObject(_.first(testPlanGrids));
253
249
  }
254
250
 
@@ -6,6 +6,7 @@ const perfLogger = require('../commons/performance-logger');
6
6
  const MemoryFS = require('memory-fs');
7
7
  const mfs = new MemoryFS();
8
8
  const AbortController = require("abort-controller");
9
+ const logger = require('../commons/logger').getLogger('hybrid-step-playback');
9
10
 
10
11
  /**
11
12
  * @type {Map<string, import("abort-controller")>}
@@ -119,10 +120,12 @@ module.exports.execute = async function execute(step, context, driver, loginData
119
120
  }
120
121
 
121
122
  return { success: false, shouldRetry: false, reason: 'unknown hybrid format ' + hybridFunction.type };
123
+ } catch (err) {
124
+ logger.log('error running hybrid step', { err });
122
125
  } finally {
123
126
  runningStepsAbortControllersRegistry.delete(context.stepResultId);
124
127
  }
125
- }
128
+ };
126
129
 
127
130
  module.exports.abort = function abort(stepResultId) {
128
131
  const abortController = runningStepsAbortControllersRegistry.get(stepResultId);
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
 
3
+ const _ = require('lodash');
3
4
  const sessionPlayerInit = require('../commons/getSessionPlayerRequire');
4
5
  const perfLogger = require('../commons/performance-logger');
5
6
  const { guid } = require('../utils');
package/testRunHandler.js CHANGED
@@ -252,9 +252,6 @@ TestRun.prototype.clearTestResult = function () {
252
252
  testRetryKey: this.getRetryKey(),
253
253
  });
254
254
  });
255
- if (this._testRunStatus.asyncReporting) {
256
- return Promise.resolve();
257
- }
258
255
  return this.clearTestResultFinished;
259
256
  };
260
257
 
package/testRunStatus.js CHANGED
@@ -43,7 +43,6 @@ const RunStatus = function (testInfoList, options, testPlanId, branchToUse) {
43
43
  this.exportsGlobal = {};
44
44
  this.testInfoList = testInfoList;
45
45
 
46
- this.asyncReporting = false; // whether or not we wait for result reporting
47
46
  this.executionStartedPromise = Promise.resolve();
48
47
 
49
48
  const browserNames = utils.getUniqBrowsers(options, testInfoList);
@@ -92,9 +91,6 @@ const RunStatus = function (testInfoList, options, testPlanId, branchToUse) {
92
91
  RunStatus.prototype.waitForExecutionStartedFinished = function () {
93
92
  return this.executionStartedPromise;
94
93
  };
95
- RunStatus.prototype.setAsyncReporting = function (isAsyncReportingEnabled = false) {
96
- this.asyncReporting = isAsyncReportingEnabled;
97
- };
98
94
  RunStatus.prototype.getTestResult = function (resultId) {
99
95
  return this.testRunStatus[resultId];
100
96
  };
@@ -157,7 +153,7 @@ RunStatus.prototype.updateTestStatusRunning = function (test, executionId, testR
157
153
  return this.executionStartedPromise;
158
154
  }
159
155
 
160
- const res = servicesApi.updateTestDataArtifact(projectId, test.testId, test.resultId, test.config.testData, projectData.defaults)
156
+ return servicesApi.updateTestDataArtifact(projectId, test.testId, test.resultId, test.config.testData, projectData.defaults)
161
157
  .catch(err => {
162
158
  logger.error('failed to upload test data artifact (runner)', { err });
163
159
  return '';
@@ -169,12 +165,6 @@ RunStatus.prototype.updateTestStatusRunning = function (test, executionId, testR
169
165
  await this.executionStartedPromise;
170
166
  return servicesApi.updateTestStatus(projectId, executionId, test.testId, test.resultId, 'RUNNING', { startTime: test.startTime, config: testConfig, remoteRunId, testRetryKey });
171
167
  });
172
- if (this.asyncReporting) {
173
- // silence is golden
174
- } else {
175
- return res;
176
- }
177
- return servicesApi.updateTestStatus(projectId, executionId, test.testId, test.resultId, 'RUNNING', { startTime: test.startTime, config: test.config, remoteRunId, testRetryKey });
178
168
  };
179
169
 
180
170
  RunStatus.prototype.testStartReport = function (test, executionId, testRetryKey) {
@@ -406,10 +396,7 @@ RunStatus.prototype.executionStart = function (executionId, projectId, startTime
406
396
  const ret = servicesApi.reportExecutionStarted(data);
407
397
  this.executionStartedPromise = ret;
408
398
  ret.catch(e => logger.error(e));
409
- if (!this.asyncReporting) {
410
- return ret;
411
- }
412
- return undefined;
399
+ return ret;
413
400
  });
414
401
  };
415
402
 
@@ -1,9 +0,0 @@
1
- const CliJsStepAction = require('./cliJsStepAction');
2
-
3
- class SalesforceApexActionStepAction extends CliJsStepAction {
4
- getSkipStatus() {
5
- return false;
6
- }
7
- }
8
-
9
- module.exports = SalesforceApexActionStepAction;