@wdio/utils 8.27.2 → 8.28.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/build/monad.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monad.d.ts","sourceRoot":"","sources":["../src/monad.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"monad.d.ts","sourceRoot":"","sources":["../src/monad.ts"],"names":[],"mappings":"AAaA,UAAU,gBAAgB;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,kBAAkB,CAAA;CAC7C;AAED,MAAM,CAAC,OAAO,UAAU,SAAS,CAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,QAAQ,CAAC,EAAE,QAAQ,EAAE,gBAAgB,GAAE,gBAAqB;WAkBpG,IAAI,aAAa,MAAM,mBAAmB,QAAQ;IAsIvE;;;;;;OAMG;eACyB,MAAM,QAAQ,QAAQ,SAAS,OAAO,MAAM,EAAE,GAAG,CAAC,gBAAgB,QAAQ;EA8CzG"}
|
package/build/monad.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from 'node:events';
|
|
2
2
|
import logger from '@wdio/logger';
|
|
3
|
+
import { MESSAGE_TYPES } from '@wdio/types';
|
|
3
4
|
import { commandCallStructure, overwriteElementCommands } from './utils.js';
|
|
4
5
|
const SCOPE_TYPES = {
|
|
5
6
|
browser: /* istanbul ignore next */ function Browser() { },
|
|
@@ -82,6 +83,28 @@ export default function WebDriver(options, modifier, propertiesObject = {}) {
|
|
|
82
83
|
else {
|
|
83
84
|
unit.lift(name, customCommand, proto);
|
|
84
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* When running component tests, custom commands might not be recognised when services attach them to the browser.
|
|
88
|
+
* This is because the `addCommand` function is called within the Node.js environment and not the browser.
|
|
89
|
+
* As a workaround, we check here if we are in a worker process and if so we send a message to the parent process
|
|
90
|
+
* to add the command to the browser.
|
|
91
|
+
*
|
|
92
|
+
* @todo(Christian): this won't be sufficient, e.g. in cases where the page is reloaded and the command is not re-added.
|
|
93
|
+
*/
|
|
94
|
+
if (typeof process.send === 'function' && process.env.WDIO_WORKER_ID) {
|
|
95
|
+
const message = {
|
|
96
|
+
origin: 'worker',
|
|
97
|
+
name: 'workerEvent',
|
|
98
|
+
args: {
|
|
99
|
+
type: MESSAGE_TYPES.customCommand,
|
|
100
|
+
value: {
|
|
101
|
+
commandName: name,
|
|
102
|
+
cid: process.env.WDIO_WORKER_ID,
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
process.send(message);
|
|
107
|
+
}
|
|
85
108
|
};
|
|
86
109
|
/**
|
|
87
110
|
* overwriteCommand
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testFnWrapper.d.ts","sourceRoot":"","sources":["../../src/test-framework/testFnWrapper.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACR,cAAc,EACd,YAAY,EACZ,eAAe,EACf,cAAc,EACjB,MAAM,YAAY,CAAA;AASnB;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,aAAa,SAChB,OAAO,wNAahB,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,sBAAsB,SACzB,OAAO,0CAC2B,cAAc,QAChD,MAAM,0BACY,YAAY,8BACR,gBAAgB,OAAO,CAAC,4BAC1B,eAAe,OAAO,CAAC,OAC5C,MAAM,kCAEA,MAAM,YACP,MAAM,qBA0CnB,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,UAAW,MAAM,KAAG,
|
|
1
|
+
{"version":3,"file":"testFnWrapper.d.ts","sourceRoot":"","sources":["../../src/test-framework/testFnWrapper.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACR,cAAc,EACd,YAAY,EACZ,eAAe,EACf,cAAc,EACjB,MAAM,YAAY,CAAA;AASnB;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,aAAa,SAChB,OAAO,wNAahB,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,sBAAsB,SACzB,OAAO,0CAC2B,cAAc,QAChD,MAAM,0BACY,YAAY,8BACR,gBAAgB,OAAO,CAAC,4BAC1B,eAAe,OAAO,CAAC,OAC5C,MAAM,kCAEA,MAAM,YACP,MAAM,qBA0CnB,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,UAAW,MAAM,KAAG,MAMhD,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/utils",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.28.0",
|
|
4
4
|
"description": "A WDIO helper utility to provide several utility functions used across the project.",
|
|
5
5
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-utils",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@puppeteer/browsers": "^1.6.0",
|
|
41
|
-
"@wdio/logger": "8.
|
|
42
|
-
"@wdio/types": "8.
|
|
41
|
+
"@wdio/logger": "8.28.0",
|
|
42
|
+
"@wdio/types": "8.28.0",
|
|
43
43
|
"decamelize": "^6.0.0",
|
|
44
44
|
"deepmerge-ts": "^5.1.0",
|
|
45
45
|
"edgedriver": "^5.3.5",
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "15f6ac509df48b23477cd4c793206a4f707e3df0"
|
|
58
58
|
}
|