@wdio/browser-runner 8.28.0 → 8.28.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.
@@ -1 +1 @@
1
- {"version":3,"file":"expect.d.ts","sourceRoot":"","sources":["../../src/browser/expect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA2E,MAAM,QAAQ,CAAA;AAkHxG,OAAO,EAAE,MAAM,EAAE,CAAA"}
1
+ {"version":3,"file":"expect.d.ts","sourceRoot":"","sources":["../../src/browser/expect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA2E,MAAM,QAAQ,CAAA;AA2HxG,OAAO,EAAE,MAAM,EAAE,CAAA"}
@@ -58,6 +58,14 @@ expect.extend(matchers.reduce((acc, matcherName) => {
58
58
  if (context instanceof Element) {
59
59
  expectRequest.element = await $(context);
60
60
  }
61
+ /**
62
+ * Avoid serialization issues when sending over the element. If we create
63
+ * an element from an existing HTMLElement, it might have custom properties
64
+ * attached to it that can't be serialized.
65
+ */
66
+ if (typeof expectRequest.element?.selector !== 'string') {
67
+ expectRequest.element.selector = undefined;
68
+ }
61
69
  import.meta.hot.send(WDIO_EVENT_NAME, { type: MESSAGE_TYPES.expectRequestMessage, value: expectRequest });
62
70
  const contextString = 'elementId' in context ? 'WebdriverIO.Element' : 'WebdriverIO.Browser';
63
71
  return new Promise((resolve, reject) => {
@@ -35,7 +35,7 @@ export const DEFAULT_VITE_CONFIG = {
35
35
  * the following deps are CJS packages and need to be optimized (compiled to ESM) by Vite
36
36
  */
37
37
  include: [
38
- 'expect', 'minimatch', 'css-shorthand-properties', 'lodash.merge', 'lodash.zip',
38
+ 'expect', 'minimatch', 'css-shorthand-properties', 'lodash.merge', 'lodash.zip', 'ws',
39
39
  'lodash.clonedeep', 'lodash.pickby', 'lodash.flattendeep', 'aria-query', 'grapheme-splitter',
40
40
  'css-value', 'rgb2hex', 'p-iteration', 'deepmerge-ts', 'jest-util', 'jest-matcher-utils', 'split2'
41
41
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdio/browser-runner",
3
- "version": "8.28.0",
3
+ "version": "8.28.3",
4
4
  "description": "A WebdriverIO runner to run unit tests tests in the browser.",
5
5
  "author": "Christian Bromann <mail@bromann.dev>",
6
6
  "homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-browser-runner",
@@ -68,5 +68,5 @@
68
68
  "publishConfig": {
69
69
  "access": "public"
70
70
  },
71
- "gitHead": "15f6ac509df48b23477cd4c793206a4f707e3df0"
71
+ "gitHead": "e976becd08fb203488cba07c9771e55a7dda273a"
72
72
  }