@wdio/webdriver-mock-service 8.22.1 → 8.23.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.
Files changed (2) hide show
  1. package/build/index.js +9 -9
  2. 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(4).reply(500, {
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.22.1",
3
+ "version": "8.23.1",
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.22.0",
30
- "@wdio/types": "8.21.0",
29
+ "@wdio/protocols": "8.23.0",
30
+ "@wdio/types": "8.23.1",
31
31
  "nock": "^13.2.4",
32
32
  "uuid": "^9.0.0",
33
- "webdriverio": "8.22.1"
33
+ "webdriverio": "8.23.1"
34
34
  },
35
35
  "devDependencies": {
36
- "@wdio/globals": "8.22.1"
36
+ "@wdio/globals": "8.23.1"
37
37
  },
38
38
  "publishConfig": {
39
39
  "access": "public"
40
40
  },
41
- "gitHead": "00a86c3267401a5d277d21b553ebfb6f04aeb3db"
41
+ "gitHead": "64633b802ba4d00d23f6531dadc3fc724d8d7dd5"
42
42
  }