expect-webdriverio 5.2.1 → 5.2.2
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/package.json +16 -16
- package/types/expect-webdriverio.d.ts +16 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expect-webdriverio",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.2",
|
|
4
4
|
"author": "Mykola Grybyk <mykola.grybyk@gmail.com>",
|
|
5
5
|
"description": "WebdriverIO Assertion Library",
|
|
6
6
|
"license": "MIT",
|
|
@@ -58,29 +58,29 @@
|
|
|
58
58
|
"prepare": "husky install"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@vitest/snapshot": "^3.2.
|
|
61
|
+
"@vitest/snapshot": "^3.2.1",
|
|
62
62
|
"expect": "^29.7.0",
|
|
63
63
|
"jest-matcher-utils": "^29.7.0",
|
|
64
64
|
"lodash.isequal": "^4.5.0"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@types/debug": "^4.1.12",
|
|
68
|
-
"@types/jest": "^29.5.
|
|
68
|
+
"@types/jest": "^29.5.14",
|
|
69
69
|
"@types/lodash.isequal": "^4.5.8",
|
|
70
|
-
"@types/node": "^22.
|
|
71
|
-
"@vitest/coverage-v8": "^3.
|
|
72
|
-
"@wdio/eslint": "^0.1.
|
|
73
|
-
"@wdio/types": "^9.
|
|
74
|
-
"c8": "^10.1.
|
|
75
|
-
"eslint": "^9.
|
|
76
|
-
"husky": "^9.1.
|
|
77
|
-
"npm-run-all2": "^
|
|
78
|
-
"release-it": "^19.0.
|
|
70
|
+
"@types/node": "^22.15.29",
|
|
71
|
+
"@vitest/coverage-v8": "^3.2.1",
|
|
72
|
+
"@wdio/eslint": "^0.1.1",
|
|
73
|
+
"@wdio/types": "^9.15.0",
|
|
74
|
+
"c8": "^10.1.3",
|
|
75
|
+
"eslint": "^9.28.0",
|
|
76
|
+
"husky": "^9.1.7",
|
|
77
|
+
"npm-run-all2": "^8.0.4",
|
|
78
|
+
"release-it": "^19.0.3",
|
|
79
79
|
"rimraf": "^6.0.1",
|
|
80
|
-
"shelljs": "^0.
|
|
81
|
-
"typescript": "^5.
|
|
82
|
-
"vitest": "^3.
|
|
83
|
-
"webdriverio": "^9.
|
|
80
|
+
"shelljs": "^0.10.0",
|
|
81
|
+
"typescript": "^5.8.3",
|
|
82
|
+
"vitest": "^3.2.1",
|
|
83
|
+
"webdriverio": "^9.15.0"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
86
|
"@wdio/globals": "^9.0.0",
|
|
@@ -1,16 +1,24 @@
|
|
|
1
|
+
type ServiceInstance = import('@wdio/types').Services.ServiceInstance;
|
|
2
|
+
type Test = import('@wdio/types').Frameworks.Test;
|
|
3
|
+
type TestResult = import('@wdio/types').Frameworks.TestResult;
|
|
4
|
+
type PickleStep = import('@wdio/types').Frameworks.PickleStep;
|
|
5
|
+
type Scenario = import('@wdio/types').Frameworks.Scenario;
|
|
6
|
+
type SnapshotResult = import('@vitest/snapshot').SnapshotResult;
|
|
7
|
+
type SnapshotUpdateState = import('@vitest/snapshot').SnapshotUpdateState;
|
|
8
|
+
|
|
1
9
|
declare namespace ExpectWebdriverIO {
|
|
2
10
|
const expect: ExpectWebdriverIO.Expect
|
|
3
11
|
function setOptions(options: DefaultOptions): void
|
|
4
12
|
function getConfig(): any
|
|
5
13
|
|
|
6
14
|
interface SnapshotServiceArgs {
|
|
7
|
-
updateState?:
|
|
15
|
+
updateState?: SnapshotUpdateState
|
|
8
16
|
resolveSnapshotPath?: (path: string, extension: string) => string
|
|
9
17
|
}
|
|
10
18
|
|
|
11
19
|
class SnapshotService {
|
|
12
|
-
static initiate(options: SnapshotServiceArgs):
|
|
13
|
-
results:
|
|
20
|
+
static initiate(options: SnapshotServiceArgs): ServiceInstance & {
|
|
21
|
+
results: SnapshotResult[]
|
|
14
22
|
}
|
|
15
23
|
}
|
|
16
24
|
|
|
@@ -35,12 +43,12 @@ declare namespace ExpectWebdriverIO {
|
|
|
35
43
|
autoAssertOnTestEnd?: boolean;
|
|
36
44
|
}
|
|
37
45
|
|
|
38
|
-
class SoftAssertionService implements
|
|
46
|
+
class SoftAssertionService implements ServiceInstance {
|
|
39
47
|
constructor(serviceOptions?: SoftAssertionServiceOptions, capabilities?: any, config?: any);
|
|
40
|
-
beforeTest(test:
|
|
41
|
-
beforeStep(step:
|
|
42
|
-
afterTest(test:
|
|
43
|
-
afterStep(step:
|
|
48
|
+
beforeTest(test: Test): void;
|
|
49
|
+
beforeStep(step: PickleStep, scenario: Scenario): void;
|
|
50
|
+
afterTest(test: Test, context: any, result: TestResult): void;
|
|
51
|
+
afterStep(step: PickleStep, scenario: Scenario, result: { passed: boolean, error?: Error }): void;
|
|
44
52
|
}
|
|
45
53
|
|
|
46
54
|
interface AssertionResult {
|