@testim/testim-cli 3.238.0 → 3.241.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testim/testim-cli",
3
- "version": "3.238.0",
3
+ "version": "3.241.0",
4
4
  "description": "Command line interface for running Testing on your CI",
5
5
  "author": "Oren Rubin",
6
6
  "contributors": [{
@@ -1,6 +1,13 @@
1
- "use strict";
2
- var scroll = function (elementToScrollOn, elementToScrollTo, isScrollToElement, isDynamicScroll, expectedX, expectedY, shouldScrollLeft, shouldScrollTop) {
1
+ // Disabling the eslint to keep this in a format which works on IE 11.
2
+ /* eslint-disable no-var */
3
+ /* eslint-disable no-redeclare */
4
+ /* eslint-disable object-shorthand */
5
+ /* eslint-disable one-var */
6
+ /* eslint-disable operator-linebreak */
7
+
8
+ 'use strict';
3
9
 
10
+ var scroll = function (elementToScrollOn, elementToScrollTo, isScrollToElement, isDynamicScroll, expectedX, expectedY, shouldScrollLeft, shouldScrollTop) {
4
11
  function doScroll(expectedPosition, element) {
5
12
  if (!element) {
6
13
  return { success: false };
@@ -17,7 +24,7 @@ var scroll = function (elementToScrollOn, elementToScrollTo, isScrollToElement,
17
24
 
18
25
  function getExpectedPosition(parentElement, locatedElement, isScrollToElement, expectedX, expectedY, shouldScrollLeft, shouldScrollTop) {
19
26
  if (!isScrollToElement) {
20
- return {x: expectedX, y: expectedY};
27
+ return { x: expectedX, y: expectedY };
21
28
  }
22
29
 
23
30
  var target = getLocatedElement(locatedElement);
@@ -26,7 +33,7 @@ var scroll = function (elementToScrollOn, elementToScrollTo, isScrollToElement,
26
33
  return { x: parentElement.scrollWidth, y: parentElement.scrollHeight };
27
34
  }
28
35
 
29
- if(!target) {
36
+ if (!target) {
30
37
  throw new Error('could not find target element');
31
38
  }
32
39
 
@@ -46,7 +53,7 @@ var scroll = function (elementToScrollOn, elementToScrollTo, isScrollToElement,
46
53
  ? parentElement.scrollLeft + targetRect.left - Math.min(expectedX, MAX_WIDTH)
47
54
  : parentElement.scrollLeft;
48
55
 
49
- return {x: Math.round(xScroll), y: Math.round(yScroll)};
56
+ return { x: Math.round(xScroll), y: Math.round(yScroll) };
50
57
  }
51
58
 
52
59
  var isDocument = !elementToScrollOn;
@@ -55,7 +62,7 @@ var scroll = function (elementToScrollOn, elementToScrollTo, isScrollToElement,
55
62
  if (!elementToScrollOn) {
56
63
  throw new Error('could not find target to scroll on');
57
64
  }
58
- var positionBeforeScroll = {top: elementToScrollOn.scrollTop, left: elementToScrollOn.scrollLeft};
65
+ var positionBeforeScroll = { top: elementToScrollOn.scrollTop, left: elementToScrollOn.scrollLeft };
59
66
  var expectedPosition = getExpectedPosition(elementToScrollOn, elementToScrollTo, isScrollToElement, expectedX, expectedY, shouldScrollLeft, shouldScrollTop);
60
67
 
61
68
  var result = doScroll(expectedPosition, elementToScrollOn);
@@ -71,7 +78,7 @@ var scroll = function (elementToScrollOn, elementToScrollTo, isScrollToElement,
71
78
  var actualScrollToElement = getLocatedElement(elementToScrollTo);
72
79
 
73
80
  if (isScrollToElement && isDynamicScroll && !actualScrollToElement) {
74
- return { success: false, expectedPosition };
81
+ return { success: false, expectedPosition: expectedPosition };
75
82
  }
76
83
 
77
84
  if (isScrollToElement) {
@@ -82,7 +89,7 @@ var scroll = function (elementToScrollOn, elementToScrollTo, isScrollToElement,
82
89
  actualXString = rect.left;
83
90
  actualYString = rect.top;
84
91
  }
85
- return {success: result.success, actualX: actualXString, actualY: actualYString};
92
+ return { success: result.success, actualX: actualXString, actualY: actualYString };
86
93
  };
87
94
 
88
95
  module.exports = scroll;
package/testRunHandler.js CHANGED
@@ -248,7 +248,7 @@ class TestRun {
248
248
  if (this._options.mockNetworkRules) {
249
249
  runData.mockNetworkRules = this._options.mockNetworkRules;
250
250
  }
251
- const mustClearPreviousStepResults = !this.isAllowReportTestResultRetries() && (this._timeoutRetryCount > 1 || this._retryCount > 1);
251
+ const mustClearPreviousStepResults = (this._timeoutRetryCount > 1 || this._retryCount > 1);
252
252
 
253
253
  if (this._options.lightweightMode && this._options.lightweightMode.disableResults &&
254
254
  !mustClearPreviousStepResults && canSendRunDataOverUrl(runData)) {
package/testRunStatus.js CHANGED
@@ -17,6 +17,7 @@ const { calculateCoverage } = require('./coverage/jsCoverage');
17
17
  const featureAvailabilityService = require('./commons/featureAvailabilityService');
18
18
  const featureFlags = require('./commons/featureFlags');
19
19
  const { mapFilesToLocalDrive } = require('./services/localRCASaver');
20
+ const { removeHiddenParamsInTestData } = require('./commons/testimServicesApi');
20
21
 
21
22
  const gitBranch = utils.getEnvironmentGitBranch();
22
23
  const gitCommit = process.env.GIT_COMMIT || process.env.CIRCLE_SHA1 || process.env.TRAVIS_COMMIT;
@@ -124,6 +125,13 @@ RunStatus.prototype.addRetryTestResult = async function ({
124
125
 
125
126
  this.testRunStatus[newResultId] = newTestResult;
126
127
 
128
+ const { projectData } = this.options;
129
+
130
+
131
+ if (newTestResult.config.testData) {
132
+ newTestResult.config.testData = removeHiddenParamsInTestData(newTestResult.config.testData, projectData.defaults);
133
+ }
134
+
127
135
  return servicesApi.addTestRetry({
128
136
  projectId,
129
137
  runId: executionId,