@wdio/utils 7.6.0 → 7.7.5
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"envDetector.d.ts","sourceRoot":"","sources":["../src/envDetector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAQ/C;;;;GAIG;AACH,wBAAgB,KAAK,CAAE,YAAY,CAAC,EAAE,YAAY,CAAC,mBAAmB,
|
|
1
|
+
{"version":3,"file":"envDetector.d.ts","sourceRoot":"","sources":["../src/envDetector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAQ/C;;;;GAIG;AACH,wBAAgB,KAAK,CAAE,YAAY,CAAC,EAAE,YAAY,CAAC,mBAAmB,WAiCrE;AAiHD;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAAE,YAAY,EAAE,YAAY,CAAC,YAAY,EAAE,kBAAkB,EAAE,MAAM;;;;;;EAInH;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAE,EAAE,YAAY,EAAE,qBAAqB,EAAE,EAAE;IAAE,YAAY,CAAC,EAAE,YAAY,CAAC,mBAAmB,CAAC;IAAC,qBAAqB,CAAC,EAAE,YAAY,CAAC,mBAAmB,GAAG,YAAY,CAAC,eAAe,CAAA;CAAE;;;;;;;;EAUhO;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAE,EAAE,WAAW,EAAE,EAAE,YAAY,CAAC,YAAY;;;;;;;;;EAWtF;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAE,YAAY,EAAE,YAAY,CAAC,YAAY;;;;;;EAQpF"}
|
package/build/envDetector.js
CHANGED
|
@@ -28,10 +28,14 @@ function isW3C(capabilities) {
|
|
|
28
28
|
const isAppium = Boolean(capabilities.automationName ||
|
|
29
29
|
capabilities.deviceName ||
|
|
30
30
|
capabilities.appiumVersion);
|
|
31
|
-
const hasW3CCaps = Boolean(
|
|
32
|
-
|
|
31
|
+
const hasW3CCaps = Boolean(
|
|
32
|
+
/**
|
|
33
|
+
* safari docker image may not provide a platformName therefore
|
|
34
|
+
* check one of the available "platformName" or "browserVersion"
|
|
35
|
+
*/
|
|
36
|
+
(capabilities.platformName || capabilities.browserVersion) &&
|
|
33
37
|
/**
|
|
34
|
-
* local safari and BrowserStack don't provide platformVersion
|
|
38
|
+
* local safari and BrowserStack don't provide platformVersion therefore
|
|
35
39
|
* check also if setWindowRect is provided
|
|
36
40
|
*/
|
|
37
41
|
(capabilities.platformVersion || Object.prototype.hasOwnProperty.call(capabilities, 'setWindowRect')));
|
|
@@ -72,7 +72,7 @@ const testFrameworkFnWrapper = async function ({ executeHooksWithArgs, executeAs
|
|
|
72
72
|
passed: !error
|
|
73
73
|
});
|
|
74
74
|
await errorHandler_1.logHookError(`After${type}`, await executeHooksWithArgs(`after${type}`, afterFn, [...afterArgs]), cid);
|
|
75
|
-
if (error) {
|
|
75
|
+
if (error && !error.matcherName) {
|
|
76
76
|
throw error;
|
|
77
77
|
}
|
|
78
78
|
return result;
|
package/build/utils.d.ts
CHANGED
|
@@ -21,8 +21,10 @@ export declare function commandCallStructure(commandName: string, args: any[]):
|
|
|
21
21
|
*/
|
|
22
22
|
export declare function transformCommandLogResult(result: {
|
|
23
23
|
file?: string;
|
|
24
|
-
|
|
24
|
+
script?: string;
|
|
25
|
+
}): "\"<Screenshot[base64]>\"" | "\"<Script[base64]>\"" | {
|
|
25
26
|
file?: string | undefined;
|
|
27
|
+
script?: string | undefined;
|
|
26
28
|
};
|
|
27
29
|
/**
|
|
28
30
|
* checks if command argument is valid according to specificiation
|
package/build/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAW,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAW,MAAM,aAAa,CAAA;AAKpD;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,gBAAgB,EAAE;IAAE,sBAAsB,CAAC,EAAE;QAAE,KAAK,EAAE,GAAG,CAAA;KAAE,CAAC;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,QAsCzH;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,UA+BrE;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAE,MAAM,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE;;;EAQpF;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAE,GAAG,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,WA8B/D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAE,GAAG,EAAE,GAAG,wGAExC;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAE,IAAI,EAAE,MAAM,GAAG,QAAQ,CAAC,aAAa,GAAG,IAAI,CAoCxE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAE,EAAE,EAAE,QAAQ,WAE5C;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAE,IAAI,EAAE,GAAG,EAAE,SAE1C;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,WAanC;AAED;;;;GAIG;AACH,eAAO,MAAM,SAAS,SAAU,MAAM,YAWrC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,KAAK,mCAAoD,CAAA"}
|
package/build/utils.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.sleep = exports.canAccess = exports.isBase64 = exports.filterSpecArgs =
|
|
|
7
7
|
const fs_1 = __importDefault(require("fs"));
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
const SCREENSHOT_REPLACEMENT = '"<Screenshot[base64]>"';
|
|
10
|
+
const SCRIPT_PLACEHOLDER = '"<Script[base64]>"';
|
|
10
11
|
/**
|
|
11
12
|
* overwrite native element commands with user defined
|
|
12
13
|
* @param {object} propertiesObject propertiesObject
|
|
@@ -92,6 +93,9 @@ function transformCommandLogResult(result) {
|
|
|
92
93
|
if (typeof result.file === 'string' && isBase64(result.file)) {
|
|
93
94
|
return SCREENSHOT_REPLACEMENT;
|
|
94
95
|
}
|
|
96
|
+
else if (typeof result.script === 'string' && isBase64(result.script)) {
|
|
97
|
+
return SCRIPT_PLACEHOLDER;
|
|
98
|
+
}
|
|
95
99
|
return result;
|
|
96
100
|
}
|
|
97
101
|
exports.transformCommandLogResult = transformCommandLogResult;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/utils",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.7.5",
|
|
4
4
|
"description": "A WDIO helper utility to provide several utility functions used across the project.",
|
|
5
5
|
"author": "Christian Bromann <christian@saucelabs.com>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-utils",
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
"url": "https://github.com/webdriverio/webdriverio/issues"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@wdio/logger": "7.
|
|
27
|
-
"@wdio/types": "7.
|
|
26
|
+
"@wdio/logger": "7.7.0",
|
|
27
|
+
"@wdio/types": "7.7.5"
|
|
28
28
|
},
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
32
|
"types": "./build/index.d.ts",
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "3cbc9645fdf42e24d6306bc5ac42c34920093970"
|
|
34
34
|
}
|