expect-webdriverio 5.4.1 → 5.4.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.
|
@@ -13,7 +13,7 @@ async function condition(el, text, options) {
|
|
|
13
13
|
: compareText(actualText, text, options).result;
|
|
14
14
|
resultArray.push(result);
|
|
15
15
|
}
|
|
16
|
-
checkAllValuesMatchCondition = resultArray.every(
|
|
16
|
+
checkAllValuesMatchCondition = resultArray.every(Boolean);
|
|
17
17
|
}
|
|
18
18
|
else {
|
|
19
19
|
const actualText = await el.getText();
|
|
@@ -89,13 +89,13 @@ const headersMatcher = (headers, expected) => {
|
|
|
89
89
|
return equals(headers, expected);
|
|
90
90
|
};
|
|
91
91
|
const isMatcher = (filter) => {
|
|
92
|
+
const proto = Object.getPrototypeOf(filter);
|
|
92
93
|
return (typeof filter === 'object' &&
|
|
93
94
|
filter !== null &&
|
|
94
|
-
'
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
typeof filter.__proto__.asymmetricMatch === 'function');
|
|
95
|
+
typeof proto === 'object' &&
|
|
96
|
+
proto &&
|
|
97
|
+
'asymmetricMatch' in proto &&
|
|
98
|
+
typeof proto.asymmetricMatch === 'function');
|
|
99
99
|
};
|
|
100
100
|
const minifyRequestMock = (requestMock, requestedWith) => {
|
|
101
101
|
if (typeof requestMock === 'undefined') {
|
package/lib/utils.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import deepEql from 'deep-eql';
|
|
2
2
|
import { expect } from 'expect';
|
|
3
3
|
import { DEFAULT_OPTIONS } from './constants.js';
|
|
4
4
|
import { wrapExpectedWithArray } from './util/elementsUtil.js';
|
|
@@ -117,7 +117,6 @@ export const compareText = (actual, expected, { ignoreCase = false, trim = true,
|
|
|
117
117
|
result
|
|
118
118
|
};
|
|
119
119
|
}
|
|
120
|
-
expected = expected;
|
|
121
120
|
if (expected instanceof RegExp) {
|
|
122
121
|
return {
|
|
123
122
|
value: actual,
|
|
@@ -215,7 +214,7 @@ export const compareObject = (actual, expected) => {
|
|
|
215
214
|
}
|
|
216
215
|
return {
|
|
217
216
|
value: actual,
|
|
218
|
-
result:
|
|
217
|
+
result: deepEql(actual, expected),
|
|
219
218
|
};
|
|
220
219
|
};
|
|
221
220
|
export const compareStyle = async (actualEl, style, { ignoreCase = true, trim = false }) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expect-webdriverio",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.3",
|
|
4
4
|
"author": "Mykola Grybyk <mykola.grybyk@gmail.com>",
|
|
5
5
|
"description": "WebdriverIO Assertion Library",
|
|
6
6
|
"license": "MIT",
|
|
@@ -61,19 +61,17 @@
|
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@vitest/snapshot": "^3.2.4",
|
|
64
|
+
"deep-eql": "^5.0.2",
|
|
64
65
|
"expect": "^30.0.0",
|
|
65
|
-
"jest-matcher-utils": "^30.0.0"
|
|
66
|
-
"lodash.isequal": "^4.5.0"
|
|
66
|
+
"jest-matcher-utils": "^30.0.0"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@types/debug": "^4.1.12",
|
|
70
70
|
"@types/jest": "^30.0.0",
|
|
71
|
-
"@types/lodash.isequal": "^4.5.8",
|
|
72
71
|
"@types/node": "^24.0.3",
|
|
73
72
|
"@vitest/coverage-v8": "^3.2.4",
|
|
74
73
|
"@wdio/eslint": "^0.1.1",
|
|
75
74
|
"@wdio/types": "^9.15.0",
|
|
76
|
-
"c8": "^10.1.3",
|
|
77
75
|
"eslint": "^9.29.0",
|
|
78
76
|
"husky": "^9.1.7",
|
|
79
77
|
"npm-run-all2": "^8.0.4",
|