@wdio/webdriver-mock-service 8.22.0 → 8.23.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/index.js +9 -9
- package/package.json +6 -6
package/build/index.js
CHANGED
|
@@ -96,26 +96,26 @@ export default class WebdriverMockService {
|
|
|
96
96
|
this.nockReset();
|
|
97
97
|
const elemResponse = { [ELEM_PROP]: ELEMENT_ID };
|
|
98
98
|
const elem2Response = { [ELEM_PROP]: ELEMENT_REFETCHED };
|
|
99
|
-
//Found initially
|
|
99
|
+
// Found initially
|
|
100
100
|
this._mock.command.findElement().once().reply(200, { value: elemResponse });
|
|
101
|
-
//Initiate refetch, but its not ready
|
|
101
|
+
// Initiate refetch, but its not ready
|
|
102
102
|
this._mock.command.findElement().once().reply(404, NO_SUCH_ELEMENT);
|
|
103
|
-
//Always return the new element after
|
|
103
|
+
// Always return the new element after
|
|
104
104
|
this._mock.command.findElement().times(4).reply(200, { value: elem2Response });
|
|
105
|
-
//First click works
|
|
105
|
+
// First click works
|
|
106
106
|
this._mock.command.elementClick(ELEMENT_ID).once().reply(200, { value: null });
|
|
107
|
-
//Additional clicks won't for the original element
|
|
108
|
-
this._mock.command.elementClick(ELEMENT_ID).times(
|
|
107
|
+
// Additional clicks won't for the original element
|
|
108
|
+
this._mock.command.elementClick(ELEMENT_ID).times(8).reply(500, {
|
|
109
109
|
value: {
|
|
110
110
|
error: 'stale element reference',
|
|
111
111
|
message: 'element is not attached to the page document'
|
|
112
112
|
}
|
|
113
113
|
});
|
|
114
|
-
//Clicks on the new element are successful
|
|
114
|
+
// Clicks on the new element are successful
|
|
115
115
|
this._mock.command.elementClick(ELEMENT_REFETCHED).times(4).reply(200, { value: null });
|
|
116
|
-
//Wait for it to exist - but 2 failed iterations
|
|
116
|
+
// Wait for it to exist - but 2 failed iterations
|
|
117
117
|
this._mock.command.findElements().times(2).reply(200, { value: [] });
|
|
118
|
-
//Always appears thereafter
|
|
118
|
+
// Always appears thereafter
|
|
119
119
|
this._mock.command.findElements().times(4).reply(200, { value: [elem2Response] });
|
|
120
120
|
}
|
|
121
121
|
asyncIterationScenario() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/webdriver-mock-service",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.23.0",
|
|
4
4
|
"description": "A WebdriverIO service to stub all endpoints for internal testing purposes.",
|
|
5
5
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-webdriver-mock-service",
|
|
@@ -26,17 +26,17 @@
|
|
|
26
26
|
"typeScriptVersion": "3.8.3",
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@types/uuid": "^9.0.0",
|
|
29
|
-
"@wdio/protocols": "8.
|
|
30
|
-
"@wdio/types": "8.
|
|
29
|
+
"@wdio/protocols": "8.23.0",
|
|
30
|
+
"@wdio/types": "8.23.0",
|
|
31
31
|
"nock": "^13.2.4",
|
|
32
32
|
"uuid": "^9.0.0",
|
|
33
|
-
"webdriverio": "8.
|
|
33
|
+
"webdriverio": "8.23.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@wdio/globals": "8.
|
|
36
|
+
"@wdio/globals": "8.23.0"
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "b17ce5f554deb8588cc156ad9676bd4bd13defe7"
|
|
42
42
|
}
|