@actionlogementservices/wdio-test-context 1.0.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/.editorconfig +20 -0
- package/.jsdoc.json +35 -0
- package/.prettierrc +11 -0
- package/README.md +116 -0
- package/doc/images/badges/modifier-abstract.png +0 -0
- package/doc/images/badges/modifier-abstract.svg +10 -0
- package/doc/images/badges/modifier-default.png +0 -0
- package/doc/images/badges/modifier-default.svg +10 -0
- package/doc/images/badges/modifier-private.png +0 -0
- package/doc/images/badges/modifier-private.svg +10 -0
- package/doc/images/badges/modifier-protected.png +0 -0
- package/doc/images/badges/modifier-protected.svg +10 -0
- package/doc/images/badges/modifier-public.png +0 -0
- package/doc/images/badges/modifier-public.svg +10 -0
- package/doc/images/badges/modifier-readonly.png +0 -0
- package/doc/images/badges/modifier-readonly.svg +10 -0
- package/doc/images/badges/modifier-static.png +0 -0
- package/doc/images/badges/modifier-static.svg +10 -0
- package/doc/src-page-objects_guerrillamail.page.md +69 -0
- package/doc/src-page-objects_maildrop.page.md +57 -0
- package/doc/src-page-objects_page.md +484 -0
- package/doc/src-page-objects_yopmail.page.md +57 -0
- package/doc/src-wdio_ado-reporter.md +93 -0
- package/doc/src-wdio_test-context-worker-service.md +48 -0
- package/doc/src_ado-client.md +55 -0
- package/doc/src_logger.md +183 -0
- package/doc/src_mail-service.md +54 -0
- package/doc/src_pdf-generator.md +35 -0
- package/doc/src_test-context.md +173 -0
- package/doc/toc.md +22 -0
- package/eslint.config.js +100 -0
- package/jsconfig.json +14 -0
- package/package.json +58 -0
- package/src/ado-client.js +96 -0
- package/src/index.js +8 -0
- package/src/logger.js +125 -0
- package/src/mail-service.js +81 -0
- package/src/page-objects/guerrillamail.page.js +144 -0
- package/src/page-objects/index.js +3 -0
- package/src/page-objects/maildrop.page.js +97 -0
- package/src/page-objects/page.js +463 -0
- package/src/page-objects/yopmail.page.js +102 -0
- package/src/pdf-generator.js +61 -0
- package/src/test-context.js +248 -0
- package/src/types.d.ts +60 -0
- package/src/wdio/ado-reporter.js +111 -0
- package/src/wdio/test-context-worker-service.js +88 -0
|
@@ -0,0 +1,484 @@
|
|
|
1
|
+
# Module `page-objects/page`
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
Base page object for WDIO page objects.
|
|
6
|
+
|
|
7
|
+
[Source file](../src/page-objects/page.js)
|
|
8
|
+
|
|
9
|
+
## Functions
|
|
10
|
+
|
|
11
|
+
### `setUrl(tabName, url, maximize) ► Promise.<void>`
|
|
12
|
+
|
|
13
|
+

|
|
14
|
+
|
|
15
|
+
**Sets the browser url** for the specified **tab name**.
|
|
16
|
+
|
|
17
|
+
Parameters | Type | Description
|
|
18
|
+
--- | --- | ---
|
|
19
|
+
__tabName__ | `string` | *tab name*
|
|
20
|
+
__url__ | `string` | *url to navigate to*
|
|
21
|
+
__maximize__ | `boolean` | *maximize window*
|
|
22
|
+
__*return*__ | `Promise.<void>` | **
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
### `openNewTab(tabName, url) ► Promise.<void>`
|
|
27
|
+
|
|
28
|
+

|
|
29
|
+
|
|
30
|
+
**Opens** the specified **tab name** with the specified **url**.
|
|
31
|
+
|
|
32
|
+
Parameters | Type | Description
|
|
33
|
+
--- | --- | ---
|
|
34
|
+
__tabName__ | `string` | *nom de l'onglet du navigateur*
|
|
35
|
+
__url__ | `string` | *url à atteindre*
|
|
36
|
+
__*return*__ | `Promise.<void>` | **
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
### `switchToTab(tabName) ► Promise.<void>`
|
|
41
|
+
|
|
42
|
+

|
|
43
|
+
|
|
44
|
+
**Switches to** the specified **tab name**.
|
|
45
|
+
|
|
46
|
+
Parameters | Type | Description
|
|
47
|
+
--- | --- | ---
|
|
48
|
+
__tabName__ | `string` | *nom de l'onglet du navigateur*
|
|
49
|
+
__*return*__ | `Promise.<void>` | **
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
### `switchToLastOpenedTab() ► Promise.<void>`
|
|
54
|
+
|
|
55
|
+

|
|
56
|
+
|
|
57
|
+
**Switches to** the **last opened tab**.
|
|
58
|
+
|
|
59
|
+
Parameters | Type | Description
|
|
60
|
+
--- | --- | ---
|
|
61
|
+
__*return*__ | `Promise.<void>` | **
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
### `debugTabs()`
|
|
66
|
+
|
|
67
|
+

|
|
68
|
+
|
|
69
|
+
Dumps tabs information.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
### `switchToFrame(css) ► Promise.<(void|string)>`
|
|
74
|
+
|
|
75
|
+

|
|
76
|
+
|
|
77
|
+
Switches to the frame specified by the css selector.
|
|
78
|
+
|
|
79
|
+
Parameters | Type | Description
|
|
80
|
+
--- | --- | ---
|
|
81
|
+
__css__ | `string` | *css selector of top level frame if not specified*
|
|
82
|
+
__*return*__ | `Promise.<(void\|string)>` | **
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
### `getText(css, timeout) ► Promise.<string>`
|
|
87
|
+
|
|
88
|
+

|
|
89
|
+
|
|
90
|
+
**Retrieves the text** corresponding to the specified css selector.
|
|
91
|
+
Waits during the specified (or default) timeout **before throwing error**.
|
|
92
|
+
|
|
93
|
+
Parameters | Type | Description
|
|
94
|
+
--- | --- | ---
|
|
95
|
+
__css__ | `string` | *css selector*
|
|
96
|
+
__timeout__ | `number` | *optional timeout before throwing error*
|
|
97
|
+
__*return*__ | `Promise.<string>` | *the corresponding text*
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
### `getValue(css, timeout) ► Promise.<string>`
|
|
102
|
+
|
|
103
|
+

|
|
104
|
+
|
|
105
|
+
**Retrieves the value** corresponding to the specified css selector.
|
|
106
|
+
Waits during the specified (or default) timeout **before throwing error**.
|
|
107
|
+
|
|
108
|
+
Parameters | Type | Description
|
|
109
|
+
--- | --- | ---
|
|
110
|
+
__css__ | `string` | *css selector*
|
|
111
|
+
__timeout__ | `number` | *optional timeout before throwing error*
|
|
112
|
+
__*return*__ | `Promise.<string>` | *the corresponding value*
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
### `getHtml(css, timeout) ► Promise.<string>`
|
|
117
|
+
|
|
118
|
+

|
|
119
|
+
|
|
120
|
+
**Retrieves the inner html** corresponding to the specified css selector.
|
|
121
|
+
Waits during the specified (or default) timeout **before throwing error**.
|
|
122
|
+
|
|
123
|
+
Parameters | Type | Description
|
|
124
|
+
--- | --- | ---
|
|
125
|
+
__css__ | `string` | *css selector*
|
|
126
|
+
__timeout__ | `number` | *optional timeout before throwing error*
|
|
127
|
+
__*return*__ | `Promise.<string>` | *the corresponding inner html*
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
### `getOptions(css, timeout) ► Promise.<Array.<string>>`
|
|
132
|
+
|
|
133
|
+

|
|
134
|
+
|
|
135
|
+
**Retrieves the list of values** of the specified **select** css selector.
|
|
136
|
+
Waits during the specified (or default) timeout **before throwing error**.
|
|
137
|
+
|
|
138
|
+
Parameters | Type | Description
|
|
139
|
+
--- | --- | ---
|
|
140
|
+
__css__ | `string` | *css selector of the select*
|
|
141
|
+
__timeout__ | `number` | *optional timeout before throwing error*
|
|
142
|
+
__*return*__ | `Promise.<Array.<string>>` | *the corresponding values*
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
### `getSelectedText(css, timeout) ► Promise.<string>`
|
|
147
|
+
|
|
148
|
+

|
|
149
|
+
|
|
150
|
+
**Retrieves the selected text** of the specified **select** css selector.
|
|
151
|
+
Waits during the specified (or default) timeout **before throwing error**.
|
|
152
|
+
|
|
153
|
+
Parameters | Type | Description
|
|
154
|
+
--- | --- | ---
|
|
155
|
+
__css__ | `string` | *css selector of the select*
|
|
156
|
+
__timeout__ | `number` | *optional timeout before throwing error*
|
|
157
|
+
__*return*__ | `Promise.<string>` | *the corresponding text*
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
### `getSelectedValue(css, timeout) ► Promise.<string>`
|
|
162
|
+
|
|
163
|
+

|
|
164
|
+
|
|
165
|
+
**Retrieves the selected value** of the specified **select** css selector.
|
|
166
|
+
Waits during the specified (or default) timeout **before throwing error**.
|
|
167
|
+
|
|
168
|
+
Parameters | Type | Description
|
|
169
|
+
--- | --- | ---
|
|
170
|
+
__css__ | `string` | *css selector of the select*
|
|
171
|
+
__timeout__ | `number` | *optional timeout before throwing error*
|
|
172
|
+
__*return*__ | `Promise.<string>` | *the corresponding text*
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
### `verifyElementExistsDuring(css, periodInSecond) ► Promise.<boolean>`
|
|
177
|
+
|
|
178
|
+

|
|
179
|
+
|
|
180
|
+
**Verifies if the element** specified by the css selector **exists**.
|
|
181
|
+
Will only verify for the **specified amount of seconds**.
|
|
182
|
+
**Does not throw error**.
|
|
183
|
+
|
|
184
|
+
Parameters | Type | Description
|
|
185
|
+
--- | --- | ---
|
|
186
|
+
__css__ | `string` | *css selector*
|
|
187
|
+
__periodInSecond__ | `Number` | *period of time to wait (in s)*
|
|
188
|
+
__*return*__ | `Promise.<boolean>` | *true if element exists, false otherwise*
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
### `verifyElementExists(css) ► Promise.<boolean>`
|
|
193
|
+
|
|
194
|
+

|
|
195
|
+
|
|
196
|
+
**Verifies if the element** specified by the css selector **exists**.
|
|
197
|
+
**Does not throw error**.
|
|
198
|
+
|
|
199
|
+
Parameters | Type | Description
|
|
200
|
+
--- | --- | ---
|
|
201
|
+
__css__ | `string` | *css selector*
|
|
202
|
+
__*return*__ | `Promise.<boolean>` | *true if element exists, false otherwise*
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
### `waitElementExists(css, timeout) ► ChainablePromiseElement`
|
|
207
|
+
|
|
208
|
+

|
|
209
|
+
|
|
210
|
+
**Waits until the element** specified by the css selector **exists**.
|
|
211
|
+
**Throws an error** after the specified (or default) timeout has expired.
|
|
212
|
+
|
|
213
|
+
Parameters | Type | Description
|
|
214
|
+
--- | --- | ---
|
|
215
|
+
__css__ | `string` | *css selector*
|
|
216
|
+
__timeout__ | `number` | *optional timeout before throwing error*
|
|
217
|
+
__*return*__ | `ChainablePromiseElement` | *the element if it exists*
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
### `waitTextChanged(css, timeout, oldText) ► Promise.<string>`
|
|
222
|
+
|
|
223
|
+

|
|
224
|
+
|
|
225
|
+
**Waits until the element** specified by the css selector **has no more** the specified **text**.
|
|
226
|
+
**Throws an error** after the specified (or default) timeout has expired.
|
|
227
|
+
|
|
228
|
+
Parameters | Type | Description
|
|
229
|
+
--- | --- | ---
|
|
230
|
+
__css__ | `string` | *css selector*
|
|
231
|
+
__timeout__ | `number` | *optional timeout before throwing error*
|
|
232
|
+
__oldText__ | `string` | *text that is supposed to disapear*
|
|
233
|
+
__*return*__ | `Promise.<string>` | *the new text if it exists*
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
### `waitElementHasText(css, text, timeout) ► Promise.<boolean>`
|
|
238
|
+
|
|
239
|
+

|
|
240
|
+
|
|
241
|
+
**Waits until the element** specified by the css selector **has** the specified **text**.
|
|
242
|
+
**Throws an error** after the specified (or default) timeout has expired.
|
|
243
|
+
|
|
244
|
+
Parameters | Type | Description
|
|
245
|
+
--- | --- | ---
|
|
246
|
+
__css__ | `string` | *css selector*
|
|
247
|
+
__text__ | `string` | *text to wait for*
|
|
248
|
+
__timeout__ | `number` | *optional timeout before throwing error*
|
|
249
|
+
__*return*__ | `Promise.<boolean>` | *true if condition is fullfilled*
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
### `waitElementHasValue(css, value, timeout) ► Promise.<boolean>`
|
|
254
|
+
|
|
255
|
+

|
|
256
|
+
|
|
257
|
+
**Waits until the element** specified by the css selector **has the specified value**.
|
|
258
|
+
**Throws an error** after the specified (or default) timeout has expired.
|
|
259
|
+
|
|
260
|
+
Parameters | Type | Description
|
|
261
|
+
--- | --- | ---
|
|
262
|
+
__css__ | `string` | *css selector*
|
|
263
|
+
__value__ | `string` | *value to wait for*
|
|
264
|
+
__timeout__ | `number` | *optional timeout before throwing error*
|
|
265
|
+
__*return*__ | `Promise.<boolean>` | *true if condition is fullfilled*
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
### `waitElementRemoved(css, timeout) ► Promise.<boolean>`
|
|
270
|
+
|
|
271
|
+

|
|
272
|
+
|
|
273
|
+
**Waits until the element** specified by the css selector is **removed from the DOM**.
|
|
274
|
+
**Throws an error** after the specified (or default) timeout has expired.
|
|
275
|
+
|
|
276
|
+
Parameters | Type | Description
|
|
277
|
+
--- | --- | ---
|
|
278
|
+
__css__ | `string` | *css selector*
|
|
279
|
+
__timeout__ | `number` | *optional timeout before throwing error*
|
|
280
|
+
__*return*__ | `Promise.<boolean>` | *true if condition is fullfilled*
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
284
|
+
### `waitElementClickable(css, timeout) ► Promise.<boolean>`
|
|
285
|
+
|
|
286
|
+

|
|
287
|
+
|
|
288
|
+
**Waits until the element** specified by the css selector is **clickable**.
|
|
289
|
+
**Throws an error** after the specified (or default) timeout has expired.
|
|
290
|
+
|
|
291
|
+
Parameters | Type | Description
|
|
292
|
+
--- | --- | ---
|
|
293
|
+
__css__ | `string` | *css selector*
|
|
294
|
+
__timeout__ | `number` | *optional timeout before throwing error*
|
|
295
|
+
__*return*__ | `Promise.<boolean>` | *true if condition is fullfilled*
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
### `waitElementDisplayed(css, timeout) ► Promise.<boolean>`
|
|
300
|
+
|
|
301
|
+

|
|
302
|
+
|
|
303
|
+
**Waits until the element** specified by the css selector is **displayed**.
|
|
304
|
+
**Throws an error** after the specified (or default) timeout has expired.
|
|
305
|
+
|
|
306
|
+
Parameters | Type | Description
|
|
307
|
+
--- | --- | ---
|
|
308
|
+
__css__ | `string` | *css selector*
|
|
309
|
+
__timeout__ | `number` | *optional timeout before throwing error*
|
|
310
|
+
__*return*__ | `Promise.<boolean>` | *true if condition is fullfilled*
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
### `waitElementHidden(css, timeout) ► Promise.<boolean>`
|
|
315
|
+
|
|
316
|
+

|
|
317
|
+
|
|
318
|
+
**Waits until the element** specified by the css selector is **hidden**.
|
|
319
|
+
**Throws an error** after the specified (or default) timeout has expired.
|
|
320
|
+
|
|
321
|
+
Parameters | Type | Description
|
|
322
|
+
--- | --- | ---
|
|
323
|
+
__css__ | `string` | *css selector*
|
|
324
|
+
__timeout__ | `number` | *optional timeout before throwing error*
|
|
325
|
+
__*return*__ | `Promise.<boolean>` | *true if condition is fullfilled*
|
|
326
|
+
|
|
327
|
+
---
|
|
328
|
+
|
|
329
|
+
### `waitElementHasChildren(css, childrenCount, timeout) ► Promise.<boolean>`
|
|
330
|
+
|
|
331
|
+

|
|
332
|
+
|
|
333
|
+
**Waits until the element** specified by the css selector **has children**.
|
|
334
|
+
**Throws an error** after the specified (or default) timeout has expired.
|
|
335
|
+
|
|
336
|
+
Parameters | Type | Description
|
|
337
|
+
--- | --- | ---
|
|
338
|
+
__css__ | `string` | *css selector*
|
|
339
|
+
__childrenCount__ | `number` | *optional count of children to wait for (default 1)*
|
|
340
|
+
__timeout__ | `number` | *optional timeout before throwing error*
|
|
341
|
+
__*return*__ | `Promise.<boolean>` | *true if condition is fullfilled*
|
|
342
|
+
|
|
343
|
+
---
|
|
344
|
+
|
|
345
|
+
### `waitUrlEndsWith(text, timeout) ► Promise.<boolean>`
|
|
346
|
+
|
|
347
|
+

|
|
348
|
+
|
|
349
|
+
**Waits until the browser url ends with** the specified **text**.
|
|
350
|
+
**Throws an error** after the specified (or default) timeout has expired.
|
|
351
|
+
|
|
352
|
+
Parameters | Type | Description
|
|
353
|
+
--- | --- | ---
|
|
354
|
+
__text__ | `string` | *ending text*
|
|
355
|
+
__timeout__ | `number` | *optional timeout before throwing error*
|
|
356
|
+
__*return*__ | `Promise.<boolean>` | *true if condition is fullfilled*
|
|
357
|
+
|
|
358
|
+
---
|
|
359
|
+
|
|
360
|
+
### `waitUrlContains(text, timeout) ► Promise.<boolean>`
|
|
361
|
+
|
|
362
|
+

|
|
363
|
+
|
|
364
|
+
**Waits until the browser url contains** the specified **text**.
|
|
365
|
+
**Throws an error** after the specified (or default) timeout has expired.
|
|
366
|
+
|
|
367
|
+
Parameters | Type | Description
|
|
368
|
+
--- | --- | ---
|
|
369
|
+
__text__ | `string` | *ending text*
|
|
370
|
+
__timeout__ | `number` | *optional timeout before throwing error*
|
|
371
|
+
__*return*__ | `Promise.<boolean>` | *true if condition is fullfilled*
|
|
372
|
+
|
|
373
|
+
---
|
|
374
|
+
|
|
375
|
+
### `waitUrlIsNoMore(text, timeout) ► Promise.<boolean>`
|
|
376
|
+
|
|
377
|
+

|
|
378
|
+
|
|
379
|
+
**Waits until the browser url is not more** the specified **text**.
|
|
380
|
+
**Throws an error** after the specified (or default) timeout has expired.
|
|
381
|
+
|
|
382
|
+
Parameters | Type | Description
|
|
383
|
+
--- | --- | ---
|
|
384
|
+
__text__ | `string` | *ending text*
|
|
385
|
+
__timeout__ | `number` | *optional timeout before throwing error*
|
|
386
|
+
__*return*__ | `Promise.<boolean>` | *true if condition is fullfilled*
|
|
387
|
+
|
|
388
|
+
---
|
|
389
|
+
|
|
390
|
+
### `click(css, cssParent, timeout) ► Promise.<void>`
|
|
391
|
+
|
|
392
|
+

|
|
393
|
+
|
|
394
|
+
**Clicks the element** specified by the css selector.
|
|
395
|
+
**Throws an error** after the specified (or default) timeout has expired.
|
|
396
|
+
|
|
397
|
+
Parameters | Type | Description
|
|
398
|
+
--- | --- | ---
|
|
399
|
+
__css__ | `string` | *css selector*
|
|
400
|
+
__cssParent__ | `string` | *optional css selector of the parent*
|
|
401
|
+
__timeout__ | `number` | *optional timeout before throwing error*
|
|
402
|
+
__*return*__ | `Promise.<void>` | **
|
|
403
|
+
|
|
404
|
+
---
|
|
405
|
+
|
|
406
|
+
### `check(css, timeout) ► Promise.<void>`
|
|
407
|
+
|
|
408
|
+

|
|
409
|
+
|
|
410
|
+
**Checks the checkbox or radio button** specified by the css selector.
|
|
411
|
+
**Throws an error** after the specified (or default) timeout has expired.
|
|
412
|
+
|
|
413
|
+
Parameters | Type | Description
|
|
414
|
+
--- | --- | ---
|
|
415
|
+
__css__ | `string` | *css selector of checkbox or radio button*
|
|
416
|
+
__timeout__ | `number` | *optional timeout before throwing error*
|
|
417
|
+
__*return*__ | `Promise.<void>` | **
|
|
418
|
+
|
|
419
|
+
---
|
|
420
|
+
|
|
421
|
+
### `checkByText(text, css, cssParent, timeout) ► Promise.<void>`
|
|
422
|
+
|
|
423
|
+

|
|
424
|
+
|
|
425
|
+
**Checks the checkbox or radio button** specified by the label text and css selector.
|
|
426
|
+
**Throws an error** after the specified (or default) timeout has expired.
|
|
427
|
+
|
|
428
|
+
Parameters | Type | Description
|
|
429
|
+
--- | --- | ---
|
|
430
|
+
__text__ | `string` | *label text*
|
|
431
|
+
__css__ | `string` | *css selector of the label*
|
|
432
|
+
__cssParent__ | `string` | *optional css selector for the parent*
|
|
433
|
+
__timeout__ | `number` | *optional timeout before throwing error*
|
|
434
|
+
__*return*__ | `Promise.<void>` | **
|
|
435
|
+
|
|
436
|
+
---
|
|
437
|
+
|
|
438
|
+
### `fillInput(css, text, timeout) ► Promise.<void>`
|
|
439
|
+
|
|
440
|
+

|
|
441
|
+
|
|
442
|
+
**Fills the input** specified by the css selector with the specified **text**.
|
|
443
|
+
**Throws an error** after the specified (or default) timeout has expired.
|
|
444
|
+
|
|
445
|
+
Parameters | Type | Description
|
|
446
|
+
--- | --- | ---
|
|
447
|
+
__css__ | `string` | *css selector of the input*
|
|
448
|
+
__text__ | `string` | *text to fill in*
|
|
449
|
+
__timeout__ | `number` | *optional timeout before throwing error*
|
|
450
|
+
__*return*__ | `Promise.<void>` | **
|
|
451
|
+
|
|
452
|
+
---
|
|
453
|
+
|
|
454
|
+
### `selectItem(css, text, timeout) ► Promise.<void>`
|
|
455
|
+
|
|
456
|
+

|
|
457
|
+
|
|
458
|
+
**Selects the option** specified by the **select** css selector with the specified **text**.
|
|
459
|
+
**Throws an error** after the specified (or default) timeout has expired.
|
|
460
|
+
|
|
461
|
+
Parameters | Type | Description
|
|
462
|
+
--- | --- | ---
|
|
463
|
+
__css__ | `string` | *css selector of the select*
|
|
464
|
+
__text__ | `string` | *text of the option*
|
|
465
|
+
__timeout__ | `number` | *optional timeout before throwing error*
|
|
466
|
+
__*return*__ | `Promise.<void>` | **
|
|
467
|
+
|
|
468
|
+
---
|
|
469
|
+
|
|
470
|
+
### `selectObjectItem(element, text, timeout) ► Promise.<void>`
|
|
471
|
+
|
|
472
|
+

|
|
473
|
+
|
|
474
|
+
**Selects the option** specified by the wdio element with the specified **text**.
|
|
475
|
+
**Throws an error** after the specified (or default) timeout has expired.
|
|
476
|
+
|
|
477
|
+
Parameters | Type | Description
|
|
478
|
+
--- | --- | ---
|
|
479
|
+
__element__ | `WebdriverIO.Element` | *select element*
|
|
480
|
+
__text__ | `string` | *text of the option*
|
|
481
|
+
__timeout__ | `number` | *optional timeout before throwing error*
|
|
482
|
+
__*return*__ | `Promise.<void>` | **
|
|
483
|
+
|
|
484
|
+
---
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Module `page-objects/yopmail.page`
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
Page-object on top of YOPmail.
|
|
6
|
+
|
|
7
|
+
[Source file](../src/page-objects/yopmail.page.js)
|
|
8
|
+
|
|
9
|
+
# Class `YopmailPage`
|
|
10
|
+
|
|
11
|
+
Implements a page-object on top of YOPmail.
|
|
12
|
+
|
|
13
|
+
## Methods
|
|
14
|
+
|
|
15
|
+
### `openInbox(email)`
|
|
16
|
+
|
|
17
|
+

|
|
18
|
+
|
|
19
|
+
WDIO logic to open the mailbox.
|
|
20
|
+
|
|
21
|
+
Parameters | Type | Description
|
|
22
|
+
--- | --- | ---
|
|
23
|
+
__email__ | `string` | *disposable email*
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
### `getMessages() ► `
|
|
28
|
+
|
|
29
|
+

|
|
30
|
+
|
|
31
|
+
WDIO logic to get emails.
|
|
32
|
+
|
|
33
|
+
Parameters | Type | Description
|
|
34
|
+
--- | --- | ---
|
|
35
|
+
__*return*__ | `undefined` | **
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
### `getMessageContent(index) ► Promise.<string>`
|
|
40
|
+
|
|
41
|
+

|
|
42
|
+
|
|
43
|
+
WDIO logic to get the specified message content.
|
|
44
|
+
|
|
45
|
+
Parameters | Type | Description
|
|
46
|
+
--- | --- | ---
|
|
47
|
+
__index__ | `number` | **
|
|
48
|
+
__*return*__ | `Promise.<string>` | **
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Members
|
|
53
|
+
|
|
54
|
+
Name | Type | Description
|
|
55
|
+
--- | --- | ---
|
|
56
|
+
__name__ | `undefined` | *name of the provider*
|
|
57
|
+
__domains__ | `undefined` | *domains exposed of the provider*
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Module `wdio/ado-reporter`
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
**WDIO Reporter** to handle Azure DevOps Test Run generation.
|
|
6
|
+
|
|
7
|
+
[Source file](../src/wdio/ado-reporter.js)
|
|
8
|
+
|
|
9
|
+
## Constants
|
|
10
|
+
|
|
11
|
+
### `testRun`
|
|
12
|
+
|
|
13
|
+

|
|
14
|
+
|
|
15
|
+
Default Azure Devops Test Run model @type {import('../ado-client.js').RunModel}
|
|
16
|
+
|
|
17
|
+
#### Value
|
|
18
|
+
|
|
19
|
+
```javascript
|
|
20
|
+
{
|
|
21
|
+
name: 'Tests e2e',
|
|
22
|
+
results: [],
|
|
23
|
+
state: 'Completed'
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
# Class `AdoReporter`
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## Methods
|
|
34
|
+
|
|
35
|
+
### `onRunnerStart(run)`
|
|
36
|
+
|
|
37
|
+

|
|
38
|
+
|
|
39
|
+
Gets executed when the runner starts.
|
|
40
|
+
|
|
41
|
+
Parameters | Type | Description
|
|
42
|
+
--- | --- | ---
|
|
43
|
+
__run__ | `import('@wdio/reporter').RunnerStats` | *run information*
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
### `onTestPass(test)`
|
|
48
|
+
|
|
49
|
+

|
|
50
|
+
|
|
51
|
+
Gets executed when the test passes.
|
|
52
|
+
|
|
53
|
+
Parameters | Type | Description
|
|
54
|
+
--- | --- | ---
|
|
55
|
+
__test__ | `import('@wdio/reporter').TestStats` | *test information*
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
### `onTestFail(test)`
|
|
60
|
+
|
|
61
|
+

|
|
62
|
+
|
|
63
|
+
Gets executed when the test fails.
|
|
64
|
+
|
|
65
|
+
Parameters | Type | Description
|
|
66
|
+
--- | --- | ---
|
|
67
|
+
__test__ | `import('@wdio/reporter').TestStats` | *test information*
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
### `onTestSkip(test)`
|
|
72
|
+
|
|
73
|
+

|
|
74
|
+
|
|
75
|
+
Gets executed when the test is skipped.
|
|
76
|
+
|
|
77
|
+
Parameters | Type | Description
|
|
78
|
+
--- | --- | ---
|
|
79
|
+
__test__ | `import('@wdio/reporter').TestStats` | *test information*
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
### `onRunnerEnd(_run)`
|
|
84
|
+
|
|
85
|
+

|
|
86
|
+
|
|
87
|
+
Gets executed when the runner ends.
|
|
88
|
+
|
|
89
|
+
Parameters | Type | Description
|
|
90
|
+
--- | --- | ---
|
|
91
|
+
___run__ | `import('@wdio/reporter').RunnerStats` | *run information*
|
|
92
|
+
|
|
93
|
+
---
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Module `wdio/test-context-worker-service`
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
[Source file](../src/wdio/test-context-worker-service.js)
|
|
8
|
+
|
|
9
|
+
## Functions
|
|
10
|
+
|
|
11
|
+
### `filterPrivateProperty()`
|
|
12
|
+
|
|
13
|
+

|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
### `beforeSession(_config, _capabilities, _specs, _cid)`
|
|
20
|
+
|
|
21
|
+

|
|
22
|
+
|
|
23
|
+
Gets executed just before initialising the webdriver session and test framework.
|
|
24
|
+
**Displays** the Test Context.
|
|
25
|
+
|
|
26
|
+
Parameters | Type | Description
|
|
27
|
+
--- | --- | ---
|
|
28
|
+
___config__ | `TestrunnerOptions` | **
|
|
29
|
+
___capabilities__ | `TestrunnerCapabilities` | **
|
|
30
|
+
___specs__ | `Array.<string>` | **
|
|
31
|
+
___cid__ | `string` | **
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
### `afterTest(test, _context, result)`
|
|
36
|
+
|
|
37
|
+

|
|
38
|
+
|
|
39
|
+
Gets executed after a test.
|
|
40
|
+
Generates **error screenshot** if applicable.
|
|
41
|
+
|
|
42
|
+
Parameters | Type | Description
|
|
43
|
+
--- | --- | ---
|
|
44
|
+
__test__ | `Test` | **
|
|
45
|
+
___context__ | `*` | **
|
|
46
|
+
__result__ | `TestResult` | **
|
|
47
|
+
|
|
48
|
+
---
|