playwright-cucumber-ts-steps 1.3.0 → 1.3.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.
Files changed (81) hide show
  1. package/dist/backend/actions/click.d.ts +84 -0
  2. package/dist/backend/actions/click.d.ts.map +1 -1
  3. package/dist/backend/actions/click.js +167 -17
  4. package/dist/backend/actions/form.d.ts +6 -0
  5. package/dist/backend/actions/form.d.ts.map +1 -1
  6. package/dist/backend/actions/form.js +17 -1
  7. package/dist/backend/actions/formTable.js +1 -1
  8. package/dist/backend/actions/frames.js +3 -3
  9. package/dist/backend/actions/index.d.ts +2 -0
  10. package/dist/backend/actions/index.d.ts.map +1 -1
  11. package/dist/backend/actions/index.js +2 -0
  12. package/dist/backend/actions/inputs.js +18 -18
  13. package/dist/backend/actions/interactions.d.ts +14 -5
  14. package/dist/backend/actions/interactions.d.ts.map +1 -1
  15. package/dist/backend/actions/interactions.js +69 -13
  16. package/dist/backend/actions/keyboard.js +6 -6
  17. package/dist/backend/actions/misc.d.ts +8 -2
  18. package/dist/backend/actions/misc.d.ts.map +1 -1
  19. package/dist/backend/actions/misc.js +64 -16
  20. package/dist/backend/actions/mobile.js +7 -7
  21. package/dist/backend/actions/mouse.js +9 -9
  22. package/dist/backend/actions/navigation.js +5 -5
  23. package/dist/backend/actions/visual.d.ts +47 -0
  24. package/dist/backend/actions/visual.d.ts.map +1 -0
  25. package/dist/backend/actions/visual.js +97 -0
  26. package/dist/backend/actions/waits.d.ts +6 -0
  27. package/dist/backend/actions/waits.d.ts.map +1 -1
  28. package/dist/backend/actions/waits.js +18 -5
  29. package/dist/backend/api/assertions.js +3 -3
  30. package/dist/backend/api/mock.js +3 -3
  31. package/dist/backend/api/network.js +6 -6
  32. package/dist/backend/api/requests.js +4 -4
  33. package/dist/backend/assertions/document.d.ts +61 -0
  34. package/dist/backend/assertions/document.d.ts.map +1 -0
  35. package/dist/backend/assertions/document.js +166 -0
  36. package/dist/backend/assertions/elements.d.ts +163 -0
  37. package/dist/backend/assertions/elements.d.ts.map +1 -0
  38. package/dist/backend/assertions/elements.js +441 -0
  39. package/dist/backend/assertions/expectVisible.js +1 -1
  40. package/dist/backend/assertions/forms.d.ts +43 -0
  41. package/dist/backend/assertions/forms.d.ts.map +1 -0
  42. package/dist/backend/assertions/forms.js +126 -0
  43. package/dist/backend/assertions/index.d.ts +10 -0
  44. package/dist/backend/assertions/index.d.ts.map +1 -1
  45. package/dist/backend/assertions/index.js +10 -0
  46. package/dist/backend/assertions/pageState.js +4 -4
  47. package/dist/backend/assertions/storage.d.ts +67 -0
  48. package/dist/backend/assertions/storage.d.ts.map +1 -0
  49. package/dist/backend/assertions/storage.js +220 -0
  50. package/dist/backend/assertions/text.d.ts +103 -12
  51. package/dist/backend/assertions/text.d.ts.map +1 -1
  52. package/dist/backend/assertions/text.js +207 -28
  53. package/dist/backend/assertions/visibility.d.ts +18 -0
  54. package/dist/backend/assertions/visibility.d.ts.map +1 -1
  55. package/dist/backend/assertions/visibility.js +58 -12
  56. package/dist/backend/auth/index.js +2 -2
  57. package/dist/backend/db/steps.d.ts +2 -2
  58. package/dist/backend/db/steps.d.ts.map +1 -1
  59. package/dist/backend/db/steps.js +11 -11
  60. package/dist/backend/elements/alerts.js +3 -3
  61. package/dist/backend/elements/find.js +26 -24
  62. package/dist/backend/elements/forms.js +4 -4
  63. package/dist/backend/elements/frames.js +3 -3
  64. package/dist/backend/utils/fixtures.js +1 -1
  65. package/dist/backend/utils/resolver.d.ts +6 -0
  66. package/dist/backend/utils/resolver.d.ts.map +1 -0
  67. package/dist/backend/utils/resolver.js +19 -0
  68. package/dist/component/index.d.ts +3 -0
  69. package/dist/component/index.d.ts.map +1 -0
  70. package/dist/component/index.js +6 -0
  71. package/dist/component/runner.d.ts +18 -0
  72. package/dist/component/runner.d.ts.map +1 -0
  73. package/dist/component/runner.js +91 -0
  74. package/dist/core/runner.d.ts +1 -0
  75. package/dist/core/runner.d.ts.map +1 -1
  76. package/dist/core/runner.js +179 -124
  77. package/dist/index.d.ts +2 -0
  78. package/dist/index.d.ts.map +1 -1
  79. package/dist/index.js +3 -1
  80. package/dist/metadata.json +564 -172
  81. package/package.json +4 -3
@@ -1,690 +1,1082 @@
1
1
  [
2
2
  {
3
- "pattern": "I visit {string}",
3
+ "pattern": "I pw visit {string}",
4
4
  "type": "Given"
5
5
  },
6
6
  {
7
- "pattern": "I reload the page",
7
+ "pattern": "I pw reload the page",
8
8
  "type": "When"
9
9
  },
10
10
  {
11
- "pattern": "I go back",
11
+ "pattern": "I pw go back",
12
12
  "type": "When"
13
13
  },
14
14
  {
15
- "pattern": "I go forward",
15
+ "pattern": "I pw go forward",
16
16
  "type": "When"
17
17
  },
18
18
  {
19
- "pattern": "I navigate to {string}",
19
+ "pattern": "I pw navigate to {string}",
20
20
  "type": "Given"
21
21
  },
22
22
  {
23
- "pattern": "I click {string}",
23
+ "pattern": "I pw click {string}",
24
24
  "type": "When"
25
25
  },
26
26
  {
27
- "pattern": "I force click {string}",
27
+ "pattern": "I pw force click {string}",
28
28
  "type": "When"
29
29
  },
30
30
  {
31
- "pattern": "I fill {string} with {string}",
31
+ "pattern": "I pw fill {string} with {string}",
32
32
  "type": "When"
33
33
  },
34
34
  {
35
- "pattern": "I press {string}",
35
+ "pattern": "I pw press {string}",
36
36
  "type": "When"
37
37
  },
38
38
  {
39
- "pattern": "I wait for {int} milliseconds",
39
+ "pattern": "I pw drag {string} to {string}",
40
40
  "type": "When"
41
41
  },
42
42
  {
43
- "pattern": "I fill the following {string} test form data",
43
+ "pattern": "I pw drag to {string}",
44
44
  "type": "When"
45
45
  },
46
46
  {
47
- "pattern": "I click",
47
+ "pattern": "I pw fill the following {string} test form data",
48
48
  "type": "When"
49
49
  },
50
50
  {
51
- "pattern": "I click on element {string}",
51
+ "pattern": "I pw click",
52
52
  "type": "When"
53
53
  },
54
54
  {
55
- "pattern": "I click on button {string}",
55
+ "pattern": "I pw click on element {string}",
56
56
  "type": "When"
57
57
  },
58
58
  {
59
- "pattern": "I click on link {string}",
59
+ "pattern": "I pw click on button {string}",
60
60
  "type": "When"
61
61
  },
62
62
  {
63
- "pattern": "I click on label {string}",
63
+ "pattern": "I pw click on exact button text {string}",
64
64
  "type": "When"
65
65
  },
66
66
  {
67
- "pattern": "I click on text {string}",
67
+ "pattern": "I pw click on link {string}",
68
68
  "type": "When"
69
69
  },
70
70
  {
71
- "pattern": "I click on exact text {string}",
71
+ "pattern": "I pw click on label {string}",
72
72
  "type": "When"
73
73
  },
74
74
  {
75
- "pattern": "I click on selector {string}",
75
+ "pattern": "I pw click on text {string}",
76
76
  "type": "When"
77
77
  },
78
78
  {
79
- "pattern": "I click all",
79
+ "pattern": "I pw click on exact text {string}",
80
80
  "type": "When"
81
81
  },
82
82
  {
83
- "pattern": "I double click",
83
+ "pattern": "I pw click on selector {string}",
84
84
  "type": "When"
85
85
  },
86
86
  {
87
- "pattern": "I double click on text {string}",
87
+ "pattern": "I pw click all",
88
88
  "type": "When"
89
89
  },
90
90
  {
91
- "pattern": "I double click position {int} {int}",
91
+ "pattern": "I pw double click",
92
92
  "type": "When"
93
93
  },
94
94
  {
95
- "pattern": "I right click",
95
+ "pattern": "I pw double click on text {string}",
96
96
  "type": "When"
97
97
  },
98
98
  {
99
- "pattern": "I right click on text {string}",
99
+ "pattern": "I pw double click on exact text {string}",
100
100
  "type": "When"
101
101
  },
102
102
  {
103
- "pattern": "I right click position {int} {int}",
103
+ "pattern": "I pw double click position {int} {int}",
104
104
  "type": "When"
105
105
  },
106
106
  {
107
- "pattern": "I click on {int}(?:st|nd|rd|th) element {string}",
107
+ "pattern": "I pw right click",
108
108
  "type": "When"
109
109
  },
110
110
  {
111
- "pattern": "I click on {int}(?:st|nd|rd|th) selector {string}",
111
+ "pattern": "I pw right click on text {string}",
112
112
  "type": "When"
113
113
  },
114
114
  {
115
- "pattern": "I type {string}",
115
+ "pattern": "I pw right click position {int} {int}",
116
116
  "type": "When"
117
117
  },
118
118
  {
119
- "pattern": "I fill {string}",
119
+ "pattern": "I pw click on {int}st element {string}",
120
120
  "type": "When"
121
121
  },
122
122
  {
123
- "pattern": "I type stored {string}",
123
+ "pattern": "I pw click on {int}nd element {string}",
124
124
  "type": "When"
125
125
  },
126
126
  {
127
- "pattern": "I fill stored {string}",
127
+ "pattern": "I pw click on {int}rd element {string}",
128
128
  "type": "When"
129
129
  },
130
130
  {
131
- "pattern": "I slowly type {string}",
131
+ "pattern": "I pw click on {int}th element {string}",
132
132
  "type": "When"
133
133
  },
134
134
  {
135
- "pattern": "I slowly fill {string}",
135
+ "pattern": "I pw click on {int}st selector {string}",
136
136
  "type": "When"
137
137
  },
138
138
  {
139
- "pattern": "I set value {string}",
139
+ "pattern": "I pw click on {int}nd selector {string}",
140
140
  "type": "When"
141
141
  },
142
142
  {
143
- "pattern": "I clear",
143
+ "pattern": "I pw click on {int}rd selector {string}",
144
144
  "type": "When"
145
145
  },
146
146
  {
147
- "pattern": "I press {string}",
147
+ "pattern": "I pw click on {int}th selector {string}",
148
148
  "type": "When"
149
149
  },
150
150
  {
151
- "pattern": "I check",
151
+ "pattern": "I pw click on column {int} in row {int}",
152
152
  "type": "When"
153
153
  },
154
154
  {
155
- "pattern": "I uncheck",
155
+ "pattern": "I pw click on {int}st column in row {string}",
156
156
  "type": "When"
157
157
  },
158
158
  {
159
- "pattern": "I check input",
159
+ "pattern": "I pw click on {int}nd column in row {string}",
160
160
  "type": "When"
161
161
  },
162
162
  {
163
- "pattern": "I uncheck input",
163
+ "pattern": "I pw click on {int}rd column in row {string}",
164
164
  "type": "When"
165
165
  },
166
166
  {
167
- "pattern": "I {string} {int}(?:st|nd|rd|th) selector {string}",
167
+ "pattern": "I pw click on {int}th column in row {string}",
168
168
  "type": "When"
169
169
  },
170
170
  {
171
- "pattern": "I select option {string}",
171
+ "pattern": "I pw type {string}",
172
172
  "type": "When"
173
173
  },
174
174
  {
175
- "pattern": "I submit",
175
+ "pattern": "I pw fill {string}",
176
176
  "type": "When"
177
177
  },
178
178
  {
179
- "pattern": "I select file {string}",
179
+ "pattern": "I pw type stored {string}",
180
180
  "type": "When"
181
181
  },
182
182
  {
183
- "pattern": "I upload file {string}",
183
+ "pattern": "I pw fill stored {string}",
184
184
  "type": "When"
185
185
  },
186
186
  {
187
- "pattern": "I fill the following {string} form data",
187
+ "pattern": "I pw slowly type {string}",
188
188
  "type": "When"
189
189
  },
190
190
  {
191
- "pattern": "I scroll {string} into view",
191
+ "pattern": "I pw slowly fill {string}",
192
192
  "type": "When"
193
193
  },
194
194
  {
195
- "pattern": "I scroll {string} to position x:{int} y:{int}",
195
+ "pattern": "I pw set value {string}",
196
196
  "type": "When"
197
197
  },
198
198
  {
199
- "pattern": "I scroll to coordinates x:{int} y:{int}",
199
+ "pattern": "I pw clear",
200
200
  "type": "When"
201
201
  },
202
202
  {
203
- "pattern": "I scroll mouse window to position top:{int} left:{int}",
203
+ "pattern": "I pw press {string}",
204
204
  "type": "When"
205
205
  },
206
206
  {
207
- "pattern": "I scroll to {string}",
207
+ "pattern": "I pw check",
208
208
  "type": "When"
209
209
  },
210
210
  {
211
- "pattern": "I hover over the element {string}",
211
+ "pattern": "I pw uncheck",
212
212
  "type": "When"
213
213
  },
214
214
  {
215
- "pattern": "I move mouse to coordinates {int}, {int}",
215
+ "pattern": "I pw check input",
216
216
  "type": "When"
217
217
  },
218
218
  {
219
- "pattern": "I hover on {int}(?:st|nd|rd|th) element {string}",
219
+ "pattern": "I pw uncheck input",
220
220
  "type": "When"
221
221
  },
222
222
  {
223
- "pattern": "I hover on {int}(?:st|nd|rd|th) selector {string}",
223
+ "pattern": "I pw {string} {int}(?:st|nd|rd|th) selector {string}",
224
224
  "type": "When"
225
225
  },
226
226
  {
227
- "pattern": "I wait for {int} milliseconds",
227
+ "pattern": "I pw select option {string}",
228
228
  "type": "When"
229
229
  },
230
230
  {
231
- "pattern": "I wait for {int} seconds",
231
+ "pattern": "I pw submit",
232
232
  "type": "When"
233
233
  },
234
234
  {
235
- "pattern": "I pause",
235
+ "pattern": "I pw select file {string}",
236
236
  "type": "When"
237
237
  },
238
238
  {
239
- "pattern": "I debug",
239
+ "pattern": "I pw upload file {string}",
240
240
  "type": "When"
241
241
  },
242
242
  {
243
- "pattern": "I log {string}",
243
+ "pattern": "I pw fill the following {string} form data",
244
244
  "type": "When"
245
245
  },
246
246
  {
247
- "pattern": "I focus",
247
+ "pattern": "I pw select react option {string} from {string}",
248
248
  "type": "When"
249
249
  },
250
250
  {
251
- "pattern": "I blur",
251
+ "pattern": "I pw scroll {string} into view",
252
252
  "type": "When"
253
253
  },
254
254
  {
255
- "pattern": "I set cookie {string} to {string}",
255
+ "pattern": "I pw scroll {string} to position x:{int} y:{int}",
256
256
  "type": "When"
257
257
  },
258
258
  {
259
- "pattern": "I clear all cookies",
259
+ "pattern": "I pw scroll to coordinates x:{int} y:{int}",
260
260
  "type": "When"
261
261
  },
262
262
  {
263
- "pattern": "I set local storage item {string} to {string}",
263
+ "pattern": "I pw scroll mouse window to position top:{int} left:{int}",
264
264
  "type": "When"
265
265
  },
266
266
  {
267
- "pattern": "I get local storage item {string}",
267
+ "pattern": "I pw scroll to {string}",
268
268
  "type": "When"
269
269
  },
270
270
  {
271
- "pattern": "I clear local storage",
271
+ "pattern": "I pw hover over the element {string}",
272
272
  "type": "When"
273
273
  },
274
274
  {
275
- "pattern": "I set session storage item {string} to {string}",
275
+ "pattern": "I pw move mouse to coordinates {int}, {int}",
276
276
  "type": "When"
277
277
  },
278
278
  {
279
- "pattern": "I clear session storage",
279
+ "pattern": "I pw hover on {int}(?:st|nd|rd|th) element {string}",
280
280
  "type": "When"
281
281
  },
282
282
  {
283
- "pattern": "I tap",
283
+ "pattern": "I pw hover on {int}(?:st|nd|rd|th) selector {string}",
284
284
  "type": "When"
285
285
  },
286
286
  {
287
- "pattern": "I tap element {string}",
287
+ "pattern": "I pw wait {int} milliseconds",
288
288
  "type": "When"
289
289
  },
290
290
  {
291
- "pattern": "I tap coordinates x:{int} y:{int}",
291
+ "pattern": "I pw wait {int} seconds",
292
292
  "type": "When"
293
293
  },
294
294
  {
295
- "pattern": "I resize window to width {int} and height {int}",
295
+ "pattern": "I pw pause",
296
296
  "type": "When"
297
297
  },
298
298
  {
299
- "pattern": "I simulate device {string}",
299
+ "pattern": "I pw debug",
300
300
  "type": "When"
301
301
  },
302
302
  {
303
- "pattern": "I set geolocation to lat: {float} long: {float}",
303
+ "pattern": "I pw log {string}",
304
304
  "type": "When"
305
305
  },
306
306
  {
307
- "pattern": "I grant permission {string}",
307
+ "pattern": "I pw focus",
308
308
  "type": "When"
309
309
  },
310
310
  {
311
- "pattern": "I wait for network idle",
311
+ "pattern": "I pw blur",
312
312
  "type": "When"
313
313
  },
314
314
  {
315
- "pattern": "I wait for load state {string}",
315
+ "pattern": "I pw set cookie {string} to {string}",
316
316
  "type": "When"
317
317
  },
318
318
  {
319
- "pattern": "I wait for element to be visible",
319
+ "pattern": "I pw clear all cookies",
320
320
  "type": "When"
321
321
  },
322
322
  {
323
- "pattern": "I wait for element to be hidden",
323
+ "pattern": "I pw set local storage item {string} to {string}",
324
324
  "type": "When"
325
325
  },
326
326
  {
327
- "pattern": "I wait for URL to contain {string}",
327
+ "pattern": "I pw get local storage item {string}",
328
328
  "type": "When"
329
329
  },
330
330
  {
331
- "pattern": "I switch to frame {string}",
331
+ "pattern": "I pw clear local storage",
332
332
  "type": "When"
333
333
  },
334
334
  {
335
- "pattern": "I find element {string} in frame {string}",
335
+ "pattern": "I pw set session storage item {string} to {string}",
336
336
  "type": "When"
337
337
  },
338
338
  {
339
- "pattern": "I switch to new tab",
339
+ "pattern": "I pw clear session storage",
340
340
  "type": "When"
341
341
  },
342
342
  {
343
- "pattern": "I press key {string}",
343
+ "pattern": "I pw store text as {string}",
344
344
  "type": "When"
345
345
  },
346
346
  {
347
- "pattern": "I press key {string} on element",
347
+ "pattern": "I pw tap",
348
348
  "type": "When"
349
349
  },
350
350
  {
351
- "pattern": "I press keys {string}",
351
+ "pattern": "I pw tap element {string}",
352
352
  "type": "When"
353
353
  },
354
354
  {
355
- "pattern": "I press shortcut {string}",
355
+ "pattern": "I pw tap coordinates x:{int} y:{int}",
356
356
  "type": "When"
357
357
  },
358
358
  {
359
- "pattern": "I hold down key {string}",
359
+ "pattern": "I pw resize window to width {int} and height {int}",
360
360
  "type": "When"
361
361
  },
362
362
  {
363
- "pattern": "I release key {string}",
363
+ "pattern": "I pw simulate device {string}",
364
364
  "type": "When"
365
365
  },
366
366
  {
367
- "pattern": "I make a GET request to {string}",
367
+ "pattern": "I pw set geolocation to lat: {float} long: {float}",
368
368
  "type": "When"
369
369
  },
370
370
  {
371
- "pattern": "I make a DELETE request to {string}",
371
+ "pattern": "I pw grant permission {string}",
372
372
  "type": "When"
373
373
  },
374
374
  {
375
- "pattern": "I make a POST request to {string} with data",
375
+ "pattern": "I pw take a screenshot of the page {string}",
376
376
  "type": "When"
377
377
  },
378
378
  {
379
- "pattern": "I make a POST request to {string} with payload from {string}",
379
+ "pattern": "I pw take a screenshot of element {string} as {string}",
380
380
  "type": "When"
381
381
  },
382
382
  {
383
- "pattern": "I expect the response status to be {int}",
383
+ "pattern": "I pw take a viewport screenshot {string}",
384
+ "type": "When"
385
+ },
386
+ {
387
+ "pattern": "I pw expect page {string} to closely match {string}",
388
+ "type": "Then"
389
+ },
390
+ {
391
+ "pattern": "I pw expect element {string} screenshot {string} to closely match {string}",
392
+ "type": "Then"
393
+ },
394
+ {
395
+ "pattern": "I pw capture screenshot {string} for the report",
396
+ "type": "When"
397
+ },
398
+ {
399
+ "pattern": "I pw wait for network idle",
400
+ "type": "When"
401
+ },
402
+ {
403
+ "pattern": "I pw wait for load state {string}",
404
+ "type": "When"
405
+ },
406
+ {
407
+ "pattern": "I pw wait for element to be visible",
408
+ "type": "When"
409
+ },
410
+ {
411
+ "pattern": "I pw wait for {string} to be visible",
412
+ "type": "When"
413
+ },
414
+ {
415
+ "pattern": "I pw wait for element to be hidden",
416
+ "type": "When"
417
+ },
418
+ {
419
+ "pattern": "I pw wait for URL to contain {string}",
420
+ "type": "When"
421
+ },
422
+ {
423
+ "pattern": "I pw switch to frame {string}",
424
+ "type": "When"
425
+ },
426
+ {
427
+ "pattern": "I pw find element {string} in frame {string}",
428
+ "type": "When"
429
+ },
430
+ {
431
+ "pattern": "I pw switch to new tab",
432
+ "type": "When"
433
+ },
434
+ {
435
+ "pattern": "I pw press key {string}",
436
+ "type": "When"
437
+ },
438
+ {
439
+ "pattern": "I pw press key {string} on element",
440
+ "type": "When"
441
+ },
442
+ {
443
+ "pattern": "I pw press keys {string}",
444
+ "type": "When"
445
+ },
446
+ {
447
+ "pattern": "I pw press shortcut {string}",
448
+ "type": "When"
449
+ },
450
+ {
451
+ "pattern": "I pw hold down key {string}",
452
+ "type": "When"
453
+ },
454
+ {
455
+ "pattern": "I pw release key {string}",
456
+ "type": "When"
457
+ },
458
+ {
459
+ "pattern": "I pw make a GET request to {string}",
460
+ "type": "When"
461
+ },
462
+ {
463
+ "pattern": "I pw make a DELETE request to {string}",
464
+ "type": "When"
465
+ },
466
+ {
467
+ "pattern": "I pw make a POST request to {string} with data",
468
+ "type": "When"
469
+ },
470
+ {
471
+ "pattern": "I pw make a POST request to {string} with payload from {string}",
472
+ "type": "When"
473
+ },
474
+ {
475
+ "pattern": "I pw expect the response status to be {int}",
476
+ "type": "Then"
477
+ },
478
+ {
479
+ "pattern": "I pw expect the response body to contain {string}",
480
+ "type": "Then"
481
+ },
482
+ {
483
+ "pattern": "I pw expect the response property {string} to be {string}",
484
+ "type": "Then"
485
+ },
486
+ {
487
+ "pattern": "I pw mock the API endpoint {string} with body {string}",
488
+ "type": "When"
489
+ },
490
+ {
491
+ "pattern": "I pw mock the API endpoint {string} with response from {string}",
492
+ "type": "When"
493
+ },
494
+ {
495
+ "pattern": "I pw mock the API endpoint {string} with status {int}",
496
+ "type": "When"
497
+ },
498
+ {
499
+ "pattern": "I pw intercept URL {string} and stub body:",
500
+ "type": "When"
501
+ },
502
+ {
503
+ "pattern": "I pw intercept URL {string} and stub body {string}",
504
+ "type": "When"
505
+ },
506
+ {
507
+ "pattern": "I pw intercept URL {string}",
508
+ "type": "When"
509
+ },
510
+ {
511
+ "pattern": "I pw make request to {string}",
512
+ "type": "When"
513
+ },
514
+ {
515
+ "pattern": "I pw make a POST request to {string} with JSON body:",
516
+ "type": "When"
517
+ },
518
+ {
519
+ "pattern": "I pw make a {word} request to {string}",
520
+ "type": "When"
521
+ },
522
+ {
523
+ "pattern": "I pw expect element to be visible",
524
+ "type": "Then"
525
+ },
526
+ {
527
+ "pattern": "I pw expect {string} to be visible",
528
+ "type": "Then"
529
+ },
530
+ {
531
+ "pattern": "I pw expect element to be hidden",
532
+ "type": "Then"
533
+ },
534
+ {
535
+ "pattern": "I pw expect element to be enabled",
536
+ "type": "Then"
537
+ },
538
+ {
539
+ "pattern": "I pw expect element to be disabled",
540
+ "type": "Then"
541
+ },
542
+ {
543
+ "pattern": "I pw expect element to have text {string}",
544
+ "type": "Then"
545
+ },
546
+ {
547
+ "pattern": "I pw expect element to contain text {string}",
548
+ "type": "Then"
549
+ },
550
+ {
551
+ "pattern": "I pw expect element to have value {string}",
552
+ "type": "Then"
553
+ },
554
+ {
555
+ "pattern": "I pw expect element to have attribute {string}",
556
+ "type": "Then"
557
+ },
558
+ {
559
+ "pattern": "I pw expect element to have attribute {string} with value {string}",
560
+ "type": "Then"
561
+ },
562
+ {
563
+ "pattern": "I pw expect the page screenshot to match {string}",
564
+ "type": "Then"
565
+ },
566
+ {
567
+ "pattern": "I pw expect the element screenshot to match {string}",
568
+ "type": "Then"
569
+ },
570
+ {
571
+ "pattern": "I pw expect {string} to be not visible",
572
+ "type": "Then"
573
+ },
574
+ {
575
+ "pattern": "I pw expect element {string} exists",
576
+ "type": "Then"
577
+ },
578
+ {
579
+ "pattern": "I pw expect element {string} does not exist",
384
580
  "type": "Then"
385
581
  },
386
582
  {
387
- "pattern": "I expect the response body to contain {string}",
583
+ "pattern": "I pw expect the element {string} to be visible",
388
584
  "type": "Then"
389
585
  },
390
586
  {
391
- "pattern": "I expect the response property {string} to be {string}",
587
+ "pattern": "I pw see button text {string}",
588
+ "type": "When"
589
+ },
590
+ {
591
+ "pattern": "I pw see heading text {string}",
592
+ "type": "When"
593
+ },
594
+ {
595
+ "pattern": "I pw see link text {string}",
596
+ "type": "When"
597
+ },
598
+ {
599
+ "pattern": "I pw see label text {string}",
392
600
  "type": "Then"
393
601
  },
394
602
  {
395
- "pattern": "I mock the API endpoint {string} with body {string}",
603
+ "pattern": "I pw do not see button text {string}",
396
604
  "type": "When"
397
605
  },
398
606
  {
399
- "pattern": "I mock the API endpoint {string} with response from {string}",
607
+ "pattern": "I pw do not see heading text {string}",
400
608
  "type": "When"
401
609
  },
402
610
  {
403
- "pattern": "I mock the API endpoint {string} with status {int}",
611
+ "pattern": "I pw do not see link text {string}",
404
612
  "type": "When"
405
613
  },
406
614
  {
407
- "pattern": "I intercept URL {string} and stub body:",
615
+ "pattern": "I pw do not see label text {string}",
616
+ "type": "Then"
617
+ },
618
+ {
619
+ "pattern": "I pw see exact element text {string}",
620
+ "type": "When"
621
+ },
622
+ {
623
+ "pattern": "I pw see exact value {string}",
408
624
  "type": "When"
409
625
  },
410
626
  {
411
- "pattern": "I intercept URL {string} and stub body {string}",
627
+ "pattern": "I pw do not see exact value {string}",
412
628
  "type": "When"
413
629
  },
414
630
  {
415
- "pattern": "I intercept URL {string}",
631
+ "pattern": "I pw see exact attribute {string} with value {string}",
416
632
  "type": "When"
417
633
  },
418
634
  {
419
- "pattern": "I make request to {string}",
635
+ "pattern": "I pw do not see exact attribute {string} with value {string}",
420
636
  "type": "When"
421
637
  },
422
638
  {
423
- "pattern": "I make a POST request to {string} with JSON body:",
639
+ "pattern": "I pw see text {string}",
424
640
  "type": "When"
425
641
  },
426
642
  {
427
- "pattern": "I make a {word} request to {string}",
643
+ "pattern": "I pw see exact text {string}",
428
644
  "type": "When"
429
645
  },
430
646
  {
431
- "pattern": "I expect element to be visible",
647
+ "pattern": "I pw do not see text {string}",
648
+ "type": "When"
649
+ },
650
+ {
651
+ "pattern": "I pw do not see exact text {string}",
652
+ "type": "When"
653
+ },
654
+ {
655
+ "pattern": "I pw expect the url to contain {string}",
432
656
  "type": "Then"
433
657
  },
434
658
  {
435
- "pattern": "I expect {string} to be visible",
659
+ "pattern": "I pw expect the url to be {string}",
436
660
  "type": "Then"
437
661
  },
438
662
  {
439
- "pattern": "I expect element to be hidden",
663
+ "pattern": "I pw expect the title to contain {string}",
440
664
  "type": "Then"
441
665
  },
442
666
  {
443
- "pattern": "I expect element to be enabled",
667
+ "pattern": "I pw expect the title to be {string}",
444
668
  "type": "Then"
445
669
  },
446
670
  {
447
- "pattern": "I expect element to be disabled",
671
+ "pattern": "I pw see document title {string}",
672
+ "type": "When"
673
+ },
674
+ {
675
+ "pattern": "I pw see document title contains {string}",
448
676
  "type": "Then"
449
677
  },
450
678
  {
451
- "pattern": "I expect element to have text {string}",
679
+ "pattern": "I pw see URL {string}",
680
+ "type": "When"
681
+ },
682
+ {
683
+ "pattern": "I pw see URL contains {string}",
452
684
  "type": "Then"
453
685
  },
454
686
  {
455
- "pattern": "I expect element to contain text {string}",
687
+ "pattern": "I pw see pathname {string}",
688
+ "type": "When"
689
+ },
690
+ {
691
+ "pattern": "I pw see pathname contains {string}",
456
692
  "type": "Then"
457
693
  },
458
694
  {
459
- "pattern": "I expect element to have value {string}",
695
+ "pattern": "I pw see hash {string}",
696
+ "type": "When"
697
+ },
698
+ {
699
+ "pattern": "I pw see hash contains {string}",
460
700
  "type": "Then"
461
701
  },
462
702
  {
463
- "pattern": "I expect element to have attribute {string}",
703
+ "pattern": "I pw see search contains {string}",
464
704
  "type": "Then"
465
705
  },
466
706
  {
467
- "pattern": "I expect element to have attribute {string} with value {string}",
707
+ "pattern": "I pw see location {string}",
708
+ "type": "When"
709
+ },
710
+ {
711
+ "pattern": "I pw see cookie {string} has value {string}",
712
+ "type": "When"
713
+ },
714
+ {
715
+ "pattern": "I pw see cookie {string} contains value {string}",
468
716
  "type": "Then"
469
717
  },
470
718
  {
471
- "pattern": "I expect the page screenshot to match {string}",
719
+ "pattern": "I pw do not see cookie {string}",
720
+ "type": "When"
721
+ },
722
+ {
723
+ "pattern": "I pw see local storage item {string} equals {string}",
472
724
  "type": "Then"
473
725
  },
474
726
  {
475
- "pattern": "I expect the element screenshot to match {string}",
727
+ "pattern": "I pw see local storage item {string} contains {string}",
476
728
  "type": "Then"
477
729
  },
478
730
  {
479
- "pattern": "I expect {string} to have text {string}",
731
+ "pattern": "I pw see local storage item {string}",
732
+ "type": "When"
733
+ },
734
+ {
735
+ "pattern": "I pw do not see local storage item {string}",
736
+ "type": "When"
737
+ },
738
+ {
739
+ "pattern": "I pw see session storage item {string} equals {string}",
480
740
  "type": "Then"
481
741
  },
482
742
  {
483
- "pattern": "I expect {string} to contain text {string}",
743
+ "pattern": "I pw see session storage item {string} contains {string}",
484
744
  "type": "Then"
485
745
  },
486
746
  {
487
- "pattern": "I expect {string} to have value {string}",
747
+ "pattern": "I pw see session storage item {string}",
748
+ "type": "When"
749
+ },
750
+ {
751
+ "pattern": "I pw do not see session storage item {string}",
752
+ "type": "When"
753
+ },
754
+ {
755
+ "pattern": "I pw count elements {string}",
756
+ "type": "When"
757
+ },
758
+ {
759
+ "pattern": "I pw do not see button element {string}",
760
+ "type": "When"
761
+ },
762
+ {
763
+ "pattern": "I pw do not see heading element {string}",
764
+ "type": "When"
765
+ },
766
+ {
767
+ "pattern": "I pw do not see label element {string}",
488
768
  "type": "Then"
489
769
  },
490
770
  {
491
- "pattern": "I expect {string} to have attribute {string} with value {string}",
771
+ "pattern": "I pw do not see link element {string}",
772
+ "type": "When"
773
+ },
774
+ {
775
+ "pattern": "I pw do not see testid element {string}",
776
+ "type": "When"
777
+ },
778
+ {
779
+ "pattern": "I pw do not see role element {string}",
780
+ "type": "When"
781
+ },
782
+ {
783
+ "pattern": "I pw do not see option element {string}",
784
+ "type": "When"
785
+ },
786
+ {
787
+ "pattern": "I pw do not see element with attribute {string} having value {string}",
788
+ "type": "When"
789
+ },
790
+ {
791
+ "pattern": "I pw see element attribute {string} contains {string}",
492
792
  "type": "Then"
493
793
  },
494
794
  {
495
- "pattern": "I expect the url to contain {string}",
795
+ "pattern": "I pw see element attribute {string} equals {string}",
496
796
  "type": "Then"
497
797
  },
498
798
  {
499
- "pattern": "I expect the url to be {string}",
799
+ "pattern": "I pw see element has attribute {string}",
800
+ "type": "When"
801
+ },
802
+ {
803
+ "pattern": "I pw see button element {string}",
804
+ "type": "When"
805
+ },
806
+ {
807
+ "pattern": "I pw see heading element {string}",
808
+ "type": "When"
809
+ },
810
+ {
811
+ "pattern": "I pw see label element {string}",
500
812
  "type": "Then"
501
813
  },
502
814
  {
503
- "pattern": "I expect the title to contain {string}",
815
+ "pattern": "I pw see link element {string}",
816
+ "type": "When"
817
+ },
818
+ {
819
+ "pattern": "I pw see testid element {string}",
820
+ "type": "When"
821
+ },
822
+ {
823
+ "pattern": "I pw see role element {string}",
824
+ "type": "When"
825
+ },
826
+ {
827
+ "pattern": "I pw see option element {string}",
828
+ "type": "When"
829
+ },
830
+ {
831
+ "pattern": "I pw expect {string} to have count {int}",
504
832
  "type": "Then"
505
833
  },
506
834
  {
507
- "pattern": "I expect the title to be {string}",
835
+ "pattern": "I pw expect {string} to be hidden",
508
836
  "type": "Then"
509
837
  },
510
838
  {
511
- "pattern": "I save the browser state to {string}",
839
+ "pattern": "I pw get element by selector {string} to have class containing {string}",
840
+ "type": "When"
841
+ },
842
+ {
843
+ "pattern": "I pw get element by selector {string} to have text {string}",
844
+ "type": "When"
845
+ },
846
+ {
847
+ "pattern": "I pw get element by selector {string} to contain text {string}",
848
+ "type": "When"
849
+ },
850
+ {
851
+ "pattern": "I pw get element by selector {string} to have value {string}",
852
+ "type": "When"
853
+ },
854
+ {
855
+ "pattern": "I pw get element by selector {string} to have attribute {string} with value {string}",
512
856
  "type": "When"
513
857
  },
514
858
  {
515
- "pattern": "I load the browser state from {string}",
859
+ "pattern": "I pw get element by selector {string} to be visible",
516
860
  "type": "When"
517
861
  },
518
862
  {
519
- "pattern": "I run the database query {string}",
863
+ "pattern": "I pw get element by selector {string} to not contain text {string}",
520
864
  "type": "When"
521
865
  },
522
866
  {
523
- "pattern": "I expect the database to return {int} record(s)",
867
+ "pattern": "I pw see input value {string} equals {string}",
524
868
  "type": "Then"
525
869
  },
526
870
  {
527
- "pattern": "I expect the database to return no records",
871
+ "pattern": "I pw see input value {string} contains {string}",
528
872
  "type": "Then"
529
873
  },
530
874
  {
531
- "pattern": "I expect the first database record to contain",
875
+ "pattern": "I pw see textarea value {string} equals {string}",
532
876
  "type": "Then"
533
877
  },
534
878
  {
535
- "pattern": "I expect database row {int} to contain",
879
+ "pattern": "I pw see textarea value {string} contains {string}",
536
880
  "type": "Then"
537
881
  },
538
882
  {
539
- "pattern": "I expect all database records to contain",
883
+ "pattern": "I pw see text {string} equals {string}",
540
884
  "type": "Then"
541
885
  },
542
886
  {
543
- "pattern": "I expect database column {string} to exist",
887
+ "pattern": "I pw see text {string} contains {string}",
544
888
  "type": "Then"
545
889
  },
546
890
  {
547
- "pattern": "I expect database column {string} to contain {string}",
891
+ "pattern": "I pw see value {string} equals {string}",
548
892
  "type": "Then"
549
893
  },
550
894
  {
551
- "pattern": "I expect database column {string} to be of type {string}",
895
+ "pattern": "I pw save the browser state to {string}",
552
896
  "type": "When"
553
897
  },
554
898
  {
555
- "pattern": "I find element by selector {string}",
899
+ "pattern": "I pw load the browser state from {string}",
556
900
  "type": "When"
557
901
  },
558
902
  {
559
- "pattern": "I find element by text {string}",
903
+ "pattern": "I pw run the database query {string}",
560
904
  "type": "When"
561
905
  },
562
906
  {
563
- "pattern": "I find element by title {string}",
907
+ "pattern": "I pw expect the database to return {int} record(s)",
908
+ "type": "Then"
909
+ },
910
+ {
911
+ "pattern": "I pw expect the database to return no records",
912
+ "type": "Then"
913
+ },
914
+ {
915
+ "pattern": "I pw expect the first database record to contain",
916
+ "type": "Then"
917
+ },
918
+ {
919
+ "pattern": "I pw expect database row {int} to contain",
920
+ "type": "Then"
921
+ },
922
+ {
923
+ "pattern": "I pw expect all database records to contain",
924
+ "type": "Then"
925
+ },
926
+ {
927
+ "pattern": "I pw expect database column {string} to exist",
928
+ "type": "Then"
929
+ },
930
+ {
931
+ "pattern": "I pw expect database column {string} to contain {string}",
932
+ "type": "Then"
933
+ },
934
+ {
935
+ "pattern": "I pw expect database column {string} to be of type {string}",
936
+ "type": "When"
937
+ },
938
+ {
939
+ "pattern": "I pw find element by selector {string}",
940
+ "type": "When"
941
+ },
942
+ {
943
+ "pattern": "I pw get element by selector {string}",
564
944
  "type": "When"
565
945
  },
566
946
  {
567
- "pattern": "I find element by testid {string}",
947
+ "pattern": "I pw find element by text {string}",
568
948
  "type": "When"
569
949
  },
570
950
  {
571
- "pattern": "I find element by role {string}",
951
+ "pattern": "I pw find element by title {string}",
572
952
  "type": "When"
573
953
  },
574
954
  {
575
- "pattern": "I find element by placeholder text {string}",
955
+ "pattern": "I pw find element by testid {string}",
576
956
  "type": "When"
577
957
  },
578
958
  {
579
- "pattern": "I find element by label text {string}",
959
+ "pattern": "I pw find element by role {string}",
960
+ "type": "When"
961
+ },
962
+ {
963
+ "pattern": "I pw find element by placeholder text {string}",
964
+ "type": "When"
965
+ },
966
+ {
967
+ "pattern": "I pw find element by label text {string}",
580
968
  "type": "Then"
581
969
  },
582
970
  {
583
- "pattern": "I find element by alt text {string}",
971
+ "pattern": "I pw find element by alt text {string}",
972
+ "type": "When"
973
+ },
974
+ {
975
+ "pattern": "I pw find link by text {string}",
584
976
  "type": "When"
585
977
  },
586
978
  {
587
- "pattern": "I find link by text {string}",
979
+ "pattern": "I pw find heading by text {string}",
588
980
  "type": "When"
589
981
  },
590
982
  {
591
- "pattern": "I find heading by text {string}",
983
+ "pattern": "I pw find element by name {string}",
592
984
  "type": "When"
593
985
  },
594
986
  {
595
- "pattern": "I find element by name {string}",
987
+ "pattern": "I pw find elements by selector {string}",
596
988
  "type": "When"
597
989
  },
598
990
  {
599
- "pattern": "I find elements by selector {string}",
991
+ "pattern": "I pw get elements by selector {string}",
600
992
  "type": "When"
601
993
  },
602
994
  {
603
- "pattern": "I find buttons by text {string}",
995
+ "pattern": "I pw find buttons by text {string}",
604
996
  "type": "When"
605
997
  },
606
998
  {
607
- "pattern": "I get first element",
999
+ "pattern": "I pw get first element",
608
1000
  "type": "When"
609
1001
  },
610
1002
  {
611
- "pattern": "I get last element",
1003
+ "pattern": "I pw get last element",
612
1004
  "type": "When"
613
1005
  },
614
1006
  {
615
- "pattern": "I get {int}(?:st|nd|rd|th) element",
1007
+ "pattern": "I pw get {int}(?:st|nd|rd|th) element",
616
1008
  "type": "When"
617
1009
  },
618
1010
  {
619
- "pattern": "I store element text as {string}",
1011
+ "pattern": "I pw store element text as {string}",
620
1012
  "type": "When"
621
1013
  },
622
1014
  {
623
- "pattern": "I get focused element",
1015
+ "pattern": "I pw get focused element",
624
1016
  "type": "When"
625
1017
  },
626
1018
  {
627
- "pattern": "I find textarea by label text {string}",
1019
+ "pattern": "I pw find textarea by label text {string}",
628
1020
  "type": "Then"
629
1021
  },
630
1022
  {
631
- "pattern": "I find input by display value {string}",
1023
+ "pattern": "I pw find input by display value {string}",
632
1024
  "type": "When"
633
1025
  },
634
1026
  {
635
- "pattern": "I find input by placeholder text {string}",
1027
+ "pattern": "I pw find input by placeholder text {string}",
636
1028
  "type": "When"
637
1029
  },
638
1030
  {
639
- "pattern": "I find headings by text {string}",
1031
+ "pattern": "I pw find headings by text {string}",
640
1032
  "type": "When"
641
1033
  },
642
1034
  {
643
- "pattern": "I find input by ID {string}",
1035
+ "pattern": "I pw find input by ID {string}",
644
1036
  "type": "When"
645
1037
  },
646
1038
  {
647
- "pattern": "I find input by name {string}",
1039
+ "pattern": "I pw find input by name {string}",
648
1040
  "type": "When"
649
1041
  },
650
1042
  {
651
- "pattern": "I select option {string} from {string}",
1043
+ "pattern": "I pw select option {string} from {string}",
652
1044
  "type": "When"
653
1045
  },
654
1046
  {
655
- "pattern": "I check {string}",
1047
+ "pattern": "I pw check {string}",
656
1048
  "type": "When"
657
1049
  },
658
1050
  {
659
- "pattern": "I uncheck {string}",
1051
+ "pattern": "I pw uncheck {string}",
660
1052
  "type": "When"
661
1053
  },
662
1054
  {
663
- "pattern": "I upload file {string} to {string}",
1055
+ "pattern": "I pw upload file {string} to {string}",
664
1056
  "type": "When"
665
1057
  },
666
1058
  {
667
- "pattern": "I accept the next dialog",
1059
+ "pattern": "I pw accept the next dialog",
668
1060
  "type": "When"
669
1061
  },
670
1062
  {
671
- "pattern": "I dismiss the next dialog",
1063
+ "pattern": "I pw dismiss the next dialog",
672
1064
  "type": "When"
673
1065
  },
674
1066
  {
675
- "pattern": "I type {string} into the next prompt and accept",
1067
+ "pattern": "I pw type {string} into the next prompt and accept",
676
1068
  "type": "When"
677
1069
  },
678
1070
  {
679
- "pattern": "I click {string} inside frame {string}",
1071
+ "pattern": "I pw click {string} inside frame {string}",
680
1072
  "type": "When"
681
1073
  },
682
1074
  {
683
- "pattern": "I fill {string} inside frame {string} with {string}",
1075
+ "pattern": "I pw fill {string} inside frame {string} with {string}",
684
1076
  "type": "When"
685
1077
  },
686
1078
  {
687
- "pattern": "I expect {string} inside frame {string} to have text {string}",
1079
+ "pattern": "I pw expect {string} inside frame {string} to have text {string}",
688
1080
  "type": "Then"
689
1081
  }
690
1082
  ]