expect-webdriverio 4.7.2 → 4.8.1
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/lib/matchers.js +2 -0
- package/package.json +17 -18
- package/types/expect-webdriverio.d.ts +6 -1
- package/types/jest-global.d.ts +1 -0
- package/types/standalone.d.ts +1 -1
package/lib/matchers.js
CHANGED
|
@@ -14,6 +14,7 @@ import * as toHaveAttribute from './matchers/element/toHaveAttribute.js';
|
|
|
14
14
|
import * as toHaveChildren from './matchers/element/toHaveChildren.js';
|
|
15
15
|
import * as toHaveClass from './matchers/element/toHaveClass.js';
|
|
16
16
|
import * as toHaveHref from './matchers/element/toHaveHref.js';
|
|
17
|
+
import * as toHaveHTML from './matchers/element/toHaveHTML.js';
|
|
17
18
|
import * as toHaveId from './matchers/element/toHaveId.js';
|
|
18
19
|
import * as toHaveSize from './matchers/element/toHaveSize.js';
|
|
19
20
|
import * as toHaveElementProperty from './matchers/element/toHaveElementProperty.js';
|
|
@@ -40,6 +41,7 @@ const matchers = {
|
|
|
40
41
|
...toHaveChildren,
|
|
41
42
|
...toHaveClass,
|
|
42
43
|
...toHaveHref,
|
|
44
|
+
...toHaveHTML,
|
|
43
45
|
...toHaveId,
|
|
44
46
|
...toHaveSize,
|
|
45
47
|
...toHaveElementProperty,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expect-webdriverio",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.8.1",
|
|
4
4
|
"author": "Mykola Grybyk <mykola.grybyk@gmail.com>",
|
|
5
5
|
"description": "WebdriverIO Assertion Library",
|
|
6
6
|
"license": "MIT",
|
|
@@ -59,30 +59,29 @@
|
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@types/debug": "^4.1.12",
|
|
62
|
-
"@types/jest": "^29.5.
|
|
62
|
+
"@types/jest": "^29.5.11",
|
|
63
63
|
"@types/lodash.isequal": "^4.5.8",
|
|
64
|
-
"@types/node": "^20.
|
|
65
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
66
|
-
"@typescript-eslint/parser": "^6.
|
|
67
|
-
"@vitest/coverage-v8": "^
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"eslint": "^
|
|
71
|
-
"eslint-plugin-
|
|
72
|
-
"eslint-plugin-unicorn": "^49.0.0",
|
|
64
|
+
"@types/node": "^20.10.6",
|
|
65
|
+
"@typescript-eslint/eslint-plugin": "^6.17.0",
|
|
66
|
+
"@typescript-eslint/parser": "^6.17.0",
|
|
67
|
+
"@vitest/coverage-v8": "^1.1.3",
|
|
68
|
+
"c8": "^9.0.0",
|
|
69
|
+
"eslint": "^8.56.0",
|
|
70
|
+
"eslint-plugin-import": "^2.29.1",
|
|
71
|
+
"eslint-plugin-unicorn": "^50.0.1",
|
|
73
72
|
"husky": "^8.0.3",
|
|
74
73
|
"npm-run-all": "^4.1.5",
|
|
75
|
-
"release-it": "^17.0.
|
|
74
|
+
"release-it": "^17.0.1",
|
|
76
75
|
"rimraf": "^5.0.5",
|
|
77
76
|
"shelljs": "^0.8.5",
|
|
78
|
-
"typescript": "^5.
|
|
79
|
-
"vitest": "
|
|
80
|
-
"webdriverio": "8.
|
|
77
|
+
"typescript": "^5.3.3",
|
|
78
|
+
"vitest": "1.1.3",
|
|
79
|
+
"webdriverio": "8.27.0"
|
|
81
80
|
},
|
|
82
81
|
"optionalDependencies": {
|
|
83
|
-
"@wdio/globals": "^8.
|
|
84
|
-
"@wdio/logger": "^8.
|
|
85
|
-
"webdriverio": "^8.
|
|
82
|
+
"@wdio/globals": "^8.27.0",
|
|
83
|
+
"@wdio/logger": "^8.24.12",
|
|
84
|
+
"webdriverio": "^8.27.0"
|
|
86
85
|
},
|
|
87
86
|
"dependencies": {
|
|
88
87
|
"expect": "^29.7.0",
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
declare namespace ExpectWebdriverIO {
|
|
2
|
+
/**
|
|
3
|
+
* expect function declaration, containing two generics:
|
|
4
|
+
* - T: the type of the actual value, e.g. WebdriverIO.Browser or WebdriverIO.Element
|
|
5
|
+
* - R: the type of the return value, e.g. Promise<void> or void
|
|
6
|
+
*/
|
|
2
7
|
function expect<T = unknown, R extends void | Promise<void> = void | Promise<void>>(
|
|
3
8
|
actual: T
|
|
4
9
|
): Matchers<R, T>
|
|
@@ -22,7 +27,7 @@ declare namespace ExpectWebdriverIO {
|
|
|
22
27
|
/**
|
|
23
28
|
* name of the matcher, e.g. `toHaveText` or `toBeClickable`
|
|
24
29
|
*/
|
|
25
|
-
matcherName: keyof Matchers<
|
|
30
|
+
matcherName: keyof Matchers<void, unknown>,
|
|
26
31
|
/**
|
|
27
32
|
* Value that the user has passed in
|
|
28
33
|
*
|
package/types/jest-global.d.ts
CHANGED
package/types/standalone.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ declare namespace ExpectWebdriverIO {
|
|
|
15
15
|
extend(map: Record<string, Function>): void
|
|
16
16
|
} & AsymmetricMatchers
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
interface AsymmetricMatchers {
|
|
19
19
|
any(expectedObject: any): PartialMatcher
|
|
20
20
|
anything(): PartialMatcher
|
|
21
21
|
arrayContaining(sample: Array<unknown>): PartialMatcher
|