@wdio/utils 5.16.13 → 5.16.15
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/build/shim.js +14 -12
- package/build/test-framework/testFnWrapper.js +1 -1
- package/package.json +2 -2
package/build/shim.js
CHANGED
|
@@ -61,7 +61,7 @@ let wrapCommand = function wrapCommand(commandName, fn) {
|
|
|
61
61
|
return async function wrapCommandFn(...args) {
|
|
62
62
|
const beforeHookArgs = [commandName, args];
|
|
63
63
|
|
|
64
|
-
if (!inCommandHook) {
|
|
64
|
+
if (!inCommandHook && this.options.beforeCommand) {
|
|
65
65
|
inCommandHook = true;
|
|
66
66
|
await executeHooksWithArgs.call(this, this.options.beforeCommand, beforeHookArgs);
|
|
67
67
|
inCommandHook = false;
|
|
@@ -76,7 +76,7 @@ let wrapCommand = function wrapCommand(commandName, fn) {
|
|
|
76
76
|
commandError = err;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
if (!inCommandHook) {
|
|
79
|
+
if (!inCommandHook && this.options.afterCommand) {
|
|
80
80
|
inCommandHook = true;
|
|
81
81
|
const afterHookArgs = [...beforeHookArgs, commandResult, commandError];
|
|
82
82
|
await executeHooksWithArgs.call(this, this.options.afterCommand, afterHookArgs);
|
|
@@ -94,7 +94,7 @@ let wrapCommand = function wrapCommand(commandName, fn) {
|
|
|
94
94
|
exports.wrapCommand = wrapCommand;
|
|
95
95
|
|
|
96
96
|
let executeSync = async function (fn, retries, args = []) {
|
|
97
|
-
this.
|
|
97
|
+
this.wdioRetries = retries.attempts;
|
|
98
98
|
|
|
99
99
|
try {
|
|
100
100
|
let res = fn.apply(this, args);
|
|
@@ -117,7 +117,7 @@ let executeSync = async function (fn, retries, args = []) {
|
|
|
117
117
|
exports.executeSync = executeSync;
|
|
118
118
|
|
|
119
119
|
const executeAsync = async function (fn, retries, args = []) {
|
|
120
|
-
this.
|
|
120
|
+
this.wdioRetries = retries.attempts;
|
|
121
121
|
|
|
122
122
|
try {
|
|
123
123
|
return await fn.apply(this, args);
|
|
@@ -134,12 +134,14 @@ const executeAsync = async function (fn, retries, args = []) {
|
|
|
134
134
|
exports.executeAsync = executeAsync;
|
|
135
135
|
|
|
136
136
|
try {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
137
|
+
if (!process.env.WDIO_NO_SYNC_SUPPORT) {
|
|
138
|
+
const wdioSync = require('@wdio/sync');
|
|
139
|
+
|
|
140
|
+
exports.hasWdioSyncSupport = hasWdioSyncSupport = true;
|
|
141
|
+
exports.runFnInFiberContext = runFnInFiberContext = wdioSync.runFnInFiberContext;
|
|
142
|
+
exports.wrapCommand = wrapCommand = wdioSync.wrapCommand;
|
|
143
|
+
exports.executeHooksWithArgs = executeHooksWithArgs = wdioSync.executeHooksWithArgs;
|
|
144
|
+
exports.executeSync = executeSync = wdioSync.executeSync;
|
|
145
|
+
exports.runSync = runSync = wdioSync.runSync;
|
|
146
|
+
}
|
|
145
147
|
} catch (_unused) {}
|
|
@@ -13,7 +13,7 @@ var _shim = require("../shim");
|
|
|
13
13
|
|
|
14
14
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
15
15
|
|
|
16
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
16
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
17
17
|
|
|
18
18
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
19
19
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/utils",
|
|
3
|
-
"version": "5.16.
|
|
3
|
+
"version": "5.16.15",
|
|
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/master/packages/wdio-utils",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "3f388c0f8b5b3ff56db62c6183dd92cdf39df0f3"
|
|
41
41
|
}
|