playwright-cucumber-ts-steps 1.2.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/dist/backend/actions/click.d.ts +107 -44
  2. package/dist/backend/actions/click.d.ts.map +1 -1
  3. package/dist/backend/actions/click.js +197 -60
  4. package/dist/backend/actions/find.d.ts.map +1 -1
  5. package/dist/backend/actions/find.js +1 -0
  6. package/dist/backend/actions/form.d.ts +13 -18
  7. package/dist/backend/actions/form.d.ts.map +1 -1
  8. package/dist/backend/actions/form.js +36 -24
  9. package/dist/backend/actions/formTable.d.ts +10 -4
  10. package/dist/backend/actions/formTable.d.ts.map +1 -1
  11. package/dist/backend/actions/formTable.js +34 -14
  12. package/dist/backend/actions/frames.d.ts +8 -12
  13. package/dist/backend/actions/frames.d.ts.map +1 -1
  14. package/dist/backend/actions/frames.js +26 -18
  15. package/dist/backend/actions/index.d.ts +14 -0
  16. package/dist/backend/actions/index.d.ts.map +1 -1
  17. package/dist/backend/actions/index.js +30 -0
  18. package/dist/backend/actions/inputs.d.ts +15 -43
  19. package/dist/backend/actions/inputs.d.ts.map +1 -1
  20. package/dist/backend/actions/inputs.js +39 -59
  21. package/dist/backend/actions/interactions.d.ts +28 -20
  22. package/dist/backend/actions/interactions.d.ts.map +1 -1
  23. package/dist/backend/actions/interactions.js +95 -27
  24. package/dist/backend/actions/keyboard.d.ts +6 -20
  25. package/dist/backend/actions/keyboard.d.ts.map +1 -1
  26. package/dist/backend/actions/keyboard.js +13 -26
  27. package/dist/backend/actions/misc.d.ts +20 -38
  28. package/dist/backend/actions/misc.d.ts.map +1 -1
  29. package/dist/backend/actions/misc.js +81 -53
  30. package/dist/backend/actions/mobile.d.ts +9 -24
  31. package/dist/backend/actions/mobile.d.ts.map +1 -1
  32. package/dist/backend/actions/mobile.js +19 -31
  33. package/dist/backend/actions/mouse.d.ts +17 -37
  34. package/dist/backend/actions/mouse.d.ts.map +1 -1
  35. package/dist/backend/actions/mouse.js +37 -47
  36. package/dist/backend/actions/navigation.d.ts.map +1 -1
  37. package/dist/backend/actions/navigation.js +6 -5
  38. package/dist/backend/actions/visual.d.ts +47 -0
  39. package/dist/backend/actions/visual.d.ts.map +1 -0
  40. package/dist/backend/actions/visual.js +97 -0
  41. package/dist/backend/actions/waits.d.ts +13 -14
  42. package/dist/backend/actions/waits.d.ts.map +1 -1
  43. package/dist/backend/actions/waits.js +31 -21
  44. package/dist/backend/api/assertions.d.ts +7 -13
  45. package/dist/backend/api/assertions.d.ts.map +1 -1
  46. package/dist/backend/api/assertions.js +29 -18
  47. package/dist/backend/api/index.d.ts +4 -0
  48. package/dist/backend/api/index.d.ts.map +1 -1
  49. package/dist/backend/api/index.js +20 -0
  50. package/dist/backend/api/mock.d.ts +9 -15
  51. package/dist/backend/api/mock.d.ts.map +1 -1
  52. package/dist/backend/api/mock.js +21 -18
  53. package/dist/backend/api/network.d.ts +6 -12
  54. package/dist/backend/api/network.d.ts.map +1 -1
  55. package/dist/backend/api/network.js +13 -18
  56. package/dist/backend/api/requests.d.ts +11 -18
  57. package/dist/backend/api/requests.d.ts.map +1 -1
  58. package/dist/backend/api/requests.js +28 -23
  59. package/dist/backend/api/state.d.ts.map +1 -1
  60. package/dist/backend/assertions/document.d.ts +61 -0
  61. package/dist/backend/assertions/document.d.ts.map +1 -0
  62. package/dist/backend/assertions/document.js +166 -0
  63. package/dist/backend/assertions/elements.d.ts +163 -0
  64. package/dist/backend/assertions/elements.d.ts.map +1 -0
  65. package/dist/backend/assertions/elements.js +441 -0
  66. package/dist/backend/assertions/expectVisible.d.ts +6 -2
  67. package/dist/backend/assertions/expectVisible.d.ts.map +1 -1
  68. package/dist/backend/assertions/expectVisible.js +28 -4
  69. package/dist/backend/assertions/forms.d.ts +43 -0
  70. package/dist/backend/assertions/forms.d.ts.map +1 -0
  71. package/dist/backend/assertions/forms.js +126 -0
  72. package/dist/backend/assertions/index.d.ts +13 -0
  73. package/dist/backend/assertions/index.d.ts.map +1 -1
  74. package/dist/backend/assertions/index.js +29 -0
  75. package/dist/backend/assertions/pageState.d.ts +12 -17
  76. package/dist/backend/assertions/pageState.d.ts.map +1 -1
  77. package/dist/backend/assertions/pageState.js +26 -21
  78. package/dist/backend/assertions/storage.d.ts +67 -0
  79. package/dist/backend/assertions/storage.d.ts.map +1 -0
  80. package/dist/backend/assertions/storage.js +220 -0
  81. package/dist/backend/assertions/text.d.ts +114 -34
  82. package/dist/backend/assertions/text.d.ts.map +1 -1
  83. package/dist/backend/assertions/text.js +227 -39
  84. package/dist/backend/assertions/visibility.d.ts +42 -32
  85. package/dist/backend/assertions/visibility.d.ts.map +1 -1
  86. package/dist/backend/assertions/visibility.js +103 -51
  87. package/dist/backend/auth/index.d.ts +6 -6
  88. package/dist/backend/auth/index.d.ts.map +1 -1
  89. package/dist/backend/auth/index.js +12 -6
  90. package/dist/backend/db/index.d.ts +2 -1
  91. package/dist/backend/db/index.d.ts.map +1 -1
  92. package/dist/backend/db/index.js +17 -1
  93. package/dist/backend/db/state.d.ts.map +1 -1
  94. package/dist/backend/db/state.js +1 -0
  95. package/dist/backend/db/steps.d.ts +20 -34
  96. package/dist/backend/db/steps.d.ts.map +1 -1
  97. package/dist/backend/db/steps.js +44 -44
  98. package/dist/backend/elements/alerts.d.ts +5 -11
  99. package/dist/backend/elements/alerts.d.ts.map +1 -1
  100. package/dist/backend/elements/alerts.js +12 -14
  101. package/dist/backend/elements/find.d.ts +140 -0
  102. package/dist/backend/elements/find.d.ts.map +1 -0
  103. package/dist/backend/elements/find.js +346 -0
  104. package/dist/backend/elements/forms.d.ts +12 -19
  105. package/dist/backend/elements/forms.d.ts.map +1 -1
  106. package/dist/backend/elements/forms.js +31 -24
  107. package/dist/backend/elements/frames.d.ts +9 -17
  108. package/dist/backend/elements/frames.d.ts.map +1 -1
  109. package/dist/backend/elements/frames.js +27 -20
  110. package/dist/backend/elements/index.d.ts +5 -0
  111. package/dist/backend/elements/index.d.ts.map +1 -1
  112. package/dist/backend/elements/index.js +21 -0
  113. package/dist/backend/index.d.ts +3 -2
  114. package/dist/backend/index.d.ts.map +1 -1
  115. package/dist/backend/index.js +4 -2
  116. package/dist/backend/utils/fixtures.d.ts +16 -0
  117. package/dist/backend/utils/fixtures.d.ts.map +1 -0
  118. package/dist/backend/utils/fixtures.js +51 -0
  119. package/dist/backend/utils/resolver.d.ts +6 -0
  120. package/dist/backend/utils/resolver.d.ts.map +1 -0
  121. package/dist/backend/utils/resolver.js +19 -0
  122. package/dist/backend/utils/state.d.ts +18 -1
  123. package/dist/backend/utils/state.d.ts.map +1 -1
  124. package/dist/backend/utils/state.js +62 -0
  125. package/dist/component/index.d.ts +3 -0
  126. package/dist/component/index.d.ts.map +1 -0
  127. package/dist/component/index.js +6 -0
  128. package/dist/component/runner.d.ts +18 -0
  129. package/dist/component/runner.d.ts.map +1 -0
  130. package/dist/component/runner.js +58 -0
  131. package/dist/core/registry.d.ts +2 -1
  132. package/dist/core/registry.d.ts.map +1 -1
  133. package/dist/core/registry.js +2 -1
  134. package/dist/core/runner.d.ts +2 -2
  135. package/dist/core/runner.d.ts.map +1 -1
  136. package/dist/core/runner.js +213 -123
  137. package/dist/index.d.ts +5 -0
  138. package/dist/index.d.ts.map +1 -1
  139. package/dist/index.js +4 -3
  140. package/dist/metadata.json +682 -616
  141. package/dist/reporting/index.d.ts +2 -3
  142. package/dist/reporting/index.d.ts.map +1 -1
  143. package/dist/reporting/index.js +1 -1
  144. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../../../src/backend/actions/find.ts"],"names":[],"mappings":"AAeA;;;;;;GAMG;AACH,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAKtF;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,MAA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AAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIxE;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAI5E;AAED;;;;;GAKG;AACH,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAI1F;AAED;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAc9E;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAUjF;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAO9E"}
@@ -24,6 +24,7 @@ exports.findInputByPlaceholder = findInputByPlaceholder;
24
24
  exports.findInputByValue = findInputByValue;
25
25
  exports.findTextareaByLabel = findTextareaByLabel;
26
26
  exports.storeElementText = storeElementText;
27
+ //src/backend/actions/find.ts
27
28
  const test_1 = require("@playwright/test");
28
29
  const registry_1 = require("../../core/registry");
29
30
  const state_1 = require("../utils/state");
@@ -3,28 +3,23 @@
3
3
  * Iterates through a Data Table and performs actions based on the Target and Value columns.
4
4
  * @example
5
5
  * When I fill the following "Login Flow" form data:
6
+ * ```gherkin
6
7
  * | Target | Value |
7
- * | #username | myuser |
8
- * | #password | @secretPassword |
9
- * | #login-btn | click |
8
+ * | login.usernameField | myuser |
9
+ * | login.passwordField | \{@link @secretPassword\ |
10
+ * | login.submitButton | click |
10
11
  * | wait | wait:500 |
11
12
  * | .error-msg | assert:visible |
12
13
  * | request:GET:/api/status | body: {} |
13
- * @remarks
14
- * **Columns:**
15
- * - Target: The CSS selector, or a special keyword (request:, set:localStorage:, wait).
16
- * - Value: The value to input, the action (click, check), or assertion pattern.
17
- * **Supported UI Actions:**
18
- * - Fill: Default behavior. Types Value into Target.
19
- * - Click: Set Value to "click".
20
- * - Check: Set Value to "check".
21
- * - Select: Set Value to "select".
22
- * - Assert Visible: Set Value to "assert:visible".
23
- * - Assert Text: Set Value to "assert:text:Expected Text".
24
- * **Supported Special Actions:**
25
- * - API Request: Target = "request:METHOD:URL", Value = "payload_filename.json".
26
- * - Local Storage: Target = "set:localStorage:key", Value = "value".
27
- * - Wait: Target = "wait", Value = "wait:1000" (ms).
14
+ * ```
15
+ * @param formName - A descriptive name for the form being filled (used for logging only).
16
+ * @param table - The Data Table provided in the step definition.
28
17
  */
29
18
  export declare function fillFormData(page: any, formName: string, table: any): Promise<void>;
19
+ /**
20
+ * Selects an option from a React select component.
21
+ * This handles React's custom select implementations that may not use standard <select> elements.
22
+ * @example When I select react option "Option 3" from "#react-select-id"
23
+ */
24
+ export declare function selectReactOption(page: any, optionText: string, selectorKey: string): Promise<void>;
30
25
  //# sourceMappingURL=form.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../src/backend/actions/form.ts"],"names":[],"mappings":"AAuFA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CA6HzF"}
1
+ {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../src/backend/actions/form.ts"],"names":[],"mappings":"AA4FA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAmIzF;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAWzG"}
@@ -34,11 +34,14 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.fillFormData = fillFormData;
37
+ exports.selectReactOption = selectReactOption;
38
+ //src/backend/actions/form.ts
37
39
  const fs = __importStar(require("fs"));
38
40
  const path = __importStar(require("path"));
39
41
  const test_1 = require("@playwright/test");
40
42
  const registry_1 = require("../../core/registry");
41
43
  const state_1 = require("../utils/state");
44
+ const fixtures_1 = require("../utils/fixtures");
42
45
  // ==================================================
43
46
  // HELPER FUNCTIONS (Internal)
44
47
  // ==================================================
@@ -78,7 +81,7 @@ function resolveValue(page, rawValue) {
78
81
  if (!rawValue)
79
82
  return "";
80
83
  const trimmed = rawValue.trim();
81
- // Handle Alias (e.g. @adminPassword)
84
+ // Handle Alias (e.g., @adminPassword)
82
85
  if (trimmed.startsWith("@")) {
83
86
  const alias = trimmed.slice(1);
84
87
  const stored = (0, state_1.getVariable)(page, alias);
@@ -98,28 +101,17 @@ function resolveValue(page, rawValue) {
98
101
  * Iterates through a Data Table and performs actions based on the Target and Value columns.
99
102
  * @example
100
103
  * When I fill the following "Login Flow" form data:
104
+ * ```gherkin
101
105
  * | Target | Value |
102
- * | #username | myuser |
103
- * | #password | @secretPassword |
104
- * | #login-btn | click |
106
+ * | login.usernameField | myuser |
107
+ * | login.passwordField | \{@link @secretPassword\ |
108
+ * | login.submitButton | click |
105
109
  * | wait | wait:500 |
106
110
  * | .error-msg | assert:visible |
107
111
  * | request:GET:/api/status | body: {} |
108
- * @remarks
109
- * **Columns:**
110
- * - Target: The CSS selector, or a special keyword (request:, set:localStorage:, wait).
111
- * - Value: The value to input, the action (click, check), or assertion pattern.
112
- * **Supported UI Actions:**
113
- * - Fill: Default behavior. Types Value into Target.
114
- * - Click: Set Value to "click".
115
- * - Check: Set Value to "check".
116
- * - Select: Set Value to "select".
117
- * - Assert Visible: Set Value to "assert:visible".
118
- * - Assert Text: Set Value to "assert:text:Expected Text".
119
- * **Supported Special Actions:**
120
- * - API Request: Target = "request:METHOD:URL", Value = "payload_filename.json".
121
- * - Local Storage: Target = "set:localStorage:key", Value = "value".
122
- * - Wait: Target = "wait", Value = "wait:1000" (ms).
112
+ * ```
113
+ * @param formName - A descriptive name for the form being filled (used for logging only).
114
+ * @param table - The Data Table provided in the step definition.
123
115
  */
124
116
  async function fillFormData(page, formName, table) {
125
117
  console.log(`📝 Processing Form: "${formName}"`);
@@ -135,9 +127,14 @@ async function fillFormData(page, formName, table) {
135
127
  console.error("❌ Invalid Row Detected (Missing Target):", JSON.stringify(row));
136
128
  continue;
137
129
  }
138
- const target = row.Target; // Already trimmed in parser
130
+ let target = row.Target; // Already trimmed in parser
139
131
  const rawValue = row.Value || "";
140
132
  const resolvedValue = resolveValue(page, rawValue);
133
+ // Resolve target from fixtures if applicable
134
+ const selectors = (0, fixtures_1.loadFixture)("selectors.json");
135
+ if (!(target.startsWith("request:") || target.startsWith("set:localStorage:") || target === "wait")) {
136
+ target = (0, fixtures_1.getFixtureValue)(selectors, target);
137
+ }
141
138
  // ============================================
142
139
  // 1. SPECIAL ACTIONS
143
140
  // ============================================
@@ -206,17 +203,17 @@ async function fillFormData(page, formName, table) {
206
203
  continue;
207
204
  }
208
205
  // ✅ Interactions
209
- if (rawValue === "click") {
206
+ if (resolvedValue === "click") {
210
207
  await locator.click();
211
208
  console.log(`👆 Clicked: ${target}`);
212
209
  continue;
213
210
  }
214
- if (rawValue === "check") {
211
+ if (resolvedValue === "check") {
215
212
  await locator.check();
216
213
  console.log(`☑️ Checked: ${target}`);
217
214
  continue;
218
215
  }
219
- if (rawValue === "select") {
216
+ if (resolvedValue === "select") {
220
217
  await locator.selectOption({ index: 0 });
221
218
  console.log(`🔽 Selected index 0: ${target}`);
222
219
  continue;
@@ -226,7 +223,22 @@ async function fillFormData(page, formName, table) {
226
223
  console.log(`✍️ Filled ${target} with "${resolvedValue}"`);
227
224
  }
228
225
  }
226
+ /**
227
+ * Selects an option from a React select component.
228
+ * This handles React's custom select implementations that may not use standard <select> elements.
229
+ * @example When I select react option "Option 3" from "#react-select-id"
230
+ */
231
+ async function selectReactOption(page, optionText, selectorKey) {
232
+ const selectors = (0, fixtures_1.loadFixture)("selectors.json");
233
+ const selector = (0, fixtures_1.getFixtureValue)(selectors, selectorKey);
234
+ // Click the select dropdown to reveal options
235
+ await page.locator(selector).click();
236
+ // Wait for options to appear and then click the desired option
237
+ await page.locator(`text=${optionText}`).click();
238
+ console.log(`✅ Selected react option "${optionText}" from "${selector}"`);
239
+ }
229
240
  // ==================================================
230
241
  // GLUE STEPS
231
242
  // ==================================================
232
- (0, registry_1.Step)("I fill the following {string} form data", fillFormData);
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");
@@ -2,10 +2,16 @@
2
2
  * Iterates through a provided Data Table to fill inputs, click elements, or perform assertions.
3
3
  * This function is designed for bulk form interaction without writing repetitive "When I..." steps.
4
4
  * @example
5
- * When I fill the following "Login" test form data
6
- * | #username | tomsmith |
7
- * | #password | SuperSecretPassword! |
8
- * | #login | click |
5
+ * When I fill the following "Login" test form data:
6
+ * ```gherkin
7
+ * | Target | Value |
8
+ * | login.usernameField | myuser |
9
+ * | login.passwordField | \{@link @secretPassword\ |
10
+ * | login.submitButton | click |
11
+ * | wait | wait:500 |
12
+ * | .error-msg | assert:visible |
13
+ * | request:GET:/api/status | body: {} |
14
+ * ```
9
15
  * @param formName - A descriptive name for the form being filled (used for logging only).
10
16
  * @param tableData - A 2D array representing the data table rows.
11
17
  * @remarks
@@ -1 +1 @@
1
- {"version":3,"file":"formTable.d.ts","sourceRoot":"","sources":["../../../src/backend/actions/formTable.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,GAAG,EACT,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EAAE,EAAE,GACpB,OAAO,CAAC,IAAI,CAAC,CA2Bf"}
1
+ {"version":3,"file":"formTable.d.ts","sourceRoot":"","sources":["../../../src/backend/actions/formTable.ts"],"names":[],"mappings":"AAWA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,GAAG,EACT,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EAAE,EAAE,GACpB,OAAO,CAAC,IAAI,CAAC,CAwCf"}
@@ -1,8 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.fillTestFormData = fillTestFormData;
4
+ //src/backend/actions/formTable.ts
4
5
  const test_1 = require("@playwright/test");
5
6
  const registry_1 = require("../../core/registry");
7
+ const state_1 = require("../utils/state");
8
+ const fixtures_1 = require("../utils/fixtures");
6
9
  // ==================================================
7
10
  // CORE FUNCTIONS
8
11
  // ==================================================
@@ -10,10 +13,16 @@ const registry_1 = require("../../core/registry");
10
13
  * Iterates through a provided Data Table to fill inputs, click elements, or perform assertions.
11
14
  * This function is designed for bulk form interaction without writing repetitive "When I..." steps.
12
15
  * @example
13
- * When I fill the following "Login" test form data
14
- * | #username | tomsmith |
15
- * | #password | SuperSecretPassword! |
16
- * | #login | click |
16
+ * When I fill the following "Login" test form data:
17
+ * ```gherkin
18
+ * | Target | Value |
19
+ * | login.usernameField | myuser |
20
+ * | login.passwordField | \{@link @secretPassword\ |
21
+ * | login.submitButton | click |
22
+ * | wait | wait:500 |
23
+ * | .error-msg | assert:visible |
24
+ * | request:GET:/api/status | body: {} |
25
+ * ```
17
26
  * @param formName - A descriptive name for the form being filled (used for logging only).
18
27
  * @param tableData - A 2D array representing the data table rows.
19
28
  * @remarks
@@ -32,27 +41,38 @@ async function fillTestFormData(page, formName, tableData) {
32
41
  throw new Error(`❌ The step "I fill the following '${formName}' form data" requires a Data Table below it.`);
33
42
  }
34
43
  for (const row of tableData) {
35
- const selector = row[0];
36
- const value = row[1];
37
- if (value === "click") {
44
+ const rawSelector = row[0];
45
+ const rawValue = row[1];
46
+ // Resolve selector from fixtures if applicable
47
+ const selectors = (0, fixtures_1.loadFixture)("selectors.json");
48
+ const selector = (0, fixtures_1.getFixtureValue)(selectors, rawSelector);
49
+ // Resolve value, handling variable aliases (e.g., "@alias")
50
+ const resolvedValue = (0, state_1.resolveValue)(page, rawValue);
51
+ // Perform actions based on the resolved value
52
+ if (resolvedValue === "click") {
38
53
  await page.click(selector);
54
+ console.log(`👆 Clicked: ${selector}`);
39
55
  }
40
- else if (value === "check") {
56
+ else if (resolvedValue === "check") {
41
57
  await page.check(selector);
58
+ console.log(`☑️ Checked: ${selector}`);
42
59
  }
43
- else if (value === "assert:visible") {
60
+ else if (resolvedValue === "assert:visible") {
44
61
  await (0, test_1.expect)(page.locator(selector)).toBeVisible();
62
+ console.log(`🔎 Asserted visible: ${selector}`);
45
63
  }
46
- else if (value.startsWith("assert:text:")) {
47
- const text = value.replace("assert:text:", "");
48
- await (0, test_1.expect)(page.locator(selector)).toHaveText(text);
64
+ else if (resolvedValue.startsWith("assert:text:")) {
65
+ const expectedText = resolvedValue.replace("assert:text:", "");
66
+ await (0, test_1.expect)(page.locator(selector)).toHaveText(expectedText);
67
+ console.log(`🔎 Asserted text "${expectedText}" in: ${selector}`);
49
68
  }
50
69
  else {
51
- await page.fill(selector, value);
70
+ await page.fill(selector, resolvedValue);
71
+ console.log(`✍️ Filled ${selector} with "${resolvedValue}"`);
52
72
  }
53
73
  }
54
74
  }
55
75
  // ==================================================
56
76
  // GLUE STEPS
57
77
  // ==================================================
58
- (0, registry_1.Step)("I fill the following {string} test form data", fillTestFormData);
78
+ (0, registry_1.Step)("I fill the following {string} test form data", fillTestFormData, "When");
@@ -1,26 +1,22 @@
1
1
  /**
2
2
  * Attempts to switch the logical context to a specific iframe.
3
3
  * Verifies the frame exists and logs a warning about frame scope limitations.
4
- * @example
5
- * When I switch to frame "#payment-iframe"
6
- * @param selector - The CSS selector of the iframe element.
4
+ * @example When I switch to frame "payment-iframe"
5
+ * @param selectorKey - The key of the iframe selector in the fixtures or a raw CSS selector.
7
6
  */
8
- export declare function switchToFrame(page: any, selector: string): Promise<void>;
7
+ export declare function switchToFrame(page: any, selectorKey: string): Promise<void>;
9
8
  /**
10
9
  * Finds an element inside a specific iframe and sets it as the active element.
11
10
  * This is the robust way to interact with iframe content (e.g., Stripe forms, embedded videos).
12
- * @example
13
- * When I find element "#card-number" in frame "#stripe-element"
14
- * @param elementSelector - The selector of the element INSIDE the iframe.
15
- * @param frameSelector - The selector of the iframe element itself.
11
+ * @example When I find element "card-number" in frame "stripe-element"
12
+ * @param elementSelectorKey - The key of the element selector in the fixtures or a raw CSS selector.
13
+ * @param frameSelectorKey - The key of the iframe selector in the fixtures or a raw CSS selector.
16
14
  */
17
- export declare function findElementInFrame(page: any, elementSelector: string, frameSelector: string): Promise<void>;
15
+ export declare function findElementInFrame(page: any, elementSelectorKey: string, frameSelectorKey: string): Promise<void>;
18
16
  /**
19
17
  * Waits for a new browser tab (popup) to open.
20
18
  * Useful for validating `target="_blank"` links.
21
- * @example
22
- * When I click on link "Open Dashboard"
23
- * And I switch to new tab
19
+ * @example When I click on link "Open Dashboard" And I switch to new tab
24
20
  */
25
21
  export declare function switchToNewTab(page: any): Promise<void>;
26
22
  //# sourceMappingURL=frames.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"frames.d.ts","sourceRoot":"","sources":["../../../src/backend/actions/frames.ts"],"names":[],"mappings":"AAOA;;;;;;GAMG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAS9E;AAED;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,GAAG,EACT,eAAe,EAAE,MAAM,EACvB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,IAAI,CAAC,CAOf;AAED;;;;;;GAMG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAM7D"}
1
+ {"version":3,"file":"frames.d.ts","sourceRoot":"","sources":["../../../src/backend/actions/frames.ts"],"names":[],"mappings":"AAWA;;;;;GAKG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAcjF;AAED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,GAAG,EACT,kBAAkB,EAAE,MAAM,EAC1B,gBAAgB,EAAE,MAAM,GACvB,OAAO,CAAC,IAAI,CAAC,CAaf;AAED;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAU7D"}
@@ -3,34 +3,41 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.switchToFrame = switchToFrame;
4
4
  exports.findElementInFrame = findElementInFrame;
5
5
  exports.switchToNewTab = switchToNewTab;
6
+ //src/backend/actions/frames.ts
6
7
  const registry_1 = require("../../core/registry");
7
8
  const state_1 = require("../utils/state");
9
+ const fixtures_1 = require("../utils/fixtures");
8
10
  // ==================================================
9
11
  // CORE FUNCTIONS
10
12
  // ==================================================
11
13
  /**
12
14
  * Attempts to switch the logical context to a specific iframe.
13
15
  * Verifies the frame exists and logs a warning about frame scope limitations.
14
- * @example
15
- * When I switch to frame "#payment-iframe"
16
- * @param selector - The CSS selector of the iframe element.
16
+ * @example When I switch to frame "payment-iframe"
17
+ * @param selectorKey - The key of the iframe selector in the fixtures or a raw CSS selector.
17
18
  */
18
- async function switchToFrame(page, selector) {
19
+ async function switchToFrame(page, selectorKey) {
20
+ const selectors = (0, fixtures_1.loadFixture)("selectors.json");
21
+ const selector = (0, fixtures_1.getFixtureValue)(selectors, selectorKey);
19
22
  const frameElement = page.locator(selector);
20
- const frame = frameElement.contentFrame();
21
- if (!frame)
23
+ const frame = await frameElement.contentFrame();
24
+ if (!frame) {
22
25
  throw new Error(`❌ Iframe "${selector}" not found or has no content.`);
26
+ }
23
27
  console.log(`⚠️ Switching Frames requires a Scope manager. For now, use 'I find element ... in frame ...'`);
24
28
  }
25
29
  /**
26
30
  * Finds an element inside a specific iframe and sets it as the active element.
27
31
  * This is the robust way to interact with iframe content (e.g., Stripe forms, embedded videos).
28
- * @example
29
- * When I find element "#card-number" in frame "#stripe-element"
30
- * @param elementSelector - The selector of the element INSIDE the iframe.
31
- * @param frameSelector - The selector of the iframe element itself.
32
+ * @example When I find element "card-number" in frame "stripe-element"
33
+ * @param elementSelectorKey - The key of the element selector in the fixtures or a raw CSS selector.
34
+ * @param frameSelectorKey - The key of the iframe selector in the fixtures or a raw CSS selector.
32
35
  */
33
- async function findElementInFrame(page, elementSelector, frameSelector) {
36
+ async function findElementInFrame(page, elementSelectorKey, frameSelectorKey) {
37
+ const selectors = (0, fixtures_1.loadFixture)("selectors.json");
38
+ // Resolve selectors from fixtures or use raw values
39
+ const frameSelector = (0, fixtures_1.getFixtureValue)(selectors, frameSelectorKey);
40
+ const elementSelector = (0, fixtures_1.getFixtureValue)(selectors, elementSelectorKey);
34
41
  const frame = page.frameLocator(frameSelector);
35
42
  const element = frame.locator(elementSelector).first();
36
43
  await element.waitFor();
@@ -40,19 +47,20 @@ async function findElementInFrame(page, elementSelector, frameSelector) {
40
47
  /**
41
48
  * Waits for a new browser tab (popup) to open.
42
49
  * Useful for validating `target="_blank"` links.
43
- * @example
44
- * When I click on link "Open Dashboard"
45
- * And I switch to new tab
50
+ * @example When I click on link "Open Dashboard" And I switch to new tab
46
51
  */
47
52
  async function switchToNewTab(page) {
48
53
  console.log("⚠️ Multi-tab support requires Runner updates. Verifying popup event only.");
49
- const popup = await page.waitForEvent("popup");
54
+ const [popup] = await Promise.all([
55
+ page.waitForEvent("popup"),
56
+ page.click("a[target='_blank']"), // Simulate clicking a link that opens a new tab
57
+ ]);
50
58
  await popup.waitForLoadState();
51
59
  console.log(`📑 New tab opened: ${await popup.title()}`);
52
60
  }
53
61
  // ==================================================
54
62
  // GLUE STEPS
55
63
  // ==================================================
56
- (0, registry_1.Step)("I switch to frame {string}", switchToFrame);
57
- (0, registry_1.Step)("I find element {string} in frame {string}", findElementInFrame);
58
- (0, registry_1.Step)("I switch to new tab", switchToNewTab);
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");
@@ -1,3 +1,16 @@
1
+ export * from "./navigation";
2
+ export * from "./interactions";
3
+ export * from "./formTable";
4
+ export * from "./click";
5
+ export * from "./inputs";
6
+ export * from "./form";
7
+ export * from "./mouse";
8
+ export * from "./misc";
9
+ export * from "./mobile";
10
+ export * from "./visual";
11
+ export * from "./waits";
12
+ export * from "./frames";
13
+ export * from "./keyboard";
1
14
  import "./navigation";
2
15
  import "./interactions";
3
16
  import "./formTable";
@@ -7,6 +20,7 @@ import "./form";
7
20
  import "./mouse";
8
21
  import "./misc";
9
22
  import "./mobile";
23
+ import "./visual";
10
24
  import "./waits";
11
25
  import "./frames";
12
26
  import "./keyboard";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/backend/actions/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,gBAAgB,CAAC;AACxB,OAAO,aAAa,CAAC;AACrB,OAAO,SAAS,CAAC;AACjB,OAAO,UAAU,CAAC;AAClB,OAAO,QAAQ,CAAC;AAChB,OAAO,SAAS,CAAC;AACjB,OAAO,QAAQ,CAAC;AAChB,OAAO,UAAU,CAAC;AAClB,OAAO,SAAS,CAAC;AACjB,OAAO,UAAU,CAAC;AAClB,OAAO,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/backend/actions/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAI3B,OAAO,cAAc,CAAC;AACtB,OAAO,gBAAgB,CAAC;AACxB,OAAO,aAAa,CAAC;AACrB,OAAO,SAAS,CAAC;AACjB,OAAO,UAAU,CAAC;AAClB,OAAO,QAAQ,CAAC;AAChB,OAAO,SAAS,CAAC;AACjB,OAAO,QAAQ,CAAC;AAChB,OAAO,UAAU,CAAC;AAClB,OAAO,UAAU,CAAC;AAClB,OAAO,SAAS,CAAC;AACjB,OAAO,UAAU,CAAC;AAClB,OAAO,YAAY,CAAC"}
@@ -1,5 +1,34 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ //src/backend/actions/index.ts
18
+ __exportStar(require("./navigation"), exports);
19
+ __exportStar(require("./interactions"), exports);
20
+ __exportStar(require("./formTable"), exports);
21
+ __exportStar(require("./click"), exports);
22
+ __exportStar(require("./inputs"), exports);
23
+ __exportStar(require("./form"), exports);
24
+ __exportStar(require("./mouse"), exports);
25
+ __exportStar(require("./misc"), exports);
26
+ __exportStar(require("./mobile"), exports);
27
+ __exportStar(require("./visual"), exports);
28
+ __exportStar(require("./waits"), exports);
29
+ __exportStar(require("./frames"), exports);
30
+ __exportStar(require("./keyboard"), exports);
31
+ // Import all side-effect modules (steps registration)
3
32
  require("./navigation");
4
33
  require("./interactions");
5
34
  require("./formTable");
@@ -9,6 +38,7 @@ require("./form");
9
38
  require("./mouse");
10
39
  require("./misc");
11
40
  require("./mobile");
41
+ require("./visual");
12
42
  require("./waits");
13
43
  require("./frames");
14
44
  require("./keyboard");
@@ -1,96 +1,68 @@
1
1
  /**
2
2
  * Fills the currently stored (active) input element with specific text.
3
3
  * Supports variable aliases using the "@" prefix.
4
- * @example
5
- * When I type "hello world"
6
- * When I type "@storedPassword"
7
- * @param page - Playwright page object
8
- * @param textOrAlias - The text to type OR a variable key prefixed with "@".
9
- * @param table - Optional data table for options (e.g., force: true).
4
+ * @example When I type "hello world"
5
+ * When I type "@storedPassword"
10
6
  */
11
7
  export declare function typeText(page: any, textOrAlias: string, table?: any): Promise<void>;
12
8
  /**
13
9
  * Fills the active input with a value explicitly retrieved from the variable store.
14
- * @example
15
- * When I type stored "userEmail"
16
- * @param alias - The key of the stored variable.
10
+ * @example When I type stored "userEmail"
17
11
  */
18
12
  export declare function typeStoredText(page: any, alias: string, table?: any): Promise<void>;
19
13
  /**
20
14
  * Types text character-by-character with a 100ms delay.
21
- * @example
22
- * When I slowly type "Playwright"
23
- * @param text - The text to type sequentially.
15
+ * @example When I slowly type "Playwright"
24
16
  */
25
17
  export declare function typeSlowly(page: any, text: string): Promise<void>;
26
18
  /**
27
19
  * Sets the value of an input directly (alias for filling).
28
- * @example
29
- * When I set value "12345"
30
- * @param value - The value to set.
20
+ * @example When I set value "12345"
31
21
  */
32
22
  export declare function setInputValue(page: any, value: string, table?: any): Promise<void>;
33
23
  /**
34
24
  * Clears the text content of the active input field.
35
- * @example
36
- * When I clear
25
+ * @example When I clear
37
26
  */
38
27
  export declare function clearInput(page: any): Promise<void>;
39
28
  /**
40
29
  * Simulates pressing a specific keyboard key on the active element.
41
- * @example
42
- * When I press "Enter"
43
- * When I press "Tab"
44
- * @param key - The key name (e.g., "Enter", "Escape", "ArrowDown").
30
+ * @example When I press "Enter"
45
31
  */
46
32
  export declare function pressKeyOnInput(page: any, key: string): Promise<void>;
47
33
  /**
48
34
  * Checks the currently active checkbox or radio button.
49
- * @example
50
- * When I check
35
+ * @example When I check
51
36
  */
52
37
  export declare function checkElement(page: any, table?: any): Promise<void>;
53
38
  /**
54
39
  * Unchecks the currently active checkbox.
55
- * @example
56
- * When I uncheck
40
+ * @example When I uncheck
57
41
  */
58
42
  export declare function uncheckElement(page: any, table?: any): Promise<void>;
59
43
  /**
60
44
  * Checks/Unchecks the Nth checkbox or radio button matching a selector.
61
- * @example
62
- * When I check 1st selector "input[type='checkbox']"
63
- * When I uncheck 2nd selector ".terms-check"
45
+ * @example When I check 1st selector "input[type='checkbox']"
64
46
  */
65
- export declare function checkNthElementBySelector(page: any, action: string, indexStr: string, selector: string, table?: any): Promise<void>;
47
+ export declare function checkNthElementBySelector(page: any, action: string, indexStr: string, selectorKey: string, table?: any): Promise<void>;
66
48
  /**
67
49
  * Selects an option in a `<select>` dropdown by its visible label.
68
- * @example
69
- * When I select option "California"
70
- * @param option - The visible text label of the option to select.
50
+ * @example When I select option "California"
71
51
  */
72
52
  export declare function selectOption(page: any, option: string, table?: any): Promise<void>;
73
53
  /**
74
54
  * Submits the form related to the active element.
75
- * Logic:
76
- * 1. Tries to find the parent `<form>` of the currently stored element.
77
- * 2. If no parent form is found, finds the first form on the page.
78
- * @example
79
- * When I submit
55
+ * @example When I submit
80
56
  */
81
57
  export declare function submitForm(page: any): Promise<void>;
82
58
  /**
83
59
  * Uploads a file to the active file input element.
84
- * @example
85
- * When I select file "data/invoice.pdf"
86
- * @param filePath - The path to the file (relative to the project root).
60
+ * @example When I select file "data/invoice.pdf"
87
61
  */
88
62
  export declare function selectFile(page: any, filePath: string): Promise<void>;
89
63
  /**
90
64
  * Uploads a file to the active file input element (alias for selectFile).
91
- * @example
92
- * When I upload file "images/logo.png"
93
- * @param filePath - The path to the file.
65
+ * @example When I upload file "images/logo.png"
94
66
  */
95
67
  export declare function uploadFile(page: any, filePath: string): Promise<void>;
96
68
  //# sourceMappingURL=inputs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"inputs.d.ts","sourceRoot":"","sources":["../../../src/backend/actions/inputs.ts"],"names":[],"mappings":"AAOA;;;;;;;;;GASG;AACH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBzF;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CASzF;AAED;;;;;GAKG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIvE;AAED;;;;;GAKG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAKxF;AAED;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAIzD;AA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