@mablhq/mabl-cli 1.29.11 → 1.31.3
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/api/featureSet.js +4 -0
- package/browserLauncher/playwrightBrowserLauncher/playwrightBrowser.js +20 -3
- package/browserLauncher/playwrightBrowserLauncher/playwrightBrowserLauncher.js +1 -5
- package/browserLauncher/playwrightBrowserLauncher/playwrightFrame.js +3 -0
- package/commands/tests/testsUtil.js +3 -0
- package/domUtil/index.js +1 -1
- package/execution/index.js +1 -1
- package/index.d.ts +6 -1
- package/mablscript/steps/VisitUrlStep.js +9 -18
- package/mablscriptFind/index.js +1 -1
- package/package.json +3 -3
- package/popupDismissal/index.js +13 -3
- package/resources/mablFind.js +1 -1
- package/resources/pdf-viewer/EmbeddedPdfHandler.js +1 -0
- package/resources/pdf-viewer/index.js +1 -1
- package/resources/pdf-viewer/libEmbeddedPdfHandler.js +4 -4
- package/resources/pdf-viewer/libmablPdfViewer.js +9416 -7480
- package/resources/pdf-viewer/pdf.worker.5953c23fa7251d236190.js +2 -0
- package/resources/pdf-viewer/pdf.worker.5f2736435a8b46d97859.js +81 -0
- package/resources/popupDismissal.js +1 -1
- package/util/actionabilityUtil.js +3 -1
- package/resources/pdf-viewer/pdf.worker.js +0 -81
package/index.d.ts
CHANGED
|
@@ -28,6 +28,11 @@ declare module '@mablhq/mabl-cli' {
|
|
|
28
28
|
export interface HttpHeadersType {
|
|
29
29
|
[key: string]: string;
|
|
30
30
|
}
|
|
31
|
+
export interface HttpConfig {
|
|
32
|
+
proxyHost?: URL;
|
|
33
|
+
sslVerify: boolean;
|
|
34
|
+
proxyType?: string;
|
|
35
|
+
}
|
|
31
36
|
export interface TestRunConfig {
|
|
32
37
|
authToken?: string;
|
|
33
38
|
basicAuthCredentialsId?: string;
|
|
@@ -48,7 +53,7 @@ declare module '@mablhq/mabl-cli' {
|
|
|
48
53
|
keepBrowserOpen?: boolean;
|
|
49
54
|
labelsExclude?: string[];
|
|
50
55
|
labelsInclude?: string[];
|
|
51
|
-
proxy?:
|
|
56
|
+
proxy?: HttpConfig;
|
|
52
57
|
testId?: string;
|
|
53
58
|
runId?: string;
|
|
54
59
|
url?: string;
|
|
@@ -9,9 +9,7 @@ class VisitUrlStep extends MablStep_1.MablStep {
|
|
|
9
9
|
constructor(name, args, actions) {
|
|
10
10
|
super(name, args, actions);
|
|
11
11
|
const arg = this.getActionArgs()[0];
|
|
12
|
-
this.url = VisitUrlStep.
|
|
13
|
-
? VisitUrlStep.normalizeUrlCloudSafe(arg)
|
|
14
|
-
: VisitUrlStep.normalizeUrlWithFileAccess(arg);
|
|
12
|
+
this.url = VisitUrlStep.normalizeUrl(arg);
|
|
15
13
|
}
|
|
16
14
|
getStepName() {
|
|
17
15
|
return 'VisitUrl';
|
|
@@ -31,7 +29,7 @@ class VisitUrlStep extends MablStep_1.MablStep {
|
|
|
31
29
|
}
|
|
32
30
|
toMablscript() {
|
|
33
31
|
const resolvedUrl = this.substituteMablscriptVariable((0, domUtil_1.escapeMablscriptString)(this.url.toString()));
|
|
34
|
-
if (VisitUrlStep.
|
|
32
|
+
if (VisitUrlStep.isFileUrl(resolvedUrl) && !VisitUrlStep.isTestOverride()) {
|
|
35
33
|
throw new Error('Access to local files is not permitted');
|
|
36
34
|
}
|
|
37
35
|
return `visit_url(${resolvedUrl})`;
|
|
@@ -39,13 +37,7 @@ class VisitUrlStep extends MablStep_1.MablStep {
|
|
|
39
37
|
getInputVariables() {
|
|
40
38
|
return MablAction_1.MablAction.findUniqueVariableReferencesInValue(this.url);
|
|
41
39
|
}
|
|
42
|
-
static
|
|
43
|
-
return VisitUrlStep.normalizeUrl(param, true);
|
|
44
|
-
}
|
|
45
|
-
static normalizeUrlWithFileAccess(param) {
|
|
46
|
-
return VisitUrlStep.normalizeUrl(param, false);
|
|
47
|
-
}
|
|
48
|
-
static normalizeUrl(param, cloudSafe) {
|
|
40
|
+
static normalizeUrl(param) {
|
|
49
41
|
const trimmed = param.trim();
|
|
50
42
|
if (param === '') {
|
|
51
43
|
throw new Error('Missing URL');
|
|
@@ -60,19 +52,18 @@ class VisitUrlStep extends MablStep_1.MablStep {
|
|
|
60
52
|
return trimmed;
|
|
61
53
|
}
|
|
62
54
|
if (VisitUrlStep.isFileUrl(trimmed)) {
|
|
63
|
-
if (
|
|
64
|
-
|
|
55
|
+
if (VisitUrlStep.isTestOverride()) {
|
|
56
|
+
return trimmed;
|
|
65
57
|
}
|
|
66
|
-
|
|
58
|
+
throw new Error('Access to local files is not permitted');
|
|
67
59
|
}
|
|
68
60
|
return `http://${trimmed}`;
|
|
69
61
|
}
|
|
70
|
-
static
|
|
71
|
-
return
|
|
72
|
-
process.env.MABL_SIMULATION === 'prod');
|
|
62
|
+
static isTestOverride() {
|
|
63
|
+
return process.env.MABL_SIMULATION === 'mabl-local-testing';
|
|
73
64
|
}
|
|
74
65
|
static isFileUrl(param) {
|
|
75
|
-
return /^file:\/\//.test(param) || /^\\\\/.test(param);
|
|
66
|
+
return (/^file:\/\//.test(param) || /^\\\\/.test(param) || /^\/+/.test(param));
|
|
76
67
|
}
|
|
77
68
|
}
|
|
78
69
|
exports.VisitUrlStep = VisitUrlStep;
|