@perforce-perfecto/scriptless-helpers 1.46.2 → 1.47.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 +3 -2
- package/src/index.d.ts +25 -0
- package/src/index.js +25 -0
- package/src/index.js.map +1 -1
- package/src/lib/action-arguments-helper.d.ts +36 -0
- package/src/lib/action-arguments-helper.js +60 -0
- package/src/lib/action-arguments-helper.js.map +1 -0
- package/src/lib/action-result-helper.d.ts +8 -0
- package/src/lib/action-result-helper.js +28 -0
- package/src/lib/action-result-helper.js.map +1 -0
- package/src/lib/constants-helper.d.ts +10 -0
- package/src/lib/constants-helper.js +43 -0
- package/src/lib/constants-helper.js.map +1 -0
- package/src/lib/custom-error.d.ts +5 -0
- package/src/lib/custom-error.js +14 -0
- package/src/lib/custom-error.js.map +1 -0
- package/src/lib/data-table-helper.d.ts +17 -0
- package/src/lib/data-table-helper.js +88 -0
- package/src/lib/data-table-helper.js.map +1 -0
- package/src/lib/element-helper.d.ts +16 -0
- package/src/lib/element-helper.js +191 -0
- package/src/lib/element-helper.js.map +1 -0
- package/src/lib/exit-execution-helper.d.ts +13 -0
- package/src/lib/exit-execution-helper.js +50 -0
- package/src/lib/exit-execution-helper.js.map +1 -0
- package/src/lib/file-transfer-helper.d.ts +12 -0
- package/src/lib/file-transfer-helper.js +132 -0
- package/src/lib/file-transfer-helper.js.map +1 -0
- package/src/lib/handset-open-helper.d.ts +26 -0
- package/src/lib/handset-open-helper.js +53 -0
- package/src/lib/handset-open-helper.js.map +1 -0
- package/src/lib/handset-select-helper.d.ts +40 -0
- package/src/lib/handset-select-helper.js +126 -0
- package/src/lib/handset-select-helper.js.map +1 -0
- package/src/lib/handset-variable-helper.d.ts +9 -0
- package/src/lib/handset-variable-helper.js +38 -0
- package/src/lib/handset-variable-helper.js.map +1 -0
- package/src/lib/parameter-helper.d.ts +6 -0
- package/src/lib/parameter-helper.js +25 -0
- package/src/lib/parameter-helper.js.map +1 -0
- package/src/lib/perfecto-execute-script-helper.d.ts +5 -0
- package/src/lib/perfecto-execute-script-helper.js +27 -0
- package/src/lib/perfecto-execute-script-helper.js.map +1 -0
- package/src/lib/script-info-helper.d.ts +4 -0
- package/src/lib/script-info-helper.js +28 -0
- package/src/lib/script-info-helper.js.map +1 -0
- package/src/lib/secured-variable-helper.d.ts +6 -0
- package/src/lib/secured-variable-helper.js +17 -0
- package/src/lib/secured-variable-helper.js.map +1 -0
- package/src/lib/test-end-status-helper.d.ts +4 -0
- package/src/lib/test-end-status-helper.js +19 -0
- package/src/lib/test-end-status-helper.js.map +1 -0
- package/src/lib/touch-drag-helper.d.ts +17 -0
- package/src/lib/touch-drag-helper.js +96 -0
- package/src/lib/touch-drag-helper.js.map +1 -0
- package/src/lib/variable-attribute-checkpoint-helper.d.ts +4 -0
- package/src/lib/variable-attribute-checkpoint-helper.js +20 -0
- package/src/lib/variable-attribute-checkpoint-helper.js.map +1 -0
- package/src/types/active-script-function-data.d.ts +12 -0
- package/src/types/active-script-function-data.js +3 -0
- package/src/types/active-script-function-data.js.map +1 -0
- package/src/types/data-table.d.ts +30 -0
- package/src/types/data-table.js +3 -0
- package/src/types/data-table.js.map +1 -0
- package/src/types/desired-device-capabilities.d.ts +25 -0
- package/src/types/desired-device-capabilities.js +3 -0
- package/src/types/desired-device-capabilities.js.map +1 -0
- package/src/types/perfecto-device-capabilities.d.ts +128 -0
- package/src/types/perfecto-device-capabilities.js +3 -0
- package/src/types/perfecto-device-capabilities.js.map +1 -0
- package/src/types/type-utils.d.ts +3 -0
- package/src/types/type-utils.js +3 -0
- package/src/types/type-utils.js.map +1 -0
- package/src/types/user-defined-variables.d.ts +11 -0
- package/src/types/user-defined-variables.js +3 -0
- package/src/types/user-defined-variables.js.map +1 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScriptInfoHelper = void 0;
|
|
4
|
+
const constants_helper_1 = require("./constants-helper");
|
|
5
|
+
const scriptless_helper_1 = require("../types/scriptless-helper");
|
|
6
|
+
class ScriptInfoHelper extends scriptless_helper_1.ScriptlessHelper {
|
|
7
|
+
getScriptInfo(parentExecutionId, property, reportName, testKey) {
|
|
8
|
+
switch (property) {
|
|
9
|
+
case 'scriptName':
|
|
10
|
+
return reportName;
|
|
11
|
+
case 'scriptKey':
|
|
12
|
+
return testKey;
|
|
13
|
+
case 'userId':
|
|
14
|
+
return constants_helper_1.ConstantsHelper.getExecutedByUserEmail();
|
|
15
|
+
case 'executionId':
|
|
16
|
+
return parentExecutionId;
|
|
17
|
+
case 'reportKey':
|
|
18
|
+
// TODO: This is irrelevant, should be removed once the option is removed from the UI
|
|
19
|
+
return '';
|
|
20
|
+
case 'reportUrl':
|
|
21
|
+
return constants_helper_1.ConstantsHelper.getExecutionReportiumUrl();
|
|
22
|
+
default:
|
|
23
|
+
throw new Error(`Invalid script property - ${property}`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.ScriptInfoHelper = ScriptInfoHelper;
|
|
28
|
+
//# sourceMappingURL=script-info-helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"script-info-helper.js","sourceRoot":"","sources":["../../../../../libs/execution-helpers-public/src/lib/script-info-helper.ts"],"names":[],"mappings":";;;AAAA,yDAAqD;AACrD,kEAA8D;AAE9D,MAAa,gBAAiB,SAAQ,oCAAgB;IACpD,aAAa,CACX,iBAAyB,EACzB,QAAgB,EAChB,UAAkB,EAClB,OAAe;QAEf,QAAQ,QAAQ,EAAE,CAAC;YACjB,KAAK,YAAY;gBACf,OAAO,UAAU,CAAC;YACpB,KAAK,WAAW;gBACd,OAAO,OAAO,CAAC;YACjB,KAAK,QAAQ;gBACX,OAAO,kCAAe,CAAC,sBAAsB,EAAE,CAAC;YAClD,KAAK,aAAa;gBAChB,OAAO,iBAAiB,CAAC;YAC3B,KAAK,WAAW;gBACd,qFAAqF;gBACrF,OAAO,EAAE,CAAC;YACZ,KAAK,WAAW;gBACd,OAAO,kCAAe,CAAC,wBAAwB,EAAE,CAAC;YACpD;gBACE,MAAM,IAAI,KAAK,CAAC,6BAA6B,QAAQ,EAAE,CAAC,CAAC;QAC7D,CAAC;IACH,CAAC;CACF;AAzBD,4CAyBC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Logger } from '../types/logger';
|
|
2
|
+
import { ScriptlessHelper } from '../types/scriptless-helper';
|
|
3
|
+
export declare class SecuredVariableHelper extends ScriptlessHelper {
|
|
4
|
+
constructor(logger?: Logger);
|
|
5
|
+
decryptSecuredString(encryptedString: string): string | undefined;
|
|
6
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SecuredVariableHelper = void 0;
|
|
4
|
+
const scriptless_helper_1 = require("../types/scriptless-helper");
|
|
5
|
+
class SecuredVariableHelper extends scriptless_helper_1.ScriptlessHelper {
|
|
6
|
+
constructor(logger) {
|
|
7
|
+
super(logger);
|
|
8
|
+
}
|
|
9
|
+
decryptSecuredString(encryptedString) {
|
|
10
|
+
if (!encryptedString) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
return encryptedString;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.SecuredVariableHelper = SecuredVariableHelper;
|
|
17
|
+
//# sourceMappingURL=secured-variable-helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secured-variable-helper.js","sourceRoot":"","sources":["../../../../../libs/execution-helpers-public/src/lib/secured-variable-helper.ts"],"names":[],"mappings":";;;AACA,kEAA8D;AAE9D,MAAa,qBAAsB,SAAQ,oCAAgB;IACzD,YAAY,MAAe;QACzB,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;IAED,oBAAoB,CAAC,eAAuB;QAC1C,IAAI,CAAC,eAAe,EAAE,CAAC;YACrB,OAAO;QACT,CAAC;QACD,OAAO,eAAe,CAAC;IACzB,CAAC;CACF;AAXD,sDAWC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TestEndStatusHelper = void 0;
|
|
4
|
+
const scriptless_helper_1 = require("../types/scriptless-helper");
|
|
5
|
+
class TestEndStatusHelper extends scriptless_helper_1.ScriptlessHelper {
|
|
6
|
+
testEndStatus(success) {
|
|
7
|
+
if ((success === null || success === void 0 ? void 0 : success.toLowerCase()) === 'true') {
|
|
8
|
+
return true;
|
|
9
|
+
}
|
|
10
|
+
else if ((success === null || success === void 0 ? void 0 : success.toLowerCase()) === 'false') {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.TestEndStatusHelper = TestEndStatusHelper;
|
|
19
|
+
//# sourceMappingURL=test-end-status-helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-end-status-helper.js","sourceRoot":"","sources":["../../../../../libs/execution-helpers-public/src/lib/test-end-status-helper.ts"],"names":[],"mappings":";;;AAAA,kEAA8D;AAE9D,MAAa,mBAAoB,SAAQ,oCAAgB;IACvD,aAAa,CAAC,OAAe;QAC3B,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,EAAE,MAAK,MAAM,EAAE,CAAC;YACtC,OAAO,IAAI,CAAC;QACd,CAAC;aAAM,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,EAAE,MAAK,OAAO,EAAE,CAAC;YAC9C,OAAO,KAAK,CAAC;QACf,CAAC;aAAM,CAAC;YACN,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;CACF;AAVD,kDAUC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ScriptlessHelper } from '../types/scriptless-helper';
|
|
2
|
+
type DragAction = {
|
|
3
|
+
type: string;
|
|
4
|
+
duration?: number;
|
|
5
|
+
x?: number;
|
|
6
|
+
y?: number;
|
|
7
|
+
button?: number;
|
|
8
|
+
};
|
|
9
|
+
type AuxiliaryOperation = 'tap' | 'notap' | 'down' | 'up';
|
|
10
|
+
export declare class TouchDragHelper extends ScriptlessHelper {
|
|
11
|
+
getActionsToPerformDrag(locations: Array<string>, deviceWidth: number, deviceHeight: number, auxiliaryOperation: AuxiliaryOperation, totalDurationInSeconds: number | undefined): Array<DragAction>;
|
|
12
|
+
private generateCoordinates;
|
|
13
|
+
private convertToPixels;
|
|
14
|
+
private generateActions;
|
|
15
|
+
private calculatePerMoveDuration;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TouchDragHelper = void 0;
|
|
4
|
+
const scriptless_helper_1 = require("../types/scriptless-helper");
|
|
5
|
+
class TouchDragHelper extends scriptless_helper_1.ScriptlessHelper {
|
|
6
|
+
getActionsToPerformDrag(locations, deviceWidth, deviceHeight, auxiliaryOperation, totalDurationInSeconds) {
|
|
7
|
+
const coordinates = this.generateCoordinates(locations, deviceWidth, deviceHeight);
|
|
8
|
+
const perMoveDuration = this.calculatePerMoveDuration(totalDurationInSeconds, coordinates.length);
|
|
9
|
+
const actionsToPerform = this.generateActions(coordinates, auxiliaryOperation, perMoveDuration);
|
|
10
|
+
return actionsToPerform;
|
|
11
|
+
}
|
|
12
|
+
generateCoordinates(locations, deviceWidth, deviceHeight) {
|
|
13
|
+
const coordinates = [];
|
|
14
|
+
locations.forEach((location) => {
|
|
15
|
+
const parts = location.split(',');
|
|
16
|
+
if (parts.length === 2) {
|
|
17
|
+
coordinates.push([
|
|
18
|
+
this.convertToPixels(parts[0], deviceWidth),
|
|
19
|
+
this.convertToPixels(parts[1], deviceHeight)
|
|
20
|
+
]);
|
|
21
|
+
}
|
|
22
|
+
else if (parts.length >= 4 && parts.length % 2 === 0) {
|
|
23
|
+
for (let i = 0; i < parts.length; i += 2) {
|
|
24
|
+
coordinates.push([
|
|
25
|
+
this.convertToPixels(parts[i], deviceWidth),
|
|
26
|
+
this.convertToPixels(parts[i + 1], deviceHeight)
|
|
27
|
+
]);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
return coordinates;
|
|
32
|
+
}
|
|
33
|
+
convertToPixels(value, maxValue) {
|
|
34
|
+
let valueToReturn;
|
|
35
|
+
if (value.endsWith('%')) {
|
|
36
|
+
const percentage = Number(value.trim().slice(0, -1));
|
|
37
|
+
if (isNaN(percentage)) {
|
|
38
|
+
throw new Error(`Invalid percentage value: ${value}`);
|
|
39
|
+
}
|
|
40
|
+
valueToReturn = Math.floor(maxValue * (percentage / 100));
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
valueToReturn = Number(value);
|
|
44
|
+
}
|
|
45
|
+
if (isNaN(valueToReturn)) {
|
|
46
|
+
throw new Error(`Invalid value: ${value}`);
|
|
47
|
+
}
|
|
48
|
+
if (valueToReturn < 0 || valueToReturn > maxValue) {
|
|
49
|
+
throw new Error(`Value out of bounds: ${valueToReturn}`);
|
|
50
|
+
}
|
|
51
|
+
return valueToReturn;
|
|
52
|
+
}
|
|
53
|
+
generateActions(coordinates, auxiliaryOperation, perMoveDuration) {
|
|
54
|
+
const actions = [];
|
|
55
|
+
// Moving pointer to first coordinate
|
|
56
|
+
actions.push({
|
|
57
|
+
type: 'pointerMove',
|
|
58
|
+
duration: 0,
|
|
59
|
+
x: coordinates[0][0],
|
|
60
|
+
y: coordinates[0][1]
|
|
61
|
+
});
|
|
62
|
+
if (['tap', 'down'].includes(auxiliaryOperation)) {
|
|
63
|
+
// Pressing down (mocking touch at start)
|
|
64
|
+
actions.push({
|
|
65
|
+
type: 'pointerDown',
|
|
66
|
+
button: 0
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
// Moving through all coordinates
|
|
70
|
+
for (let i = 1; i < coordinates.length; i++) {
|
|
71
|
+
actions.push({
|
|
72
|
+
type: 'pointerMove',
|
|
73
|
+
duration: perMoveDuration,
|
|
74
|
+
x: coordinates[i][0],
|
|
75
|
+
y: coordinates[i][1]
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
if (['tap', 'up'].includes(auxiliaryOperation)) {
|
|
79
|
+
// Releasing the touch at the end
|
|
80
|
+
actions.push({
|
|
81
|
+
type: 'pointerUp',
|
|
82
|
+
button: 0
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
return actions;
|
|
86
|
+
}
|
|
87
|
+
calculatePerMoveDuration(totalDurationInSeconds, coordinatesCount) {
|
|
88
|
+
const moveCount = coordinatesCount - 1;
|
|
89
|
+
const perMoveDuration = totalDurationInSeconds === undefined
|
|
90
|
+
? 0
|
|
91
|
+
: Math.floor((totalDurationInSeconds * 1000) / moveCount);
|
|
92
|
+
return perMoveDuration;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
exports.TouchDragHelper = TouchDragHelper;
|
|
96
|
+
//# sourceMappingURL=touch-drag-helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"touch-drag-helper.js","sourceRoot":"","sources":["../../../../../libs/execution-helpers-public/src/lib/touch-drag-helper.ts"],"names":[],"mappings":";;;AAAA,kEAA8D;AAY9D,MAAa,eAAgB,SAAQ,oCAAgB;IACnD,uBAAuB,CACrB,SAAwB,EACxB,WAAmB,EACnB,YAAoB,EACpB,kBAAsC,EACtC,sBAA0C;QAE1C,MAAM,WAAW,GAAyB,IAAI,CAAC,mBAAmB,CAChE,SAAS,EACT,WAAW,EACX,YAAY,CACb,CAAC;QACF,MAAM,eAAe,GAAW,IAAI,CAAC,wBAAwB,CAC3D,sBAAsB,EACt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I,EAAE,aAAa;gBACnB,MAAM,EAAE,CAAC;aACV,CAAC,CAAC;QACL,CAAC;QAED,iCAAiC;QACjC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAC5C,OAAO,CAAC,IAAI,CAAC;gBACX,IAAI,EAAE,aAAa;gBACnB,QAAQ,EAAE,eAAe;gBACzB,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBACpB,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;aACrB,CAAC,CAAC;QACL,CAAC;QAED,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC;YAC/C,iCAAiC;YACjC,OAAO,CAAC,IAAI,CAAC;gBACX,IAAI,EAAE,WAAW;gBACjB,MAAM,EAAE,CAAC;aACV,CAAC,CAAC;QACL,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;IAEO,wBAAwB,CAC9B,sBAA0C,EAC1C,gBAAwB;QAExB,MAAM,SAAS,GAAG,gBAAgB,GAAG,CAAC,CAAC;QACvC,MAAM,eAAe,GACnB,sBAAsB,KAAK,SAAS;YAClC,CAAC,CAAC,CAAC;YACH,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,sBAAsB,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC,CAAC;QAC9D,OAAO,eAAe,CAAC;IACzB,CAAC;CACF;AA7HD,0CA6HC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VariableAttributeCheckpointHelper = void 0;
|
|
4
|
+
const scriptless_helper_1 = require("../types/scriptless-helper");
|
|
5
|
+
class VariableAttributeCheckpointHelper extends scriptless_helper_1.ScriptlessHelper {
|
|
6
|
+
checkAttribute(attribute, evaluatedValue) {
|
|
7
|
+
const isEmpty = evaluatedValue === null ||
|
|
8
|
+
evaluatedValue === undefined ||
|
|
9
|
+
evaluatedValue === '';
|
|
10
|
+
if (attribute === 'empty' && !isEmpty) {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
if (attribute === 'not-empty' && isEmpty) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.VariableAttributeCheckpointHelper = VariableAttributeCheckpointHelper;
|
|
20
|
+
//# sourceMappingURL=variable-attribute-checkpoint-helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variable-attribute-checkpoint-helper.js","sourceRoot":"","sources":["../../../../../libs/execution-helpers-public/src/lib/variable-attribute-checkpoint-helper.ts"],"names":[],"mappings":";;;AAAA,kEAA8D;AAE9D,MAAa,iCAAkC,SAAQ,oCAAgB;IACrE,cAAc,CACZ,SAAiB,EACjB,cAAkD;QAElD,MAAM,OAAO,GACX,cAAc,KAAK,IAAI;YACvB,cAAc,KAAK,SAAS;YAC5B,cAAc,KAAK,EAAE,CAAC;QACxB,IAAI,SAAS,KAAK,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;YACtC,OAAO,KAAK,CAAC;QACf,CAAC;QACD,IAAI,SAAS,KAAK,WAAW,IAAI,OAAO,EAAE,CAAC;YACzC,OAAO,KAAK,CAAC;QACf,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAjBD,8EAiBC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type ActiveScriptFunctionData = {
|
|
2
|
+
commandStartTime: number;
|
|
3
|
+
actionResult: string | boolean | undefined;
|
|
4
|
+
actionError?: Error;
|
|
5
|
+
errorType: string;
|
|
6
|
+
screenshotData?: unknown[];
|
|
7
|
+
reportResultData: unknown[];
|
|
8
|
+
reportExpectedData: unknown[];
|
|
9
|
+
reportExpectedImage: unknown[];
|
|
10
|
+
actionReportMessage: string;
|
|
11
|
+
reportUxTime: string;
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"active-script-function-data.js","sourceRoot":"","sources":["../../../../../libs/execution-helpers-public/src/types/active-script-function-data.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type DesiredDeviceCapability } from './desired-device-capabilities';
|
|
2
|
+
import { type Replace } from './type-utils';
|
|
3
|
+
type DataType = 'BOOLEAN' | 'INTEGER' | 'STRING' | 'HANDSET' | 'TABLE' | 'MULTIMEDIA' | 'PROPERTY' | 'OBJECT';
|
|
4
|
+
export type ServerDataTableDataType = Exclude<Exclude<DataType, 'TABLE'>, 'PROPERTY'>;
|
|
5
|
+
export type DataTableDataType = ServerDataTableDataType;
|
|
6
|
+
export type ServerTableColumn = {
|
|
7
|
+
name: string;
|
|
8
|
+
type: ServerDataTableDataType;
|
|
9
|
+
};
|
|
10
|
+
export type TableColumn = ServerTableColumn & {
|
|
11
|
+
duplicateName: boolean;
|
|
12
|
+
};
|
|
13
|
+
export type DataTableCellValue = string;
|
|
14
|
+
export type DataTableRow = DataTableCellValue[];
|
|
15
|
+
export type ServerDataTable = {
|
|
16
|
+
elementsData: DataTableRow[];
|
|
17
|
+
columns: ServerTableColumn[];
|
|
18
|
+
};
|
|
19
|
+
export type DataTable = Replace<ServerDataTable, 'columns', TableColumn[]>;
|
|
20
|
+
export type ProcessedDataTableCell = {
|
|
21
|
+
'@type': ServerDataTableDataType;
|
|
22
|
+
secured: boolean;
|
|
23
|
+
value?: string | number | boolean;
|
|
24
|
+
key?: string | DesiredDeviceCapability | null;
|
|
25
|
+
};
|
|
26
|
+
export type ProcessedDataTableRow = {
|
|
27
|
+
[key: string]: ProcessedDataTableCell;
|
|
28
|
+
};
|
|
29
|
+
export type ProcessedDataTable = Array<ProcessedDataTableRow>;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-table.js","sourceRoot":"","sources":["../../../../../libs/execution-helpers-public/src/types/data-table.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type SharedDesiredDeviceCapability = {
|
|
2
|
+
deviceSessionId?: string;
|
|
3
|
+
deviceId?: string;
|
|
4
|
+
tunnelId?: string;
|
|
5
|
+
};
|
|
6
|
+
export type DesiredWebDeviceCapability = {
|
|
7
|
+
platformName: string;
|
|
8
|
+
platformVersion: string;
|
|
9
|
+
browserName: string;
|
|
10
|
+
browserVersion: string;
|
|
11
|
+
location: string;
|
|
12
|
+
resolution: string;
|
|
13
|
+
} & SharedDesiredDeviceCapability;
|
|
14
|
+
export type DesiredVirtualDeviceCapability = {
|
|
15
|
+
platformName: string;
|
|
16
|
+
platformVersion: string;
|
|
17
|
+
manufacturer: string;
|
|
18
|
+
model: string;
|
|
19
|
+
useVirtualDevice: boolean;
|
|
20
|
+
} & SharedDesiredDeviceCapability;
|
|
21
|
+
export type DesiredRealDeviceCapability = {
|
|
22
|
+
deviceName: string;
|
|
23
|
+
} & SharedDesiredDeviceCapability;
|
|
24
|
+
export type DesiredDeviceCapability = DesiredWebDeviceCapability | DesiredVirtualDeviceCapability | DesiredRealDeviceCapability;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"desired-device-capabilities.js","sourceRoot":"","sources":["../../../../../libs/execution-helpers-public/src/types/desired-device-capabilities.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
type JsonString = string;
|
|
2
|
+
type UrlString = string;
|
|
3
|
+
type PerfectoDeviceCapabilityBase = {
|
|
4
|
+
webStorageEnabled: boolean;
|
|
5
|
+
locationContextEnabled: boolean;
|
|
6
|
+
browserName: string;
|
|
7
|
+
platform: JsonString;
|
|
8
|
+
javascriptEnabled: boolean;
|
|
9
|
+
databaseEnabled: boolean;
|
|
10
|
+
takesScreenshot: boolean;
|
|
11
|
+
networkConnectionEnabled: boolean;
|
|
12
|
+
platformName: string;
|
|
13
|
+
deviceName: string;
|
|
14
|
+
platformVersion: string;
|
|
15
|
+
stopUrl: UrlString;
|
|
16
|
+
streamInfo: JsonString;
|
|
17
|
+
userContextStack: JsonString;
|
|
18
|
+
securityToken: string;
|
|
19
|
+
sessionType: string;
|
|
20
|
+
testGridReportUrl: UrlString;
|
|
21
|
+
reportPdfUrl: UrlString;
|
|
22
|
+
executionId: string;
|
|
23
|
+
deviceSessionId: string;
|
|
24
|
+
};
|
|
25
|
+
export type PerfectoRealDeviceCapabilityOptions = {
|
|
26
|
+
deviceName: string;
|
|
27
|
+
securityToken: string;
|
|
28
|
+
'report.parentExecutionId': string;
|
|
29
|
+
sessionType: string;
|
|
30
|
+
cloud: string;
|
|
31
|
+
userContextStack: JsonString;
|
|
32
|
+
};
|
|
33
|
+
export type PerfectoRealDeviceCapability = PerfectoDeviceCapabilityBase & {
|
|
34
|
+
automationName: string;
|
|
35
|
+
xcuitestFindOptimizations: boolean;
|
|
36
|
+
udid: string;
|
|
37
|
+
simpleIsVisibleCheck: boolean;
|
|
38
|
+
bundleId: string;
|
|
39
|
+
assert_javascript_enabled: boolean;
|
|
40
|
+
audioStreamInfo: JsonString;
|
|
41
|
+
entityType: string;
|
|
42
|
+
host: string;
|
|
43
|
+
internalPureAppiumFlow: boolean;
|
|
44
|
+
options: PerfectoRealDeviceCapabilityOptions;
|
|
45
|
+
password: string;
|
|
46
|
+
scriptName: string;
|
|
47
|
+
securePureAppiumFlow: boolean;
|
|
48
|
+
serverConnector: string;
|
|
49
|
+
testRunWithPureAppiumFlow: boolean;
|
|
50
|
+
mcmExecutionId: string;
|
|
51
|
+
};
|
|
52
|
+
export type PerfectoVirtualDeviceCapabilityOptions = {
|
|
53
|
+
platformName: string;
|
|
54
|
+
manufacturer?: string;
|
|
55
|
+
model?: string;
|
|
56
|
+
platformVersion?: string;
|
|
57
|
+
useVirtualDevice?: boolean;
|
|
58
|
+
securityToken: string;
|
|
59
|
+
'report.parentExecutionId': string;
|
|
60
|
+
sessionType: string;
|
|
61
|
+
cloud: string;
|
|
62
|
+
userContextStack: JsonString;
|
|
63
|
+
};
|
|
64
|
+
export type PerfectoVirtualDeviceCapability = PerfectoDeviceCapabilityBase & {
|
|
65
|
+
mjpegServerPort: number;
|
|
66
|
+
simulatorStartupTimeout: number;
|
|
67
|
+
automationName: string;
|
|
68
|
+
udid: string;
|
|
69
|
+
usePrebuiltWDA: boolean;
|
|
70
|
+
'appium:mjpegServerPort': string;
|
|
71
|
+
'appium:simulatorStartupTimeout': number;
|
|
72
|
+
'appium:automationName': string;
|
|
73
|
+
'appium:platformVersion': string;
|
|
74
|
+
manufacturer: string;
|
|
75
|
+
'appium:udid': string;
|
|
76
|
+
'perfecto:options': PerfectoVirtualDeviceCapabilityOptions;
|
|
77
|
+
model: string;
|
|
78
|
+
'appium:deviceName': string;
|
|
79
|
+
useVirtualDevice: boolean;
|
|
80
|
+
'appium:usePrebuiltWDA': boolean;
|
|
81
|
+
};
|
|
82
|
+
export type PerfectoWebDeviceCapabilityChrome = {
|
|
83
|
+
chromedriverVersion: string;
|
|
84
|
+
userDataDir: string;
|
|
85
|
+
};
|
|
86
|
+
export type PerfectoWebDeviceCapabilityTimeouts = {
|
|
87
|
+
implicit: number;
|
|
88
|
+
pageLoad: number;
|
|
89
|
+
script: number;
|
|
90
|
+
};
|
|
91
|
+
export type PerfectoWebDeviceCapability = {
|
|
92
|
+
acceptInsecureCerts: boolean;
|
|
93
|
+
'appium:automationName': string;
|
|
94
|
+
browserName: string;
|
|
95
|
+
browserVersion: string;
|
|
96
|
+
chrome: PerfectoWebDeviceCapabilityChrome;
|
|
97
|
+
'fedcm:accounts': boolean;
|
|
98
|
+
'goog:chromeOptions': {
|
|
99
|
+
debuggerAddress: string;
|
|
100
|
+
};
|
|
101
|
+
'goog:processID': number;
|
|
102
|
+
networkConnectionEnabled: boolean;
|
|
103
|
+
pageLoadStrategy: string;
|
|
104
|
+
platformName: string;
|
|
105
|
+
proxy: Record<string, unknown>;
|
|
106
|
+
'se:bidiEnabled': boolean;
|
|
107
|
+
setWindowRect: boolean;
|
|
108
|
+
strictFileInteractability: boolean;
|
|
109
|
+
timeouts: PerfectoWebDeviceCapabilityTimeouts;
|
|
110
|
+
unhandledPromptBehavior: string;
|
|
111
|
+
'webauthn:extension:credBlob': boolean;
|
|
112
|
+
'webauthn:extension:largeBlob': boolean;
|
|
113
|
+
'webauthn:extension:minPinLength': boolean;
|
|
114
|
+
'webauthn:extension:prf': boolean;
|
|
115
|
+
'webauthn:virtualAuthenticators': boolean;
|
|
116
|
+
stopUrl: UrlString;
|
|
117
|
+
platformVersion: string;
|
|
118
|
+
streamInfo: JsonString;
|
|
119
|
+
location: string;
|
|
120
|
+
resolution: string;
|
|
121
|
+
testGridReportUrl: UrlString;
|
|
122
|
+
reportPdfUrl: UrlString;
|
|
123
|
+
executionId: string;
|
|
124
|
+
platform: JsonString;
|
|
125
|
+
deviceSessionId: string;
|
|
126
|
+
};
|
|
127
|
+
export type PerfectoDeviceCapability = PerfectoRealDeviceCapability | PerfectoVirtualDeviceCapability | PerfectoWebDeviceCapability;
|
|
128
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"perfecto-device-capabilities.js","sourceRoot":"","sources":["../../../../../libs/execution-helpers-public/src/types/perfecto-device-capabilities.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-utils.js","sourceRoot":"","sources":["../../../../../libs/execution-helpers-public/src/types/type-utils.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DesiredDeviceCapability } from './desired-device-capabilities';
|
|
2
|
+
export type VariableDataType = 'BooleanData' | 'HandsetData' | 'IntegerData' | 'MediaData' | 'StringData' | 'TableData' | 'UrlData';
|
|
3
|
+
export type UserDefinedVariables = {
|
|
4
|
+
[variableName: string]: UserDefinedVariable;
|
|
5
|
+
};
|
|
6
|
+
export type UserDefinedVariable = {
|
|
7
|
+
value: string;
|
|
8
|
+
secured: boolean;
|
|
9
|
+
'@type': VariableDataType;
|
|
10
|
+
key?: DesiredDeviceCapability;
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-defined-variables.js","sourceRoot":"","sources":["../../../../../libs/execution-helpers-public/src/types/user-defined-variables.ts"],"names":[],"mappings":""}
|