playwright-cucumber-ts-steps 1.3.1 → 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 (40) hide show
  1. package/dist/backend/actions/click.js +30 -30
  2. package/dist/backend/actions/form.js +2 -2
  3. package/dist/backend/actions/formTable.js +1 -1
  4. package/dist/backend/actions/frames.js +3 -3
  5. package/dist/backend/actions/inputs.js +18 -18
  6. package/dist/backend/actions/interactions.js +6 -6
  7. package/dist/backend/actions/keyboard.js +6 -6
  8. package/dist/backend/actions/misc.js +15 -15
  9. package/dist/backend/actions/mobile.js +7 -7
  10. package/dist/backend/actions/mouse.js +9 -9
  11. package/dist/backend/actions/navigation.js +5 -5
  12. package/dist/backend/actions/visual.js +7 -7
  13. package/dist/backend/actions/waits.js +6 -6
  14. package/dist/backend/api/assertions.js +3 -3
  15. package/dist/backend/api/mock.js +3 -3
  16. package/dist/backend/api/network.js +6 -6
  17. package/dist/backend/api/requests.js +4 -4
  18. package/dist/backend/assertions/document.js +10 -10
  19. package/dist/backend/assertions/elements.js +28 -28
  20. package/dist/backend/assertions/expectVisible.js +1 -1
  21. package/dist/backend/assertions/forms.js +7 -7
  22. package/dist/backend/assertions/pageState.js +4 -4
  23. package/dist/backend/assertions/storage.js +11 -11
  24. package/dist/backend/assertions/text.js +17 -17
  25. package/dist/backend/assertions/visibility.js +15 -15
  26. package/dist/backend/auth/index.js +2 -2
  27. package/dist/backend/db/steps.d.ts +1 -1
  28. package/dist/backend/db/steps.d.ts.map +1 -1
  29. package/dist/backend/db/steps.js +10 -10
  30. package/dist/backend/elements/alerts.js +3 -3
  31. package/dist/backend/elements/find.js +26 -26
  32. package/dist/backend/elements/forms.js +4 -4
  33. package/dist/backend/elements/frames.js +3 -3
  34. package/dist/backend/utils/resolver.js +1 -1
  35. package/dist/component/runner.d.ts +1 -1
  36. package/dist/component/runner.d.ts.map +1 -1
  37. package/dist/component/runner.js +38 -5
  38. package/dist/core/runner.js +3 -3
  39. package/dist/metadata.json +270 -270
  40. package/package.json +3 -2
@@ -375,33 +375,33 @@ function getOrdinalSuffix(num) {
375
375
  // ==================================================
376
376
  // GLUE STEPS
377
377
  // ==================================================
378
- (0, registry_1.Step)("I click", clickStoredElement, "When");
379
- (0, registry_1.Step)("I click on element {string}", clickElementBySelector, "When");
380
- (0, registry_1.Step)("I click on button {string}", clickButtonByLabel, "When");
381
- (0, registry_1.Step)("I click on exact button text {string}", clickButtonByExactText, "When");
382
- (0, registry_1.Step)("I click on link {string}", clickLinkByText, "When");
383
- (0, registry_1.Step)("I click on label {string}", clickLabelByText, "When");
384
- (0, registry_1.Step)("I click on text {string}", clickByText, "When");
385
- (0, registry_1.Step)("I click on exact text {string}", clickByExactText, "When");
386
- (0, registry_1.Step)("I click on selector {string}", clickByRegexSelector, "When");
387
- (0, registry_1.Step)("I click all", clickAllStoredElements, "When");
388
- (0, registry_1.Step)("I double click", doubleClickStoredElement, "When");
389
- (0, registry_1.Step)("I double click on text {string}", doubleClickByText, "When");
390
- (0, registry_1.Step)("I double click on exact text {string}", doubleClickByExactText, "When");
391
- (0, registry_1.Step)("I double click position {int} {int}", doubleClickPosition, "When");
392
- (0, registry_1.Step)("I right click", rightClickStoredElement, "When");
393
- (0, registry_1.Step)("I right click on text {string}", rightClickByText, "When");
394
- (0, registry_1.Step)("I right click position {int} {int}", rightClickPosition, "When");
395
- (0, registry_1.Step)("I click on {int}st element {string}", clickNthElementByText, "When");
396
- (0, registry_1.Step)("I click on {int}nd element {string}", clickNthElementByText, "When");
397
- (0, registry_1.Step)("I click on {int}rd element {string}", clickNthElementByText, "When");
398
- (0, registry_1.Step)("I click on {int}th element {string}", clickNthElementByText, "When");
399
- (0, registry_1.Step)("I click on {int}st selector {string}", clickNthElementBySelector, "When");
400
- (0, registry_1.Step)("I click on {int}nd selector {string}", clickNthElementBySelector, "When");
401
- (0, registry_1.Step)("I click on {int}rd selector {string}", clickNthElementBySelector, "When");
402
- (0, registry_1.Step)("I click on {int}th selector {string}", clickNthElementBySelector, "When");
403
- (0, registry_1.Step)("I click on column {int} in row {int}", clickOnColumnInRow, "And");
404
- (0, registry_1.Step)("I click on {int}st column in row {string}", clickOnNthColumnInRow, "When");
405
- (0, registry_1.Step)("I click on {int}nd column in row {string}", clickOnNthColumnInRow, "When");
406
- (0, registry_1.Step)("I click on {int}rd column in row {string}", clickOnNthColumnInRow, "When");
407
- (0, registry_1.Step)("I click on {int}th column in row {string}", clickOnNthColumnInRow, "When");
378
+ (0, registry_1.Step)("I pw click", clickStoredElement, "When");
379
+ (0, registry_1.Step)("I pw click on element {string}", clickElementBySelector, "When");
380
+ (0, registry_1.Step)("I pw click on button {string}", clickButtonByLabel, "When");
381
+ (0, registry_1.Step)("I pw click on exact button text {string}", clickButtonByExactText, "When");
382
+ (0, registry_1.Step)("I pw click on link {string}", clickLinkByText, "When");
383
+ (0, registry_1.Step)("I pw click on label {string}", clickLabelByText, "When");
384
+ (0, registry_1.Step)("I pw click on text {string}", clickByText, "When");
385
+ (0, registry_1.Step)("I pw click on exact text {string}", clickByExactText, "When");
386
+ (0, registry_1.Step)("I pw click on selector {string}", clickByRegexSelector, "When");
387
+ (0, registry_1.Step)("I pw click all", clickAllStoredElements, "When");
388
+ (0, registry_1.Step)("I pw double click", doubleClickStoredElement, "When");
389
+ (0, registry_1.Step)("I pw double click on text {string}", doubleClickByText, "When");
390
+ (0, registry_1.Step)("I pw double click on exact text {string}", doubleClickByExactText, "When");
391
+ (0, registry_1.Step)("I pw double click position {int} {int}", doubleClickPosition, "When");
392
+ (0, registry_1.Step)("I pw right click", rightClickStoredElement, "When");
393
+ (0, registry_1.Step)("I pw right click on text {string}", rightClickByText, "When");
394
+ (0, registry_1.Step)("I pw right click position {int} {int}", rightClickPosition, "When");
395
+ (0, registry_1.Step)("I pw click on {int}st element {string}", clickNthElementByText, "When");
396
+ (0, registry_1.Step)("I pw click on {int}nd element {string}", clickNthElementByText, "When");
397
+ (0, registry_1.Step)("I pw click on {int}rd element {string}", clickNthElementByText, "When");
398
+ (0, registry_1.Step)("I pw click on {int}th element {string}", clickNthElementByText, "When");
399
+ (0, registry_1.Step)("I pw click on {int}st selector {string}", clickNthElementBySelector, "When");
400
+ (0, registry_1.Step)("I pw click on {int}nd selector {string}", clickNthElementBySelector, "When");
401
+ (0, registry_1.Step)("I pw click on {int}rd selector {string}", clickNthElementBySelector, "When");
402
+ (0, registry_1.Step)("I pw click on {int}th selector {string}", clickNthElementBySelector, "When");
403
+ (0, registry_1.Step)("I pw click on column {int} in row {int}", clickOnColumnInRow, "And");
404
+ (0, registry_1.Step)("I pw click on {int}st column in row {string}", clickOnNthColumnInRow, "When");
405
+ (0, registry_1.Step)("I pw click on {int}nd column in row {string}", clickOnNthColumnInRow, "When");
406
+ (0, registry_1.Step)("I pw click on {int}rd column in row {string}", clickOnNthColumnInRow, "When");
407
+ (0, registry_1.Step)("I pw click on {int}th column in row {string}", clickOnNthColumnInRow, "When");
@@ -240,5 +240,5 @@ async function selectReactOption(page, optionText, selectorKey) {
240
240
  // ==================================================
241
241
  // GLUE STEPS
242
242
  // ==================================================
243
- (0, registry_1.Step)("I fill the following {string} form data", fillFormData, "When");
244
- (0, registry_1.Step)("I select react option {string} from {string}", selectReactOption, "When");
243
+ (0, registry_1.Step)("I pw fill the following {string} form data", fillFormData, "When");
244
+ (0, registry_1.Step)("I pw select react option {string} from {string}", selectReactOption, "When");
@@ -75,4 +75,4 @@ async function fillTestFormData(page, formName, tableData) {
75
75
  // ==================================================
76
76
  // GLUE STEPS
77
77
  // ==================================================
78
- (0, registry_1.Step)("I fill the following {string} test form data", fillTestFormData, "When");
78
+ (0, registry_1.Step)("I pw fill the following {string} test form data", fillTestFormData, "When");
@@ -61,6 +61,6 @@ async function switchToNewTab(page) {
61
61
  // ==================================================
62
62
  // GLUE STEPS
63
63
  // ==================================================
64
- (0, registry_1.Step)("I switch to frame {string}", switchToFrame, "When");
65
- (0, registry_1.Step)("I find element {string} in frame {string}", findElementInFrame, "When");
66
- (0, registry_1.Step)("I switch to new tab", switchToNewTab, "When");
64
+ (0, registry_1.Step)("I pw switch to frame {string}", switchToFrame, "When");
65
+ (0, registry_1.Step)("I pw find element {string} in frame {string}", findElementInFrame, "When");
66
+ (0, registry_1.Step)("I pw switch to new tab", switchToNewTab, "When");
@@ -183,21 +183,21 @@ async function uploadFile(page, filePath) {
183
183
  // ==================================================
184
184
  // GLUE STEPS
185
185
  // ==================================================
186
- (0, registry_1.Step)("I type {string}", typeText, "When");
187
- (0, registry_1.Step)("I fill {string}", typeText, "When");
188
- (0, registry_1.Step)("I type stored {string}", typeStoredText, "When");
189
- (0, registry_1.Step)("I fill stored {string}", typeStoredText, "When");
190
- (0, registry_1.Step)("I slowly type {string}", typeSlowly, "When");
191
- (0, registry_1.Step)("I slowly fill {string}", typeSlowly, "When");
192
- (0, registry_1.Step)("I set value {string}", setInputValue, "When");
193
- (0, registry_1.Step)("I clear", clearInput, "When");
194
- (0, registry_1.Step)("I press {string}", pressKeyOnInput, "When");
195
- (0, registry_1.Step)("I check", checkElement, "When");
196
- (0, registry_1.Step)("I uncheck", uncheckElement, "When");
197
- (0, registry_1.Step)("I check input", checkElement, "When");
198
- (0, registry_1.Step)("I uncheck input", uncheckElement, "When");
199
- (0, registry_1.Step)("I {string} {int}(?:st|nd|rd|th) selector {string}", checkNthElementBySelector, "When");
200
- (0, registry_1.Step)("I select option {string}", selectOption, "When");
201
- (0, registry_1.Step)("I submit", submitForm, "When");
202
- (0, registry_1.Step)("I select file {string}", selectFile, "When");
203
- (0, registry_1.Step)("I upload file {string}", uploadFile, "When");
186
+ (0, registry_1.Step)("I pw type {string}", typeText, "When");
187
+ (0, registry_1.Step)("I pw fill {string}", typeText, "When");
188
+ (0, registry_1.Step)("I pw type stored {string}", typeStoredText, "When");
189
+ (0, registry_1.Step)("I pw fill stored {string}", typeStoredText, "When");
190
+ (0, registry_1.Step)("I pw slowly type {string}", typeSlowly, "When");
191
+ (0, registry_1.Step)("I pw slowly fill {string}", typeSlowly, "When");
192
+ (0, registry_1.Step)("I pw set value {string}", setInputValue, "When");
193
+ (0, registry_1.Step)("I pw clear", clearInput, "When");
194
+ (0, registry_1.Step)("I pw press {string}", pressKeyOnInput, "When");
195
+ (0, registry_1.Step)("I pw check", checkElement, "When");
196
+ (0, registry_1.Step)("I pw uncheck", uncheckElement, "When");
197
+ (0, registry_1.Step)("I pw check input", checkElement, "When");
198
+ (0, registry_1.Step)("I pw uncheck input", uncheckElement, "When");
199
+ (0, registry_1.Step)("I pw {string} {int}(?:st|nd|rd|th) selector {string}", checkNthElementBySelector, "When");
200
+ (0, registry_1.Step)("I pw select option {string}", selectOption, "When");
201
+ (0, registry_1.Step)("I pw submit", submitForm, "When");
202
+ (0, registry_1.Step)("I pw select file {string}", selectFile, "When");
203
+ (0, registry_1.Step)("I pw upload file {string}", uploadFile, "When");
@@ -128,9 +128,9 @@ async function dragToTarget(page, targetKey) {
128
128
  // ==================================================
129
129
  // GLUE STEPS
130
130
  // ==================================================
131
- (0, registry_1.Step)("I click {string}", clickElement, "When");
132
- (0, registry_1.Step)("I force click {string}", forceClickElement, "When");
133
- (0, registry_1.Step)("I fill {string} with {string}", fillElement, "When");
134
- (0, registry_1.Step)("I press {string}", pressKeyGlobal, "When");
135
- (0, registry_1.Step)("I drag {string} to {string}", dragElementTo, "When");
136
- (0, registry_1.Step)("I drag to {string}", dragToTarget, "And");
131
+ (0, registry_1.Step)("I pw click {string}", clickElement, "When");
132
+ (0, registry_1.Step)("I pw force click {string}", forceClickElement, "When");
133
+ (0, registry_1.Step)("I pw fill {string} with {string}", fillElement, "When");
134
+ (0, registry_1.Step)("I pw press {string}", pressKeyGlobal, "When");
135
+ (0, registry_1.Step)("I pw drag {string} to {string}", dragElementTo, "When");
136
+ (0, registry_1.Step)("I pw drag to {string}", dragToTarget, "And");
@@ -66,9 +66,9 @@ async function releaseKey(page, key) {
66
66
  // ==================================================
67
67
  // GLUE STEPS
68
68
  // ==================================================
69
- (0, registry_1.Step)("I press key {string}", pressKey, "When");
70
- (0, registry_1.Step)("I press key {string} on element", pressKeyOnElement, "When");
71
- (0, registry_1.Step)("I press keys {string}", typeKeysGlobal, "When");
72
- (0, registry_1.Step)("I press shortcut {string}", pressShortcut, "When");
73
- (0, registry_1.Step)("I hold down key {string}", holdDownKey, "When");
74
- (0, registry_1.Step)("I release key {string}", releaseKey, "When");
69
+ (0, registry_1.Step)("I pw press key {string}", pressKey, "When");
70
+ (0, registry_1.Step)("I pw press key {string} on element", pressKeyOnElement, "When");
71
+ (0, registry_1.Step)("I pw press keys {string}", typeKeysGlobal, "When");
72
+ (0, registry_1.Step)("I pw press shortcut {string}", pressShortcut, "When");
73
+ (0, registry_1.Step)("I pw hold down key {string}", holdDownKey, "When");
74
+ (0, registry_1.Step)("I pw release key {string}", releaseKey, "When");
@@ -198,18 +198,18 @@ async function storeActiveElementText(page, alias) {
198
198
  // ==================================================
199
199
  // GLUE STEPS
200
200
  // ==================================================
201
- (0, registry_1.Step)("I wait {int} milliseconds", waitMilliseconds, "When");
202
- (0, registry_1.Step)("I wait {int} seconds", waitSeconds, "When");
203
- (0, registry_1.Step)("I pause", pauseExecution, "When");
204
- (0, registry_1.Step)("I debug", debugExecution, "When");
205
- (0, registry_1.Step)("I log {string}", logMessage, "When");
206
- (0, registry_1.Step)("I focus", focusElement, "When");
207
- (0, registry_1.Step)("I blur", blurElement, "When");
208
- (0, registry_1.Step)("I set cookie {string} to {string}", setCookie, "When");
209
- (0, registry_1.Step)("I clear all cookies", clearAllCookies, "When");
210
- (0, registry_1.Step)("I set local storage item {string} to {string}", setLocalStorageItem, "When");
211
- (0, registry_1.Step)("I get local storage item {string}", getLocalStorageItem, "When");
212
- (0, registry_1.Step)("I clear local storage", clearLocalStorage, "When");
213
- (0, registry_1.Step)("I set session storage item {string} to {string}", setSessionStorageItem, "When");
214
- (0, registry_1.Step)("I clear session storage", clearSessionStorage, "When");
215
- (0, registry_1.Step)("I store text as {string}", storeActiveElementText, "When");
201
+ (0, registry_1.Step)("I pw wait {int} milliseconds", waitMilliseconds, "When");
202
+ (0, registry_1.Step)("I pw wait {int} seconds", waitSeconds, "When");
203
+ (0, registry_1.Step)("I pw pause", pauseExecution, "When");
204
+ (0, registry_1.Step)("I pw debug", debugExecution, "When");
205
+ (0, registry_1.Step)("I pw log {string}", logMessage, "When");
206
+ (0, registry_1.Step)("I pw focus", focusElement, "When");
207
+ (0, registry_1.Step)("I pw blur", blurElement, "When");
208
+ (0, registry_1.Step)("I pw set cookie {string} to {string}", setCookie, "When");
209
+ (0, registry_1.Step)("I pw clear all cookies", clearAllCookies, "When");
210
+ (0, registry_1.Step)("I pw set local storage item {string} to {string}", setLocalStorageItem, "When");
211
+ (0, registry_1.Step)("I pw get local storage item {string}", getLocalStorageItem, "When");
212
+ (0, registry_1.Step)("I pw clear local storage", clearLocalStorage, "When");
213
+ (0, registry_1.Step)("I pw set session storage item {string} to {string}", setSessionStorageItem, "When");
214
+ (0, registry_1.Step)("I pw clear session storage", clearSessionStorage, "When");
215
+ (0, registry_1.Step)("I pw store text as {string}", storeActiveElementText, "When");
@@ -114,10 +114,10 @@ async function grantPermission(page, permission) {
114
114
  // ==================================================
115
115
  // GLUE STEPS
116
116
  // ==================================================
117
- (0, registry_1.Step)("I tap", tapStoredElement, "When");
118
- (0, registry_1.Step)("I tap element {string}", tapElementBySelector, "When");
119
- (0, registry_1.Step)("I tap coordinates x:{int} y:{int}", tapCoordinates, "When");
120
- (0, registry_1.Step)("I resize window to width {int} and height {int}", resizeWindow, "When");
121
- (0, registry_1.Step)("I simulate device {string}", simulateDevice, "When");
122
- (0, registry_1.Step)("I set geolocation to lat: {float} long: {float}", setGeolocation, "When");
123
- (0, registry_1.Step)("I grant permission {string}", grantPermission, "When");
117
+ (0, registry_1.Step)("I pw tap", tapStoredElement, "When");
118
+ (0, registry_1.Step)("I pw tap element {string}", tapElementBySelector, "When");
119
+ (0, registry_1.Step)("I pw tap coordinates x:{int} y:{int}", tapCoordinates, "When");
120
+ (0, registry_1.Step)("I pw resize window to width {int} and height {int}", resizeWindow, "When");
121
+ (0, registry_1.Step)("I pw simulate device {string}", simulateDevice, "When");
122
+ (0, registry_1.Step)("I pw set geolocation to lat: {float} long: {float}", setGeolocation, "When");
123
+ (0, registry_1.Step)("I pw grant permission {string}", grantPermission, "When");
@@ -154,12 +154,12 @@ async function hoverNthElementBySelector(page, indexStr, selectorKey, table) {
154
154
  // ==================================================
155
155
  // GLUE STEPS
156
156
  // ==================================================
157
- (0, registry_1.Step)("I scroll {string} into view", scrollIntoView, "When");
158
- (0, registry_1.Step)("I scroll {string} to position x:{int} y:{int}", scrollElementToPosition, "When");
159
- (0, registry_1.Step)("I scroll to coordinates x:{int} y:{int}", scrollWindowToCoordinates, "When");
160
- (0, registry_1.Step)("I scroll mouse window to position top:{int} left:{int}", scrollWindowSmoothly, "When");
161
- (0, registry_1.Step)("I scroll to {string}", scrollToDirection, "When");
162
- (0, registry_1.Step)("I hover over the element {string}", hoverElement, "When");
163
- (0, registry_1.Step)("I move mouse to coordinates {int}, {int}", moveMouseToCoordinates, "When");
164
- (0, registry_1.Step)("I hover on {int}(?:st|nd|rd|th) element {string}", hoverNthElementByText, "When");
165
- (0, registry_1.Step)("I hover on {int}(?:st|nd|rd|th) selector {string}", hoverNthElementBySelector, "When");
157
+ (0, registry_1.Step)("I pw scroll {string} into view", scrollIntoView, "When");
158
+ (0, registry_1.Step)("I pw scroll {string} to position x:{int} y:{int}", scrollElementToPosition, "When");
159
+ (0, registry_1.Step)("I pw scroll to coordinates x:{int} y:{int}", scrollWindowToCoordinates, "When");
160
+ (0, registry_1.Step)("I pw scroll mouse window to position top:{int} left:{int}", scrollWindowSmoothly, "When");
161
+ (0, registry_1.Step)("I pw scroll to {string}", scrollToDirection, "When");
162
+ (0, registry_1.Step)("I pw hover over the element {string}", hoverElement, "When");
163
+ (0, registry_1.Step)("I pw move mouse to coordinates {int}, {int}", moveMouseToCoordinates, "When");
164
+ (0, registry_1.Step)("I pw hover on {int}(?:st|nd|rd|th) element {string}", hoverNthElementByText, "When");
165
+ (0, registry_1.Step)("I pw hover on {int}(?:st|nd|rd|th) selector {string}", hoverNthElementBySelector, "When");
@@ -64,8 +64,8 @@ async function navigateToPath(page, path) {
64
64
  // ==================================================
65
65
  // GLUE STEPS
66
66
  // ==================================================
67
- (0, registry_1.Step)("I visit {string}", visitUrl, "Given");
68
- (0, registry_1.Step)("I reload the page", reloadPage, "When");
69
- (0, registry_1.Step)("I go back", goBack, "When");
70
- (0, registry_1.Step)("I go forward", goForward, "When");
71
- (0, registry_1.Step)("I navigate to {string}", navigateToPath, "When");
67
+ (0, registry_1.Step)("I pw visit {string}", visitUrl, "Given");
68
+ (0, registry_1.Step)("I pw reload the page", reloadPage, "When");
69
+ (0, registry_1.Step)("I pw go back", goBack, "When");
70
+ (0, registry_1.Step)("I pw go forward", goForward, "When");
71
+ (0, registry_1.Step)("I pw navigate to {string}", navigateToPath, "When");
@@ -82,16 +82,16 @@ async function expectElementToCloselyMatch(page, selectorKey, currentFilename, r
82
82
  * @example When I capture screenshot "error-state" for the report
83
83
  */
84
84
  async function captureScreenshotForReport(page, name) {
85
- const screenshot = await page.screenshot();
85
+ await page.screenshot();
86
86
  // This would typically be attached to the test report
87
87
  console.log(`📎 Captured screenshot "${name}" for test report`);
88
88
  }
89
89
  // ==================================================
90
90
  // GLUE STEPS
91
91
  // ==================================================
92
- (0, registry_1.Step)("I take a screenshot of the page {string}", takePageScreenshot, "When");
93
- (0, registry_1.Step)("I take a screenshot of element {string} as {string}", takeElementScreenshot, "When");
94
- (0, registry_1.Step)("I take a viewport screenshot {string}", takeViewportScreenshot, "When");
95
- (0, registry_1.Step)("I expect page {string} to closely match {string}", expectPageToCloselyMatch, "Then");
96
- (0, registry_1.Step)("I expect element {string} screenshot {string} to closely match {string}", expectElementToCloselyMatch, "Then");
97
- (0, registry_1.Step)("I capture screenshot {string} for the report", captureScreenshotForReport, "When");
92
+ (0, registry_1.Step)("I pw take a screenshot of the page {string}", takePageScreenshot, "When");
93
+ (0, registry_1.Step)("I pw take a screenshot of element {string} as {string}", takeElementScreenshot, "When");
94
+ (0, registry_1.Step)("I pw take a viewport screenshot {string}", takeViewportScreenshot, "When");
95
+ (0, registry_1.Step)("I pw expect page {string} to closely match {string}", expectPageToCloselyMatch, "Then");
96
+ (0, registry_1.Step)("I pw expect element {string} screenshot {string} to closely match {string}", expectElementToCloselyMatch, "Then");
97
+ (0, registry_1.Step)("I pw capture screenshot {string} for the report", captureScreenshotForReport, "When");
@@ -78,9 +78,9 @@ async function waitForUrlContain(page, urlPartKey) {
78
78
  // ==================================================
79
79
  // GLUE STEPS
80
80
  // ==================================================
81
- (0, registry_1.Step)("I wait for network idle", waitForNetworkIdle, "When");
82
- (0, registry_1.Step)("I wait for load state {string}", waitForLoadState, "When");
83
- (0, registry_1.Step)("I wait for element to be visible", waitForElementVisible, "When");
84
- (0, registry_1.Step)("I wait for {string} to be visible", waitForElementVisibleBySelector, "When");
85
- (0, registry_1.Step)("I wait for element to be hidden", waitForElementHidden, "When");
86
- (0, registry_1.Step)("I wait for URL to contain {string}", waitForUrlContain, "When");
81
+ (0, registry_1.Step)("I pw wait for network idle", waitForNetworkIdle, "When");
82
+ (0, registry_1.Step)("I pw wait for load state {string}", waitForLoadState, "When");
83
+ (0, registry_1.Step)("I pw wait for element to be visible", waitForElementVisible, "When");
84
+ (0, registry_1.Step)("I pw wait for {string} to be visible", waitForElementVisibleBySelector, "When");
85
+ (0, registry_1.Step)("I pw wait for element to be hidden", waitForElementHidden, "When");
86
+ (0, registry_1.Step)("I pw wait for URL to contain {string}", waitForUrlContain, "When");
@@ -58,6 +58,6 @@ async function expectResponseProperty(page, jsonPathKey, valueKey) {
58
58
  // ==================================================
59
59
  // GLUE STEPS
60
60
  // ==================================================
61
- (0, registry_1.Step)("I expect the response status to be {int}", expectResponseStatus, "Then");
62
- (0, registry_1.Step)("I expect the response body to contain {string}", expectResponseBodyContain, "Then");
63
- (0, registry_1.Step)("I expect the response property {string} to be {string}", expectResponseProperty, "Then");
61
+ (0, registry_1.Step)("I pw expect the response status to be {int}", expectResponseStatus, "Then");
62
+ (0, registry_1.Step)("I pw expect the response body to contain {string}", expectResponseBodyContain, "Then");
63
+ (0, registry_1.Step)("I pw expect the response property {string} to be {string}", expectResponseProperty, "Then");
@@ -102,6 +102,6 @@ async function mockApiStatus(page, urlPatternKey, statusCode) {
102
102
  // ==================================================
103
103
  // GLUE STEPS
104
104
  // ==================================================
105
- (0, registry_1.Step)("I mock the API endpoint {string} with body {string}", mockApiWithInlineJson, "Given");
106
- (0, registry_1.Step)("I mock the API endpoint {string} with response from {string}", mockApiWithFile, "Given");
107
- (0, registry_1.Step)("I mock the API endpoint {string} with status {int}", mockApiStatus, "Given");
105
+ (0, registry_1.Step)("I pw mock the API endpoint {string} with body {string}", mockApiWithInlineJson, "Given");
106
+ (0, registry_1.Step)("I pw mock the API endpoint {string} with response from {string}", mockApiWithFile, "Given");
107
+ (0, registry_1.Step)("I pw mock the API endpoint {string} with status {int}", mockApiStatus, "Given");
@@ -165,9 +165,9 @@ async function browserFetchRequest(page, method, url, table) {
165
165
  // ==================================================
166
166
  // GLUE STEPS
167
167
  // ==================================================
168
- (0, registry_1.Step)("I intercept URL {string} and stub body:", interceptStubJson, "When"); // Handles DocString
169
- (0, registry_1.Step)("I intercept URL {string} and stub body {string}", interceptStubRaw, "When");
170
- (0, registry_1.Step)("I intercept URL {string}", interceptSpy, "When");
171
- (0, registry_1.Step)("I make request to {string}", apiGetRequest, "When");
172
- (0, registry_1.Step)("I make a POST request to {string} with JSON body:", apiPostRequest, "When"); // Handles DocString
173
- (0, registry_1.Step)("I make a {word} request to {string}", browserFetchRequest, "When");
168
+ (0, registry_1.Step)("I pw intercept URL {string} and stub body:", interceptStubJson, "When"); // Handles DocString
169
+ (0, registry_1.Step)("I pw intercept URL {string} and stub body {string}", interceptStubRaw, "When");
170
+ (0, registry_1.Step)("I pw intercept URL {string}", interceptSpy, "When");
171
+ (0, registry_1.Step)("I pw make request to {string}", apiGetRequest, "When");
172
+ (0, registry_1.Step)("I pw make a POST request to {string} with JSON body:", apiPostRequest, "When"); // Handles DocString
173
+ (0, registry_1.Step)("I pw make a {word} request to {string}", browserFetchRequest, "When");
@@ -118,7 +118,7 @@ async function makePostRequestWithFile(page, urlKey, filePathKey) {
118
118
  // ==================================================
119
119
  // GLUE STEPS
120
120
  // ==================================================
121
- (0, registry_1.Step)("I make a GET request to {string}", makeGetRequest, "When");
122
- (0, registry_1.Step)("I make a DELETE request to {string}", makeDeleteRequest, "When");
123
- (0, registry_1.Step)("I make a POST request to {string} with data", makePostRequestWithTable, "When");
124
- (0, registry_1.Step)("I make a POST request to {string} with payload from {string}", makePostRequestWithFile, "When");
121
+ (0, registry_1.Step)("I pw make a GET request to {string}", makeGetRequest, "When");
122
+ (0, registry_1.Step)("I pw make a DELETE request to {string}", makeDeleteRequest, "When");
123
+ (0, registry_1.Step)("I pw make a POST request to {string} with data", makePostRequestWithTable, "When");
124
+ (0, registry_1.Step)("I pw make a POST request to {string} with payload from {string}", makePostRequestWithFile, "When");
@@ -154,13 +154,13 @@ async function expectLocation(page, locationKey) {
154
154
  // ==================================================
155
155
  // GLUE STEPS
156
156
  // ==================================================
157
- (0, registry_1.Step)("I see document title {string}", expectDocumentTitle, "Then");
158
- (0, registry_1.Step)("I see document title contains {string}", expectDocumentTitleContains, "Then");
159
- (0, registry_1.Step)("I see URL {string}", expectUrl, "Then");
160
- (0, registry_1.Step)("I see URL contains {string}", expectUrlContains, "Then");
161
- (0, registry_1.Step)("I see pathname {string}", expectPathname, "Then");
162
- (0, registry_1.Step)("I see pathname contains {string}", expectPathnameContains, "Then");
163
- (0, registry_1.Step)("I see hash {string}", expectHash, "Then");
164
- (0, registry_1.Step)("I see hash contains {string}", expectHashContains, "Then");
165
- (0, registry_1.Step)("I see search contains {string}", expectSearchContains, "Then");
166
- (0, registry_1.Step)("I see location {string}", expectLocation, "Then");
157
+ (0, registry_1.Step)("I pw see document title {string}", expectDocumentTitle, "Then");
158
+ (0, registry_1.Step)("I pw see document title contains {string}", expectDocumentTitleContains, "Then");
159
+ (0, registry_1.Step)("I pw see URL {string}", expectUrl, "Then");
160
+ (0, registry_1.Step)("I pw see URL contains {string}", expectUrlContains, "Then");
161
+ (0, registry_1.Step)("I pw see pathname {string}", expectPathname, "Then");
162
+ (0, registry_1.Step)("I pw see pathname contains {string}", expectPathnameContains, "Then");
163
+ (0, registry_1.Step)("I pw see hash {string}", expectHash, "Then");
164
+ (0, registry_1.Step)("I pw see hash contains {string}", expectHashContains, "Then");
165
+ (0, registry_1.Step)("I pw see search contains {string}", expectSearchContains, "Then");
166
+ (0, registry_1.Step)("I pw see location {string}", expectLocation, "Then");
@@ -410,32 +410,32 @@ async function expectElementToBeHidden(page, selectorKey) {
410
410
  // ==================================================
411
411
  // GLUE STEPS
412
412
  // ==================================================
413
- (0, registry_1.Step)("I count elements {string}", countElements, "Then");
414
- (0, registry_1.Step)("I do not see button element {string}", expectButtonNotVisible, "Then");
415
- (0, registry_1.Step)("I do not see heading element {string}", expectHeadingNotVisible, "Then");
416
- (0, registry_1.Step)("I do not see label element {string}", expectLabelNotVisible, "Then");
417
- (0, registry_1.Step)("I do not see link element {string}", expectLinkNotVisible, "Then");
418
- (0, registry_1.Step)("I do not see testid element {string}", expectTestIdNotVisible, "Then");
419
- (0, registry_1.Step)("I do not see role element {string}", expectRoleNotVisible, "Then");
420
- (0, registry_1.Step)("I do not see option element {string}", expectOptionNotVisible, "Then");
421
- (0, registry_1.Step)("I do not see element with attribute {string} having value {string}", expectElementWithAttributeNotVisible, "Then");
422
- (0, registry_1.Step)("I see element attribute {string} contains {string}", expectElementAttributeContains, "Then");
423
- (0, registry_1.Step)("I see element attribute {string} equals {string}", expectElementAttributeEquals, "Then");
424
- (0, registry_1.Step)("I see element has attribute {string}", expectElementHasAttribute, "Then");
425
- (0, registry_1.Step)("I see button element {string}", expectButtonVisible, "Then");
426
- (0, registry_1.Step)("I see heading element {string}", expectHeadingVisible, "Then");
427
- (0, registry_1.Step)("I see label element {string}", expectLabelVisible, "Then");
428
- (0, registry_1.Step)("I see link element {string}", expectLinkVisible, "Then");
429
- (0, registry_1.Step)("I see testid element {string}", expectTestIdVisible, "Then");
430
- (0, registry_1.Step)("I see role element {string}", expectRoleVisible, "Then");
431
- (0, registry_1.Step)("I see option element {string}", expectOptionVisible, "Then");
432
- (0, registry_1.Step)("I expect {string} to have count {int}", expectElementToHaveCount, "Then");
433
- (0, registry_1.Step)("I expect {string} to be hidden", expectElementToBeHidden, "Then");
413
+ (0, registry_1.Step)("I pw count elements {string}", countElements, "Then");
414
+ (0, registry_1.Step)("I pw do not see button element {string}", expectButtonNotVisible, "Then");
415
+ (0, registry_1.Step)("I pw do not see heading element {string}", expectHeadingNotVisible, "Then");
416
+ (0, registry_1.Step)("I pw do not see label element {string}", expectLabelNotVisible, "Then");
417
+ (0, registry_1.Step)("I pw do not see link element {string}", expectLinkNotVisible, "Then");
418
+ (0, registry_1.Step)("I pw do not see testid element {string}", expectTestIdNotVisible, "Then");
419
+ (0, registry_1.Step)("I pw do not see role element {string}", expectRoleNotVisible, "Then");
420
+ (0, registry_1.Step)("I pw do not see option element {string}", expectOptionNotVisible, "Then");
421
+ (0, registry_1.Step)("I pw do not see element with attribute {string} having value {string}", expectElementWithAttributeNotVisible, "Then");
422
+ (0, registry_1.Step)("I pw see element attribute {string} contains {string}", expectElementAttributeContains, "Then");
423
+ (0, registry_1.Step)("I pw see element attribute {string} equals {string}", expectElementAttributeEquals, "Then");
424
+ (0, registry_1.Step)("I pw see element has attribute {string}", expectElementHasAttribute, "Then");
425
+ (0, registry_1.Step)("I pw see button element {string}", expectButtonVisible, "Then");
426
+ (0, registry_1.Step)("I pw see heading element {string}", expectHeadingVisible, "Then");
427
+ (0, registry_1.Step)("I pw see label element {string}", expectLabelVisible, "Then");
428
+ (0, registry_1.Step)("I pw see link element {string}", expectLinkVisible, "Then");
429
+ (0, registry_1.Step)("I pw see testid element {string}", expectTestIdVisible, "Then");
430
+ (0, registry_1.Step)("I pw see role element {string}", expectRoleVisible, "Then");
431
+ (0, registry_1.Step)("I pw see option element {string}", expectOptionVisible, "Then");
432
+ (0, registry_1.Step)("I pw expect {string} to have count {int}", expectElementToHaveCount, "Then");
433
+ (0, registry_1.Step)("I pw expect {string} to be hidden", expectElementToBeHidden, "Then");
434
434
  // Combined element selection and assertion steps
435
- (0, registry_1.Step)("I get element by selector {string} to have class containing {string}", expectElementToHaveClassContaining, "When");
436
- (0, registry_1.Step)("I get element by selector {string} to have text {string}", expectElementToHaveText, "Then");
437
- (0, registry_1.Step)("I get element by selector {string} to contain text {string}", expectElementToContainText, "Then");
438
- (0, registry_1.Step)("I get element by selector {string} to have value {string}", expectElementToHaveValue, "Then");
439
- (0, registry_1.Step)("I get element by selector {string} to have attribute {string} with value {string}", expectElementAttributeValue, "Then");
440
- (0, registry_1.Step)("I get element by selector {string} to be visible", getElementBySelectorToBeVisible, "When");
441
- (0, registry_1.Step)("I get element by selector {string} to not contain text {string}", expectElementToNotContainText, "Then");
435
+ (0, registry_1.Step)("I pw get element by selector {string} to have class containing {string}", expectElementToHaveClassContaining, "When");
436
+ (0, registry_1.Step)("I pw get element by selector {string} to have text {string}", expectElementToHaveText, "Then");
437
+ (0, registry_1.Step)("I pw get element by selector {string} to contain text {string}", expectElementToContainText, "Then");
438
+ (0, registry_1.Step)("I pw get element by selector {string} to have value {string}", expectElementToHaveValue, "Then");
439
+ (0, registry_1.Step)("I pw get element by selector {string} to have attribute {string} with value {string}", expectElementAttributeValue, "Then");
440
+ (0, registry_1.Step)("I pw get element by selector {string} to be visible", getElementBySelectorToBeVisible, "When");
441
+ (0, registry_1.Step)("I pw get element by selector {string} to not contain text {string}", expectElementToNotContainText, "Then");
@@ -29,4 +29,4 @@ async function expectVisible(page, selectorKey, timeout = 2000) {
29
29
  // ==================================================
30
30
  // GLUE STEPS
31
31
  // ==================================================
32
- (0, registry_1.Step)("I expect the element {string} to be visible", expectVisible, "Then");
32
+ (0, registry_1.Step)("I pw expect the element {string} to be visible", expectVisible, "Then");
@@ -117,10 +117,10 @@ async function expectValue(page, selectorKey, valueKey) {
117
117
  // ==================================================
118
118
  // GLUE STEPS
119
119
  // ==================================================
120
- (0, registry_1.Step)("I see input value {string} equals {string}", expectInputValue, "Then");
121
- (0, registry_1.Step)("I see input value {string} contains {string}", expectInputValueContains, "Then");
122
- (0, registry_1.Step)("I see textarea value {string} equals {string}", expectTextareaValue, "Then");
123
- (0, registry_1.Step)("I see textarea value {string} contains {string}", expectTextareaValueContains, "Then");
124
- (0, registry_1.Step)("I see text {string} equals {string}", expectText, "Then");
125
- (0, registry_1.Step)("I see text {string} contains {string}", expectTextContains, "Then");
126
- (0, registry_1.Step)("I see value {string} equals {string}", expectValue, "Then");
120
+ (0, registry_1.Step)("I pw see input value {string} equals {string}", expectInputValue, "Then");
121
+ (0, registry_1.Step)("I pw see input value {string} contains {string}", expectInputValueContains, "Then");
122
+ (0, registry_1.Step)("I pw see textarea value {string} equals {string}", expectTextareaValue, "Then");
123
+ (0, registry_1.Step)("I pw see textarea value {string} contains {string}", expectTextareaValueContains, "Then");
124
+ (0, registry_1.Step)("I pw see text {string} equals {string}", expectText, "Then");
125
+ (0, registry_1.Step)("I pw see text {string} contains {string}", expectTextContains, "Then");
126
+ (0, registry_1.Step)("I pw see value {string} equals {string}", expectValue, "Then");
@@ -58,7 +58,7 @@ async function expectTitleToBe(page, titleKey) {
58
58
  // ==================================================
59
59
  // GLUE STEPS
60
60
  // ==================================================
61
- (0, registry_1.Step)("I expect the url to contain {string}", expectUrlToContain, "Then");
62
- (0, registry_1.Step)("I expect the url to be {string}", expectUrlToBe, "Then");
63
- (0, registry_1.Step)("I expect the title to contain {string}", expectTitleToContain, "Then");
64
- (0, registry_1.Step)("I expect the title to be {string}", expectTitleToBe, "Then");
61
+ (0, registry_1.Step)("I pw expect the url to contain {string}", expectUrlToContain, "Then");
62
+ (0, registry_1.Step)("I pw expect the url to be {string}", expectUrlToBe, "Then");
63
+ (0, registry_1.Step)("I pw expect the title to contain {string}", expectTitleToContain, "Then");
64
+ (0, registry_1.Step)("I pw expect the title to be {string}", expectTitleToBe, "Then");
@@ -207,14 +207,14 @@ async function expectSessionStorageItemDoesNotExist(page, keyKey) {
207
207
  // ==================================================
208
208
  // GLUE STEPS
209
209
  // ==================================================
210
- (0, registry_1.Step)("I see cookie {string} has value {string}", expectCookieHasValue, "Then");
211
- (0, registry_1.Step)("I see cookie {string} contains value {string}", expectCookieContainsValue, "Then");
212
- (0, registry_1.Step)("I do not see cookie {string}", expectCookieDoesNotExist, "Then");
213
- (0, registry_1.Step)("I see local storage item {string} equals {string}", expectLocalStorageItemEquals, "Then");
214
- (0, registry_1.Step)("I see local storage item {string} contains {string}", expectLocalStorageItemContains, "Then");
215
- (0, registry_1.Step)("I see local storage item {string}", expectLocalStorageItem, "Then");
216
- (0, registry_1.Step)("I do not see local storage item {string}", expectLocalStorageItemDoesNotExist, "Then");
217
- (0, registry_1.Step)("I see session storage item {string} equals {string}", expectSessionStorageItemEquals, "Then");
218
- (0, registry_1.Step)("I see session storage item {string} contains {string}", expectSessionStorageItemContains, "Then");
219
- (0, registry_1.Step)("I see session storage item {string}", expectSessionStorageItem, "Then");
220
- (0, registry_1.Step)("I do not see session storage item {string}", expectSessionStorageItemDoesNotExist, "Then");
210
+ (0, registry_1.Step)("I pw see cookie {string} has value {string}", expectCookieHasValue, "Then");
211
+ (0, registry_1.Step)("I pw see cookie {string} contains value {string}", expectCookieContainsValue, "Then");
212
+ (0, registry_1.Step)("I pw do not see cookie {string}", expectCookieDoesNotExist, "Then");
213
+ (0, registry_1.Step)("I pw see local storage item {string} equals {string}", expectLocalStorageItemEquals, "Then");
214
+ (0, registry_1.Step)("I pw see local storage item {string} contains {string}", expectLocalStorageItemContains, "Then");
215
+ (0, registry_1.Step)("I pw see local storage item {string}", expectLocalStorageItem, "Then");
216
+ (0, registry_1.Step)("I pw do not see local storage item {string}", expectLocalStorageItemDoesNotExist, "Then");
217
+ (0, registry_1.Step)("I pw see session storage item {string} equals {string}", expectSessionStorageItemEquals, "Then");
218
+ (0, registry_1.Step)("I pw see session storage item {string} contains {string}", expectSessionStorageItemContains, "Then");
219
+ (0, registry_1.Step)("I pw see session storage item {string}", expectSessionStorageItem, "Then");
220
+ (0, registry_1.Step)("I pw do not see session storage item {string}", expectSessionStorageItemDoesNotExist, "Then");
@@ -233,21 +233,21 @@ async function getElementBySelectorToBeHidden(page, selectorKey) {
233
233
  // ==================================================
234
234
  // GLUE STEPS
235
235
  // ==================================================
236
- (0, registry_1.Step)("I see button text {string}", iSeeButtonText, "Then");
237
- (0, registry_1.Step)("I see heading text {string}", iSeeHeadingText, "Then");
238
- (0, registry_1.Step)("I see link text {string}", iSeeLinkText, "Then");
239
- (0, registry_1.Step)("I see label text {string}", iSeeLabelText, "Then");
240
- (0, registry_1.Step)("I do not see button text {string}", iDoNotSeeButtonText, "Then");
241
- (0, registry_1.Step)("I do not see heading text {string}", iDoNotSeeHeadingText, "Then");
242
- (0, registry_1.Step)("I do not see link text {string}", iDoNotSeeLinkText, "Then");
243
- (0, registry_1.Step)("I do not see label text {string}", iDoNotSeeLabelText, "Then");
244
- (0, registry_1.Step)("I see exact element text {string}", expectElementToHaveExactText, "Then");
245
- (0, registry_1.Step)("I see exact value {string}", expectElementToHaveExactValue, "Then");
246
- (0, registry_1.Step)("I do not see exact value {string}", expectElementToNotHaveExactValue, "Then");
247
- (0, registry_1.Step)("I see exact attribute {string} with value {string}", expectElementToHaveExactAttribute, "Then");
248
- (0, registry_1.Step)("I do not see exact attribute {string} with value {string}", expectElementToNotHaveExactAttribute, "Then");
236
+ (0, registry_1.Step)("I pw see button text {string}", iSeeButtonText, "Then");
237
+ (0, registry_1.Step)("I pw see heading text {string}", iSeeHeadingText, "Then");
238
+ (0, registry_1.Step)("I pw see link text {string}", iSeeLinkText, "Then");
239
+ (0, registry_1.Step)("I pw see label text {string}", iSeeLabelText, "Then");
240
+ (0, registry_1.Step)("I pw do not see button text {string}", iDoNotSeeButtonText, "Then");
241
+ (0, registry_1.Step)("I pw do not see heading text {string}", iDoNotSeeHeadingText, "Then");
242
+ (0, registry_1.Step)("I pw do not see link text {string}", iDoNotSeeLinkText, "Then");
243
+ (0, registry_1.Step)("I pw do not see label text {string}", iDoNotSeeLabelText, "Then");
244
+ (0, registry_1.Step)("I pw see exact element text {string}", expectElementToHaveExactText, "Then");
245
+ (0, registry_1.Step)("I pw see exact value {string}", expectElementToHaveExactValue, "Then");
246
+ (0, registry_1.Step)("I pw do not see exact value {string}", expectElementToNotHaveExactValue, "Then");
247
+ (0, registry_1.Step)("I pw see exact attribute {string} with value {string}", expectElementToHaveExactAttribute, "Then");
248
+ (0, registry_1.Step)("I pw do not see exact attribute {string} with value {string}", expectElementToNotHaveExactAttribute, "Then");
249
249
  // Global Text Assertions (No selector needed)
250
- (0, registry_1.Step)("I see text {string}", expectGlobalTextVisible, "Then");
251
- (0, registry_1.Step)("I see exact text {string}", expectGlobalTextVisible, "Then"); // Maps to same logic
252
- (0, registry_1.Step)("I do not see text {string}", expectGlobalTextNotVisible, "Then");
253
- (0, registry_1.Step)("I do not see exact text {string}", expectGlobalTextNotVisible, "Then");
250
+ (0, registry_1.Step)("I pw see text {string}", expectGlobalTextVisible, "Then");
251
+ (0, registry_1.Step)("I pw see exact text {string}", expectGlobalTextVisible, "Then"); // Maps to same logic
252
+ (0, registry_1.Step)("I pw do not see text {string}", expectGlobalTextNotVisible, "Then");
253
+ (0, registry_1.Step)("I pw do not see exact text {string}", expectGlobalTextNotVisible, "Then");