@testim/testim-cli 3.249.0 → 3.250.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.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@testim/testim-cli",
3
- "version": "3.249.0",
3
+ "version": "3.250.0",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@testim/testim-cli",
9
- "version": "3.249.0",
9
+ "version": "3.250.0",
10
10
  "license": "Proprietary",
11
11
  "dependencies": {
12
12
  "@applitools/eyes-sdk-core": "13.6.23",
@@ -1419,9 +1419,9 @@
1419
1419
  }
1420
1420
  },
1421
1421
  "node_modules/acorn": {
1422
- "version": "8.7.1",
1423
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz",
1424
- "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==",
1422
+ "version": "8.8.0",
1423
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz",
1424
+ "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==",
1425
1425
  "bin": {
1426
1426
  "acorn": "bin/acorn"
1427
1427
  },
@@ -3113,9 +3113,9 @@
3113
3113
  }
3114
3114
  },
3115
3115
  "node_modules/cli-spinners": {
3116
- "version": "2.6.1",
3117
- "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.6.1.tgz",
3118
- "integrity": "sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g==",
3116
+ "version": "2.7.0",
3117
+ "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.7.0.tgz",
3118
+ "integrity": "sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw==",
3119
3119
  "engines": {
3120
3120
  "node": ">=6"
3121
3121
  },
@@ -15714,9 +15714,9 @@
15714
15714
  }
15715
15715
  },
15716
15716
  "acorn": {
15717
- "version": "8.7.1",
15718
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz",
15719
- "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A=="
15717
+ "version": "8.8.0",
15718
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz",
15719
+ "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w=="
15720
15720
  },
15721
15721
  "acorn-globals": {
15722
15722
  "version": "6.0.0",
@@ -17056,9 +17056,9 @@
17056
17056
  }
17057
17057
  },
17058
17058
  "cli-spinners": {
17059
- "version": "2.6.1",
17060
- "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.6.1.tgz",
17061
- "integrity": "sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g=="
17059
+ "version": "2.7.0",
17060
+ "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.7.0.tgz",
17061
+ "integrity": "sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw=="
17062
17062
  },
17063
17063
  "cli-width": {
17064
17064
  "version": "2.2.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testim/testim-cli",
3
- "version": "3.249.0",
3
+ "version": "3.250.0",
4
4
  "description": "Command line interface for running Testing on your CI",
5
5
  "author": "Oren Rubin",
6
6
  "contributors": [{
@@ -4,7 +4,21 @@ const _ = require('lodash');
4
4
 
5
5
  const COMMUNICATION_BUFFER_TIME = 1000;
6
6
  const UI_VERIFICATION_STEPS = ['simple-ui-verification', 'wait-for-simple-ui-verification'];
7
- const FULL_TIMEOUT_STEP_TYPES = [...UI_VERIFICATION_STEPS, 'custom-validation', 'sfdc-step-login'];
7
+ const FULL_TIMEOUT_STEP_TYPES = [
8
+ ...UI_VERIFICATION_STEPS,
9
+ 'custom-validation',
10
+ 'sfdc-recorded-step',
11
+ 'sfdc-step-login',
12
+ 'sfdc-step-logout',
13
+ 'sfdc-step-sobjectcreate',
14
+ 'sfdc-step-sobjectdelete',
15
+ 'sfdc-step-findrecord',
16
+ 'sfdc-step-quickaction',
17
+ 'sfdc-step-sobjectvalidate',
18
+ 'sfdc-step-launchapp',
19
+ 'sfdc-step-closeconsoletabs',
20
+ 'sfdc-step-sobjectedit',
21
+ ];
8
22
 
9
23
  class PlaybackTimeoutCalculator {
10
24
  constructor(isDebuggerConnected) {
@@ -37,9 +37,11 @@ class ApiStepAction extends StepAction {
37
37
  body: context.apiBody,
38
38
  timeout: context.data.maxTotalStepTime,
39
39
  omitCookies: step.omitCookies,
40
+ formData: step.formData,
41
+ fileUrls: context.fileUrls,
40
42
  };
41
43
 
42
- return (step.sendViaWebApp ? this.runApiInAut(step, context) : this.runApiInBg(eventData))
44
+ return (step.sendViaWebApp ? this.runApiInAut(eventData) : this.runApiInBg(eventData))
43
45
  .then(resp => {
44
46
  const result = resp.result || {};
45
47
 
@@ -51,31 +53,31 @@ class ApiStepAction extends StepAction {
51
53
 
52
54
  if (resp.success) {
53
55
  if (result.status === 0) {
54
- return Promise.resolve({
56
+ return {
55
57
  result,
56
58
  resultInfo,
57
59
  shouldRetry: false,
58
60
  success: false,
59
61
  reason: 'Connection problem',
60
62
  errorType: constants.API_REQUEST_NETWORK_ERROR,
61
- });
63
+ };
62
64
  }
63
- return Promise.resolve({
65
+ return {
64
66
  result,
65
67
  resultInfo,
66
68
  shouldRetry: false,
67
69
  success: true,
68
- });
70
+ };
69
71
  }
70
72
 
71
- return Promise.resolve({
73
+ return {
72
74
  result,
73
75
  resultInfo,
74
76
  shouldRetry: false,
75
77
  success: false,
76
78
  reason: result.error || sessionPlayer.commonConstants.error.REQUEST_TIMED_OUT,
77
79
  errorType: result.error ? constants.API_FAILURE : constants.API_REQUEST_NETWORK_ERROR,
78
- });
80
+ };
79
81
  });
80
82
  }
81
83
  }
@@ -0,0 +1,23 @@
1
+ const StepAction = require('./stepAction');
2
+ const { sfdc } = require('../../commons/getSessionPlayerRequire');
3
+
4
+ class SfdcRecordedStepAction extends StepAction {
5
+ async performAction() {
6
+ const page = sfdc.sfdcNewSePage(this.driver);
7
+ try {
8
+ await sfdc.sfdcExecuteRecordedStep(page, this.step.recordedData);
9
+ return { success: true };
10
+ } catch (err) {
11
+ return {
12
+ success: false,
13
+ reason: err.reason || err.message,
14
+ exception: err,
15
+ shouldRetry: false, // TODO - check this. Our (bFormat) steps are probably not retryable?
16
+ };
17
+ } finally {
18
+ page.releaseObjects();
19
+ }
20
+ }
21
+ }
22
+
23
+ module.exports = SfdcRecordedStepAction;
@@ -28,6 +28,7 @@ const CliConditionStepAction = require('./cliConditionStepAction');
28
28
  const NodePackageStepAction = require('./nodePackageStepAction');
29
29
  const ExtensionOnlyStepAction = require('./extensionOnlyStepAction');
30
30
  const SfdcStepAction = require('./sfdcStepAction');
31
+ const SfdcRecordedStepAction = require('./sfdcRecordedStepAction');
31
32
 
32
33
  function register(stepActionByType, stepActionFactory) {
33
34
  Object.keys(stepActionByType).forEach(type => {
@@ -84,6 +85,7 @@ module.exports = function (driver, stepActionFactory, runMode) {
84
85
  'cli-email-code-step': CliJsStepAction,
85
86
  'tdk-hybrid': TdkHybridStepAction,
86
87
 
88
+ 'sfdc-recorded-step': SfdcRecordedStepAction,
87
89
  'sfdc-step-login': SfdcStepAction,
88
90
  'sfdc-step-logout': SfdcStepAction,
89
91
  'sfdc-step-sobjectcreate': SfdcStepAction,
@@ -94,6 +96,7 @@ module.exports = function (driver, stepActionFactory, runMode) {
94
96
  'sfdc-step-sobjectvalidate': SfdcStepAction,
95
97
  'sfdc-step-launchapp': SfdcStepAction,
96
98
  'sfdc-step-closeconsoletabs': SfdcStepAction,
99
+ 'sfdc-step-relatedlistaction': SfdcStepAction,
97
100
  };
98
101
 
99
102
  register(STEP_ACTION_MAPPING, stepActionFactory);