@vardot/varbase-e2e 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (301) hide show
  1. package/AGENTS.md +148 -0
  2. package/CLAUDE.md +544 -0
  3. package/README.md +22 -0
  4. package/bin/generate-reports.js +363 -0
  5. package/bin/init-varbase-e2e.js +330 -0
  6. package/bin/postinstall.js +26 -0
  7. package/cucumber.js +125 -0
  8. package/docs/00-quick-start.md +102 -0
  9. package/docs/01-getting-started.md +102 -0
  10. package/docs/02-bbr-smart-waits.md +77 -0
  11. package/docs/03-selector-registry.md +95 -0
  12. package/docs/04-step-reference.md +801 -0
  13. package/docs/05-web-first-assertions.md +91 -0
  14. package/docs/06-network-and-dialogs.md +83 -0
  15. package/docs/07-auth-state.md +75 -0
  16. package/docs/08-clock-mocking.md +59 -0
  17. package/docs/09-api-testing.md +114 -0
  18. package/docs/10-accessibility.md +167 -0
  19. package/docs/11-debugging.md +129 -0
  20. package/docs/12-ai-agent-guide.md +338 -0
  21. package/docs/13-faq.md +236 -0
  22. package/docs/14-recipes-cookbook.md +255 -0
  23. package/docs/15-tag-conventions.md +76 -0
  24. package/docs/16-ci-cd.md +90 -0
  25. package/docs/README.md +125 -0
  26. package/docs/advanced-screenshots/then-i-save-fullscreen-screenshot.md +36 -0
  27. package/docs/advanced-screenshots/then-i-save-width-x-height-screenshot.md +34 -0
  28. package/docs/advanced-screenshots/when-i-save-screenshot-name-filename.md +45 -0
  29. package/docs/advanced-screenshots.md +52 -0
  30. package/docs/advanced-selectors.md +18 -0
  31. package/docs/api-step-definitions.md +45 -0
  32. package/docs/global-settings.md +267 -0
  33. package/docs/install-varbase-e2e/ddev-varbase-e2e.md +52 -0
  34. package/docs/install-varbase-e2e.md +34 -0
  35. package/docs/overview.md +40 -0
  36. package/docs/step-definitions/given-i-am-anonymous-user.md +67 -0
  37. package/docs/step-definitions/given-i-am-homepage.md +68 -0
  38. package/docs/step-definitions/given-i-am-specific-page.md +72 -0
  39. package/docs/step-definitions/then-i-should-be.md +56 -0
  40. package/docs/step-definitions/then-i-should-see.md +62 -0
  41. package/docs/step-definitions/then-item-checkbox.md +54 -0
  42. package/docs/step-definitions/then-item-link-should-contain-url.md +84 -0
  43. package/docs/step-definitions/then-item-should-contain.md +67 -0
  44. package/docs/step-definitions/then-radio-button-value-should-be-selected.md +68 -0
  45. package/docs/step-definitions/then-response-status-code-should-be-number.md +69 -0
  46. package/docs/step-definitions/then-value-radio-button-selected.md +62 -0
  47. package/docs/step-definitions/when-i-attach-file-file-name-element.md +71 -0
  48. package/docs/step-definitions/when-i-check-checkbox.md +60 -0
  49. package/docs/step-definitions/when-i-click-link.md +51 -0
  50. package/docs/step-definitions/when-i-click-operation-text-row.md +71 -0
  51. package/docs/step-definitions/when-i-fill.md +59 -0
  52. package/docs/step-definitions/when-i-go-homepage.md +60 -0
  53. package/docs/step-definitions/when-i-go-specific-page.md +67 -0
  54. package/docs/step-definitions/when-i-move-backward-one-page.md +49 -0
  55. package/docs/step-definitions/when-i-move-forward-one-page.md +58 -0
  56. package/docs/step-definitions/when-i-press-button.md +58 -0
  57. package/docs/step-definitions/when-i-reload-page.md +51 -0
  58. package/docs/step-definitions/when-i-scroll.md +73 -0
  59. package/docs/step-definitions/when-i-select-option-select-list.md +53 -0
  60. package/docs/step-definitions/when-i-select-radio-button-value.md +62 -0
  61. package/docs/step-definitions/when-i-uncheck-checkbox.md +57 -0
  62. package/docs/step-definitions/when-i-wait-ajax-finish.md +64 -0
  63. package/docs/step-definitions/when-i-wait.md +62 -0
  64. package/docs/step-definitions.md +82 -0
  65. package/docs/steps/README.md +137 -0
  66. package/docs/steps/a11y.md +731 -0
  67. package/docs/steps/action.md +181 -0
  68. package/docs/steps/api.md +679 -0
  69. package/docs/steps/assertion.md +328 -0
  70. package/docs/steps/auth.md +108 -0
  71. package/docs/steps/clock.md +171 -0
  72. package/docs/steps/cookie.md +293 -0
  73. package/docs/steps/debug.md +52 -0
  74. package/docs/steps/dialog.md +226 -0
  75. package/docs/steps/drupal-canvas.md +414 -0
  76. package/docs/steps/drupal-ckeditor.md +118 -0
  77. package/docs/steps/drupal-core.md +688 -0
  78. package/docs/steps/drupal-layout-builder.md +437 -0
  79. package/docs/steps/drupal-media.md +107 -0
  80. package/docs/steps/drupal-moderation.md +81 -0
  81. package/docs/steps/drupal-paragraphs.md +36 -0
  82. package/docs/steps/element.md +455 -0
  83. package/docs/steps/field.md +648 -0
  84. package/docs/steps/file-download.md +235 -0
  85. package/docs/steps/form.md +344 -0
  86. package/docs/steps/iframe.md +248 -0
  87. package/docs/steps/input.md +220 -0
  88. package/docs/steps/javascript.md +111 -0
  89. package/docs/steps/keyboard.md +107 -0
  90. package/docs/steps/link.md +217 -0
  91. package/docs/steps/metatag.md +99 -0
  92. package/docs/steps/modal.md +232 -0
  93. package/docs/steps/navigation.md +275 -0
  94. package/docs/steps/network.md +284 -0
  95. package/docs/steps/path.md +203 -0
  96. package/docs/steps/response.md +102 -0
  97. package/docs/steps/responsive.md +139 -0
  98. package/docs/steps/rest.md +140 -0
  99. package/docs/steps/screenshot.md +211 -0
  100. package/docs/steps/scroll.md +266 -0
  101. package/docs/steps/selectors.md +848 -0
  102. package/docs/steps/storage.md +254 -0
  103. package/docs/steps/table.md +216 -0
  104. package/docs/steps/varbase.md +391 -0
  105. package/docs/steps/video.md +111 -0
  106. package/docs/steps/wait.md +553 -0
  107. package/docs/steps/web-first.md +289 -0
  108. package/docs/steps/xml.md +505 -0
  109. package/docs/steps/yaml.md +951 -0
  110. package/examples/a11y.html +31 -0
  111. package/examples/about-us.html +11 -0
  112. package/examples/account.html +32 -0
  113. package/examples/ajax-wait-examples.html +147 -0
  114. package/examples/contact-us.html +10 -0
  115. package/examples/cookies.html +10 -0
  116. package/examples/date.html +12 -0
  117. package/examples/dynamic-examples.html +498 -0
  118. package/examples/element.html +11 -0
  119. package/examples/example-api.json +28 -0
  120. package/examples/existing-page.html +11 -0
  121. package/examples/field.html +24 -0
  122. package/examples/index.html +37 -0
  123. package/examples/keyboard.html +11 -0
  124. package/examples/links.html +9 -0
  125. package/examples/modal.html +14 -0
  126. package/examples/path.html +3 -0
  127. package/examples/table.html +13 -0
  128. package/examples/test--modal-dialogs.html +252 -0
  129. package/examples/test--then--i-should--not--see-text-in-element.html +48 -0
  130. package/examples/test--then--i-should--see-text-in-element.html +48 -0
  131. package/examples/test--then--i-should--see-text-matching-pattern.html +31 -0
  132. package/examples/test--then--i-should-see-text-in-table-row.html +232 -0
  133. package/examples/test--then--the-checkbox-checked.html +68 -0
  134. package/examples/test--then--the-element-should_not-contain-cssproperty.html +47 -0
  135. package/examples/test--then--the-link-should-contain.html +21 -0
  136. package/examples/test--when--i-additionally-select.html +27 -0
  137. package/examples/test--when--i-attach-file-to-feild.html +50 -0
  138. package/examples/test--when--i-check-uncheck-checkbox.html +47 -0
  139. package/examples/test--when--i-click-link.html +18 -0
  140. package/examples/test--when--i-click-text-in-table-row.html +178 -0
  141. package/examples/test--when--i-fill-in.html +48 -0
  142. package/examples/test--when--i-press-button.html +31 -0
  143. package/examples/test--when--i-reload-page.html +27 -0
  144. package/examples/test--when--i-scroll-functionality.html +177 -0
  145. package/examples/test--when--i-scroll-left-right-functionality.html +149 -0
  146. package/examples/test--when--i-select-option-from-dropdownlist.html +35 -0
  147. package/examples/test--when--i-select-radio-button.html +95 -0
  148. package/examples/test--when-i-wait-max-of-time.html +39 -0
  149. package/examples/test--when-i-wait-page-until-is-loaded.html +47 -0
  150. package/examples/test--when-i-wait-specific-time.html +39 -0
  151. package/examples/test-acceptable-url-path.html +11 -0
  152. package/examples/video-demo.html +43 -0
  153. package/package.json +56 -0
  154. package/playwright.config.ts +39 -0
  155. package/tests/assets/test-document.pdf +14 -0
  156. package/tests/assets/vardot.png +0 -0
  157. package/tests/features/a11y.feature +39 -0
  158. package/tests/features/ajax-wait-examples.feature +24 -0
  159. package/tests/features/api-step-definitions-individual.feature +185 -0
  160. package/tests/features/complete-api-testing-examples.feature +205 -0
  161. package/tests/features/cookie.feature +13 -0
  162. package/tests/features/date.feature +11 -0
  163. package/tests/features/dynamic-content-examples.feature +156 -0
  164. package/tests/features/element.feature +16 -0
  165. package/tests/features/field.feature +25 -0
  166. package/tests/features/keyboard.feature +10 -0
  167. package/tests/features/link.feature +11 -0
  168. package/tests/features/modal-advanced-example.feature +54 -0
  169. package/tests/features/modal-basic-example.feature +42 -0
  170. package/tests/features/modal-error-handling-example.feature +37 -0
  171. package/tests/features/modal.feature +11 -0
  172. package/tests/features/path.feature +16 -0
  173. package/tests/features/response.feature +8 -0
  174. package/tests/features/responsive.feature +10 -0
  175. package/tests/features/table.feature +18 -0
  176. package/tests/features/test--given--i-am-an-anonymous-user.feature +10 -0
  177. package/tests/features/test--given--i-am-on-homepage.feature +16 -0
  178. package/tests/features/test--then--i-save-screenshot.feature +33 -0
  179. package/tests/features/test--then--i-see-locator.feature +320 -0
  180. package/tests/features/test--then--i-should--not--see-text-in-element.feature +13 -0
  181. package/tests/features/test--then--i-should--see-text-in-element-by-attr.feature +10 -0
  182. package/tests/features/test--then--i-should--see-text-in-element.feature +10 -0
  183. package/tests/features/test--then--i-should--see-text-matching-pattern-in-element.feature +13 -0
  184. package/tests/features/test--then--i-should--see-text-matching-pattern.feature +18 -0
  185. package/tests/features/test--then--i-should-be-on-page.feature +10 -0
  186. package/tests/features/test--then--i-should-be-on-the-homepage.feature +10 -0
  187. package/tests/features/test--then--i-should-not-see-an-element-by-attr.feature +8 -0
  188. package/tests/features/test--then--i-should-not-see-an-element.feature +8 -0
  189. package/tests/features/test--then--i-should-see-an-element-by-attr.feature +8 -0
  190. package/tests/features/test--then--i-should-see-an-element.feature +8 -0
  191. package/tests/features/test--then--i-should-see-n-elements.feature +24 -0
  192. package/tests/features/test--then--i-should-see-text-in-table-row.feature +96 -0
  193. package/tests/features/test--then--print-current-url-and-response.feature +21 -0
  194. package/tests/features/test--then--the-checkbox-is-checked.feature +18 -0
  195. package/tests/features/test--then--the-checkbox-should-be-checked.feature +16 -0
  196. package/tests/features/test--then--the-element-should-contain-cssproperty.feature +9 -0
  197. package/tests/features/test--then--the-element-should-not-contain-cssproperty.feature +10 -0
  198. package/tests/features/test--then--the-field-should-contain-value.feature +11 -0
  199. package/tests/features/test--then--the-response-should-contain.feature +11 -0
  200. package/tests/features/test--then--the-response-status-code-should-be.feature +31 -0
  201. package/tests/features/test--then--the-url-should-match.feature +7 -0
  202. package/tests/features/test--then-the-link-should-contain-by-attribute.feature +18 -0
  203. package/tests/features/test--then-the-link-should-contain.feature +7 -0
  204. package/tests/features/test--when--i-additionally-select.feature +30 -0
  205. package/tests/features/test--when--i-attach-file-to-feild.feature +9 -0
  206. package/tests/features/test--when--i-check-checkbox.feature +21 -0
  207. package/tests/features/test--when--i-click-link-by-attribute.feature +21 -0
  208. package/tests/features/test--when--i-click-link.feature +9 -0
  209. package/tests/features/test--when--i-click-text-in-table-row.feature +37 -0
  210. package/tests/features/test--when--i-fill-in-by-attr.feature +31 -0
  211. package/tests/features/test--when--i-fill-in-table-by-attr.feature +19 -0
  212. package/tests/features/test--when--i-fill-in.feature +32 -0
  213. package/tests/features/test--when--i-follow.feature +22 -0
  214. package/tests/features/test--when--i-go-to-homepage.feature +9 -0
  215. package/tests/features/test--when--i-move-forward-backward-one-page.feature +14 -0
  216. package/tests/features/test--when--i-press-button-by-attribute.feature +18 -0
  217. package/tests/features/test--when--i-press-button.feature +13 -0
  218. package/tests/features/test--when--i-reload-page.feature +11 -0
  219. package/tests/features/test--when--i-scroll-left-right.feature +48 -0
  220. package/tests/features/test--when--i-scroll.feature +48 -0
  221. package/tests/features/test--when--i-select-option-from-dropdownlist.feature +21 -0
  222. package/tests/features/test--when--i-select-radio-button.feature +37 -0
  223. package/tests/features/test--when--i-wait-page-is-loaded.feature +8 -0
  224. package/tests/features/test--when--i-wait-time.feature +21 -0
  225. package/tests/features/video.feature +18 -0
  226. package/tests/features/wait.feature +7 -0
  227. package/tests/features/yaml.feature +102 -0
  228. package/tests/selectors/_canonical-keys.json +113 -0
  229. package/tests/selectors/back-end-selectors.json +19 -0
  230. package/tests/selectors/cms-contentful-admin.json +35 -0
  231. package/tests/selectors/cms-craft-admin.json +39 -0
  232. package/tests/selectors/cms-drupal-cms-gin.json +56 -0
  233. package/tests/selectors/cms-drupal-core-claro.json +50 -0
  234. package/tests/selectors/cms-generic-admin.json +34 -0
  235. package/tests/selectors/cms-ghost-admin.json +34 -0
  236. package/tests/selectors/cms-joomla-admin.json +41 -0
  237. package/tests/selectors/cms-magento2-admin.json +32 -0
  238. package/tests/selectors/cms-prestashop-admin.json +38 -0
  239. package/tests/selectors/cms-shopify-admin.json +25 -0
  240. package/tests/selectors/cms-strapi-admin.json +42 -0
  241. package/tests/selectors/cms-typo3-admin.json +41 -0
  242. package/tests/selectors/cms-woocommerce-front.json +50 -0
  243. package/tests/selectors/cms-wordpress-admin.json +31 -0
  244. package/tests/selectors/framework-ant-design.json +80 -0
  245. package/tests/selectors/framework-bootstrap.json +86 -0
  246. package/tests/selectors/framework-bulma.json +74 -0
  247. package/tests/selectors/framework-chakra.json +58 -0
  248. package/tests/selectors/framework-foundation.json +51 -0
  249. package/tests/selectors/framework-material-ui.json +72 -0
  250. package/tests/selectors/framework-shadcn.json +51 -0
  251. package/tests/selectors/framework-tailwind.json +40 -0
  252. package/tests/selectors/framework-vuetify.json +61 -0
  253. package/tests/selectors/front-end-selectors.json +16 -0
  254. package/tests/selectors/homepage-selectors.json +13 -0
  255. package/tests/step-definitions/a11y.steps.js +800 -0
  256. package/tests/step-definitions/action.steps.js +167 -0
  257. package/tests/step-definitions/api.steps.js +732 -0
  258. package/tests/step-definitions/assertion.steps.js +352 -0
  259. package/tests/step-definitions/auth.steps.js +126 -0
  260. package/tests/step-definitions/clock.steps.js +128 -0
  261. package/tests/step-definitions/cookie.steps.js +216 -0
  262. package/tests/step-definitions/debug.steps.js +39 -0
  263. package/tests/step-definitions/dialog.steps.js +193 -0
  264. package/tests/step-definitions/drupal-canvas.steps.js +764 -0
  265. package/tests/step-definitions/drupal-ckeditor.steps.js +108 -0
  266. package/tests/step-definitions/drupal-core.steps.js +665 -0
  267. package/tests/step-definitions/drupal-helpers.js +371 -0
  268. package/tests/step-definitions/drupal-layout-builder.steps.js +466 -0
  269. package/tests/step-definitions/drupal-media.steps.js +99 -0
  270. package/tests/step-definitions/drupal-moderation.steps.js +71 -0
  271. package/tests/step-definitions/drupal-paragraphs.steps.js +50 -0
  272. package/tests/step-definitions/element.steps.js +356 -0
  273. package/tests/step-definitions/field.steps.js +653 -0
  274. package/tests/step-definitions/file-download.steps.js +211 -0
  275. package/tests/step-definitions/form.steps.js +333 -0
  276. package/tests/step-definitions/iframe.steps.js +228 -0
  277. package/tests/step-definitions/input.steps.js +202 -0
  278. package/tests/step-definitions/javascript.steps.js +232 -0
  279. package/tests/step-definitions/keyboard.steps.js +112 -0
  280. package/tests/step-definitions/link.steps.js +142 -0
  281. package/tests/step-definitions/metatag.steps.js +91 -0
  282. package/tests/step-definitions/modal.steps.js +244 -0
  283. package/tests/step-definitions/navigation.steps.js +218 -0
  284. package/tests/step-definitions/network.steps.js +280 -0
  285. package/tests/step-definitions/path.steps.js +141 -0
  286. package/tests/step-definitions/response.steps.js +98 -0
  287. package/tests/step-definitions/responsive.steps.js +125 -0
  288. package/tests/step-definitions/rest.steps.js +111 -0
  289. package/tests/step-definitions/screenshot.steps.js +423 -0
  290. package/tests/step-definitions/scroll.steps.js +189 -0
  291. package/tests/step-definitions/selectors.steps.js +1003 -0
  292. package/tests/step-definitions/storage.steps.js +194 -0
  293. package/tests/step-definitions/table.steps.js +181 -0
  294. package/tests/step-definitions/varbase-e2e.js +897 -0
  295. package/tests/step-definitions/varbase.steps.js +458 -0
  296. package/tests/step-definitions/video.steps.js +178 -0
  297. package/tests/step-definitions/wait.steps.js +400 -0
  298. package/tests/step-definitions/web-first.steps.js +298 -0
  299. package/tests/step-definitions/xml.steps.js +411 -0
  300. package/tests/step-definitions/yaml.steps.js +913 -0
  301. package/tsconfig.json +26 -0
@@ -0,0 +1,54 @@
1
+ Feature: Modal Dialog - Advanced Scenarios
2
+ As a QA engineer testing complex modal behaviors
3
+ I want to handle various modal interactions
4
+ So that I can ensure comprehensive modal testing coverage
5
+
6
+ Background:
7
+ Given I am on "/test--modal-dialogs.html"
8
+
9
+ Scenario: Verify modal with specific title
10
+ When I click "show-welcome-modal" by attr
11
+ And I wait for modal to appear
12
+ Then I should see a modal with title "Welcome Message"
13
+ And I should see "Thank you for joining us!" in the modal
14
+ When I click "OK" in the modal
15
+ And I wait 1 second
16
+ Then I should not see a modal
17
+
18
+ Scenario: Handle settings modal with form
19
+ When I click ".open-settings" by attr
20
+ And I wait for the modal to appear
21
+ Then I should see the "settings-modal" modal
22
+ And I should see "User Settings" in the modal dialog
23
+ When I fill in "username" with "john_doe" by attr
24
+ And I fill in "email" with "john@example.com" by "id" attr
25
+ And I click "Save Changes" button in the modal
26
+ And I wait 1 second
27
+ Then I should see "Settings saved successfully" in the modal
28
+ When I click "Close" in the modal dialog
29
+ And I wait 1 second
30
+ Then I should not see a modal
31
+
32
+ Scenario: Verify contact modal does not contain error message
33
+ When I click "#contact-form-btn" by attr
34
+ And I wait for modal to appear
35
+ Then I should see a modal
36
+ And I should not see "Payment failed" in the modal
37
+ And I should see "Enter payment details" in the modal dialog
38
+ When I dismiss the modal
39
+ And I wait 1 second
40
+ Then I should not see the modal dialog
41
+
42
+ Scenario: Form submission in contact modal
43
+ When I click "#contact-form-btn" by attr
44
+ And I wait for the modal dialog to appear
45
+ Then I should see the modal
46
+ When I fill in the following: by attr
47
+ | contact-name | Jane Smith |
48
+ | contact-email | jane@example.com |
49
+ | contact-message | This is a test message|
50
+ And I click "Submit" button in the modal
51
+ And I wait 1 second
52
+ Then I should see "Message sent successfully" in the modal
53
+ And I wait for the modal to disappear
54
+ Then I should not see the modal
@@ -0,0 +1,42 @@
1
+ Feature: Modal Dialog - Basic Interactions
2
+ As a user testing modal dialogs
3
+ I want to interact with modal windows
4
+ So that I can verify modal functionality works correctly
5
+
6
+ Background:
7
+ Given I am on "/test--modal-dialogs.html"
8
+
9
+ Scenario: Modal should not appear initially
10
+ Then I should not see a modal
11
+
12
+ Scenario: Open and verify modal visibility
13
+ When I click "show-modal" by attr
14
+ And I wait for the modal to appear
15
+ Then I should see a modal
16
+ And I should see "Welcome" in the modal
17
+ And I should see "This is a sample modal dialog" in the modal dialog
18
+
19
+ Scenario: Click confirm button in modal
20
+ When I click "trigger-modal" by attr
21
+ And I wait for the modal to appear
22
+ Then I should see a modal
23
+ When I click "Confirm" in the modal
24
+ And I wait 1 second
25
+ Then I should not see a modal
26
+
27
+ Scenario: Close modal using close button
28
+ When I click "#show-modal" by attr
29
+ And I wait for modal to appear
30
+ Then I should see the modal
31
+ When I close the modal
32
+ And I wait for the modal to disappear
33
+ Then I should not see the modal
34
+
35
+ Scenario: Verify specific modal by identifier
36
+ When I click "delete-btn" by attr
37
+ And I wait for modal to appear
38
+ Then I should see a "delete-confirmation-modal" modal
39
+ And I should see "Are you sure you want to delete this item?" in the modal
40
+ When I click "Cancel" button in the modal dialog
41
+ And I wait 1 second
42
+ Then I should not see the modal dialog
@@ -0,0 +1,37 @@
1
+ Feature: Modal Dialog - Error Handling and Edge Cases
2
+ As a test automation engineer
3
+ I want to verify modal error states and edge cases
4
+ So that I can ensure robust modal functionality
5
+
6
+ Background:
7
+ Given I am on the "/test--modal-dialogs.html" page
8
+
9
+ Scenario: Confirm deletion with modal
10
+ When I click "Delete" in the "Project Alpha" row
11
+ And I wait for the modal to appear
12
+ Then I should see a modal
13
+ And I should see "Are you sure you want to delete Project Alpha?" in the modal
14
+ When I click "Yes, Delete" button in the modal
15
+ And I wait for the modal to disappear
16
+ Then I should not see a modal
17
+ And I should see "Project deleted successfully"
18
+
19
+ Scenario: Cancel deletion action dismisses modal
20
+ When I click "Delete" in the "Project Beta" row
21
+ And I wait for modal to appear
22
+ Then I should see the modal dialog
23
+ And I should see "Are you sure you want to delete Project Beta?" in the modal
24
+ When I click "Cancel" in the modal
25
+ And I wait 1 second
26
+ Then I should not see the modal dialog
27
+
28
+ Scenario: Delete confirmation modal content verification
29
+ When I click "delete-btn" by attr
30
+ And I wait for modal to appear
31
+ Then I should see a "delete-confirmation-modal" modal
32
+ And I should see "Are you sure you want to delete this item?" in the modal
33
+ And I should see "This action cannot be undone" in the modal dialog
34
+ And I should not see "Item has been deleted" in the modal
35
+ When I click "Cancel" button in the modal
36
+ And I wait 1 second
37
+ Then I should not see a modal
@@ -0,0 +1,11 @@
1
+ Feature: Modal step definitions
2
+
3
+ Scenario: Open and inspect modal
4
+ Given I am on "/modal.html"
5
+ Then I should not see the modal
6
+ When I click on the element "#open"
7
+ And I wait for the modal to appear
8
+ Then I should see the modal
9
+ And the modal should contain "Welcome modal text"
10
+ And the modal should not contain "Goodbye"
11
+ When I click on "#close-btn" in the modal
@@ -0,0 +1,16 @@
1
+ Feature: Path step definitions
2
+
3
+ Scenario: Path and query parameter assertions
4
+ Given I am on "/path.html?lang=en&debug=1"
5
+ Then the path should be "/path.html"
6
+ And the path should not be "/wrong"
7
+ And current url should have the "lang" parameter
8
+ And current url should have the "lang" parameter with the "en" value
9
+ And current url should not have the "missing" parameter
10
+ And current url should not have the "lang" parameter with the "fr" value
11
+
12
+ Scenario: History navigation
13
+ Given I am on "/path.html"
14
+ When I go to "/element.html"
15
+ And I go back
16
+ Then the path should be "/path.html"
@@ -0,0 +1,8 @@
1
+ Feature: Response step definitions
2
+
3
+ Scenario: Inspect response headers from main navigation
4
+ Given I am on the homepage
5
+ Then the response should contain the header "content-type"
6
+ And the response header "content-type" should contain the value "html"
7
+ And the response should not contain the header "x-fake-header"
8
+ And the response header "content-type" should not contain the value "application/json"
@@ -0,0 +1,10 @@
1
+ Feature: Responsive step definitions
2
+
3
+ Scenario: Set viewport via breakpoints
4
+ Given I am on the homepage
5
+ When I set the viewport to the "mobile" breakpoint
6
+ And I set the viewport to the "tablet" breakpoint
7
+ And I set the viewport to the "desktop" breakpoint
8
+ And I set the viewport width to 800
9
+ And I set the viewport height to 600
10
+ And I set the viewport to 1024 by 768
@@ -0,0 +1,18 @@
1
+ Feature: Table step definitions
2
+
3
+ Scenario: Inspect table content
4
+ Given I am on "/table.html"
5
+ Then the table "#users" should have 3 rows
6
+ And the table "#users" should have 3 columns
7
+ And the table "#users" should not be empty
8
+ And the table "#empty" should be empty
9
+ And the table "#users" should contain the following columns:
10
+ | Name |
11
+ | Role |
12
+ | Status |
13
+ And the table "#users" should be sorted by "Name" in "ascending" order
14
+ And the table "#users" should contain the following rows:
15
+ | Alice | Admin |
16
+ And the "Bob" row should contain the following:
17
+ | User |
18
+ | Active |
@@ -0,0 +1,10 @@
1
+ Feature: Given I am an anonymous user
2
+
3
+ Scenario: Anonymous user is redirected to homepage with no cookies
4
+ Given I am an anonymous user
5
+ Then the url should match "\/"
6
+
7
+ Scenario: Anonymous user cannot access a protected page
8
+ Given I am an anonymous user
9
+ When I go to "/account"
10
+ Then I should not be on the "/account" page
@@ -0,0 +1,16 @@
1
+ Feature: An example of testing for being on the homepage.
2
+ As an anonymous user,
3
+ I want to be able to navigate to the homepage
4
+ so that I can check the welcome message on the homepage.
5
+
6
+ Scenario: Ensure that you are on the homepage by using 'the' before the word 'homepage'.
7
+ Given I am on the homepage
8
+ Then I should see "Welcome to the homepage of the Varbase E2E Examples"
9
+
10
+ Scenario: Ensure that you are on the homepage without using 'the' before the word 'homepage'.
11
+ Given I am on homepage
12
+ Then I should see "Welcome to the homepage of the Varbase E2E Examples"
13
+
14
+ Scenario: Ensure that you are on the homepage without using 'the' before the word 'homepage' and using 'we' instead of 'I'.
15
+ Given we are on homepage
16
+ Then we should see "Welcome to the homepage of the Varbase E2E Examples"
@@ -0,0 +1,33 @@
1
+ Feature: Save screenshots to disk.
2
+ As a tester,
3
+ I want to capture screenshots at arbitrary points in my scenarios
4
+ so that I can review rendered pages and debug failures.
5
+
6
+ Background:
7
+ Given I am on homepage
8
+
9
+ Scenario: Save a screenshot at the current viewport size.
10
+ Then I save screenshot
11
+
12
+ Scenario: Save a full-page screenshot.
13
+ Then I save fullscreen screenshot
14
+
15
+ Scenario: Save a screenshot after resizing the viewport.
16
+ Then I save 1440 x 900 screenshot
17
+
18
+ Scenario: Save a full-page screenshot at a fixed viewport.
19
+ Then I save fullscreen 1200 x 800 screenshot
20
+
21
+ Scenario: Save a screenshot with an explicit filename.
22
+ Then I save screenshot with name "varbase-e2e-home.png"
23
+
24
+ Scenario: Save a full-page screenshot with an explicit filename.
25
+ Then I save fullscreen screenshot with name "varbase-e2e-home-full.png"
26
+
27
+ Scenario: Save a screenshot with filename tokens.
28
+ Then I save screenshot with name "{feature_file}_{step_line}_{datetime}.png"
29
+
30
+ @screenshots
31
+ Scenario: Auto-capture a screenshot after every step in a tagged scenario.
32
+ Given I am on "/about-us.html"
33
+ Then I should see "About Us"
@@ -0,0 +1,320 @@
1
+ Feature: Relative element positioning assertions and advanced selector system.
2
+ As a tester,
3
+ I want to assert that page components are positioned correctly relative to each other
4
+ and resolve elements via a named CSS/XPath selector registry
5
+ so that I can catch layout regressions without brittle pixel comparisons.
6
+
7
+ Background:
8
+ Given I am on homepage
9
+ And I define css selectors:
10
+ | heading | h1 |
11
+ | subline | h3 |
12
+ | list | ul |
13
+
14
+ # ---------------------------------------------------------------------------
15
+ # Breakpoints — cover all 7 configured sizes (pronoun variants too).
16
+ # ---------------------------------------------------------------------------
17
+ Scenario: Resize to xs breakpoint.
18
+ Given I am viewing the site on a xs screen
19
+ Then I see visible heading
20
+
21
+ Scenario: Resize to sm breakpoint.
22
+ Given I am viewing the site on a sm screen
23
+ Then I see visible heading
24
+
25
+ Scenario: Resize to md breakpoint.
26
+ Given I am viewing the site on a md device
27
+ Then I see visible heading
28
+
29
+ Scenario: Resize to lg breakpoint.
30
+ Given I am viewing the site on a lg screen
31
+ Then I see visible heading
32
+
33
+ Scenario: Resize to xl breakpoint (default).
34
+ Given I am viewing the site on a xl screen
35
+ Then I see visible heading
36
+
37
+ Scenario: Resize to xxl breakpoint.
38
+ Given I am viewing the site on a xxl screen
39
+ Then I see visible heading
40
+
41
+ Scenario: Resize to xxxl breakpoint using quoted name.
42
+ Given I am viewing the site on a "xxxl" screen
43
+ Then I see visible heading
44
+
45
+ Scenario: Resize using the "we are" pronoun variant.
46
+ Given we are viewing the site on a md screen
47
+ Then we see visible heading
48
+
49
+ Scenario: Resize using no pronoun at all.
50
+ Given viewing the site on a lg screen
51
+ Then I see visible heading
52
+
53
+ # ---------------------------------------------------------------------------
54
+ # Position assertions — above / below / left / right / inside / outside.
55
+ # ---------------------------------------------------------------------------
56
+ Scenario: Assert heading is above list.
57
+ Then I see heading above list
58
+
59
+ Scenario: Assert heading is above multiple targets.
60
+ Then I see heading above subline, list
61
+
62
+ Scenario: Assert list is below heading.
63
+ Then I see list below heading
64
+
65
+ Scenario: Assert chained above relations.
66
+ Then I see heading above subline
67
+ Then I see subline above list
68
+
69
+ Scenario: Assert heading is inside of body component.
70
+ Given I define css selectors:
71
+ | body | body |
72
+ Then I see heading inside of body
73
+
74
+ Scenario: Assert body outside of heading.
75
+ Given I define css selectors:
76
+ | body | body |
77
+ Then I see body outside of heading
78
+
79
+ Scenario: Pronoun variants on position assertions.
80
+ Then we see heading above list
81
+ Then see heading above list
82
+
83
+ # ---------------------------------------------------------------------------
84
+ # Visibility + hidden.
85
+ # ---------------------------------------------------------------------------
86
+ Scenario: Assert single component visible.
87
+ Then I see visible heading
88
+
89
+ Scenario: Assert multiple components visible.
90
+ Then I see visible heading, subline and list
91
+
92
+ Scenario: Assert hidden (don't see) with missing components.
93
+ Given I define css selectors:
94
+ | missing | #does-not-exist |
95
+ Then I don't see missing
96
+
97
+ Scenario: Pronoun variants on visibility.
98
+ Then we see visible heading
99
+ Then see visible heading
100
+
101
+ # ---------------------------------------------------------------------------
102
+ # Advanced selector registry — CSS + XPath.
103
+ # ---------------------------------------------------------------------------
104
+ Scenario: Register a named CSS selector at runtime.
105
+ When I add "page heading" selector for "h1" css selector
106
+ Then I see visible page heading
107
+
108
+ Scenario: Register a named XPath selector at runtime.
109
+ When I add "first heading" selector for "//h1[1]" xpath selector
110
+ Then I see visible first heading
111
+
112
+ Scenario: Register multiple selectors and use mix of components, css, xpath.
113
+ When I add "page heading" selector for "h1" css selector
114
+ And I add "third level" selector for "//h3[1]" xpath selector
115
+ Then I see visible page heading
116
+ And I see visible third level
117
+ And I see page heading above list
118
+
119
+ Scenario: Print registered CSS selectors.
120
+ When I add "page heading" selector for "h1" css selector
121
+ Then I print css selectors
122
+
123
+ Scenario: Print registered XPath selectors.
124
+ When I add "first heading" selector for "//h1[1]" xpath selector
125
+ Then I print xpath selectors
126
+
127
+ Scenario: Pronoun variants on selector registration.
128
+ When we add "nav item" selector for "nav a" css selector
129
+ And add "first para" selector for "//p[1]" xpath selector
130
+ Then we print css selectors
131
+ And we print xpath selectors
132
+
133
+ Scenario: Bulk define CSS selectors via data table.
134
+ Given I define css selectors:
135
+ | bulk heading | h1 |
136
+ | bulk subline | h3 |
137
+ | bulk list | ul |
138
+ Then I see visible bulk heading, bulk subline, bulk list
139
+ And I see bulk heading above bulk list
140
+
141
+ Scenario: Bulk define XPath selectors via data table.
142
+ Given I define xpath selectors:
143
+ | xp heading | //h1[1] |
144
+ | xp subline | //h3[1] |
145
+ | xp list | //ul[1] |
146
+ Then I see visible xp heading, xp subline, xp list
147
+ And I see xp heading above xp list
148
+
149
+ Scenario: Mix bulk CSS + bulk XPath in one scenario.
150
+ Given I define css selectors:
151
+ | mixed heading | h1 |
152
+ And I define xpath selectors:
153
+ | mixed first list | //ul[1] |
154
+ Then I see mixed heading above mixed first list
155
+
156
+ # ---------------------------------------------------------------------------
157
+ # Focus and text selection on input fields.
158
+ # ---------------------------------------------------------------------------
159
+ Scenario: Move focus to a field and assert focus.
160
+ Given I am on "/test--when--i-fill-in.html"
161
+ And I add "username" selector for "[name='username']" css selector
162
+ When I move focus to "username" field
163
+ Then I see username has focus
164
+
165
+ Scenario: Select all text in a field.
166
+ Given I am on "/test--when--i-fill-in.html"
167
+ And I add "username" selector for "[name='username']" css selector
168
+ And I fill in "username" with "varbase-e2e-tester"
169
+ When I select all text in "username" field
170
+ Then I see username has focus
171
+
172
+ Scenario: Select a character range in a field.
173
+ Given I am on "/test--when--i-fill-in.html"
174
+ And I fill in "username" with "varbase-e2e-tester"
175
+ When I select from 0 to 7 text in "username" field
176
+
177
+ Scenario: Select a substring inside a field.
178
+ Given I am on "/test--when--i-fill-in.html"
179
+ And I fill in "username" with "varbase-e2e-tester"
180
+ When I select "tester" text in "username" field
181
+
182
+ Scenario: Pronoun variants on focus + selection.
183
+ Given I am on "/test--when--i-fill-in.html"
184
+ And I fill in "username" with "varbase-e2e-tester"
185
+ When we move focus to "username" field
186
+ And we select all text in "username" field
187
+
188
+ # ---------------------------------------------------------------------------
189
+ # Click by named component.
190
+ # ---------------------------------------------------------------------------
191
+ Scenario: Click a registered component.
192
+ Given I define css selectors:
193
+ | first heading | h1 |
194
+ When I click first heading
195
+
196
+ Scenario: Click using "on" phrasing.
197
+ Given I define css selectors:
198
+ | first heading | h1 |
199
+ When I click on first heading
200
+
201
+ Scenario: Click pronoun variants.
202
+ Given I define css selectors:
203
+ | first heading | h1 |
204
+ When we click first heading
205
+ And click on first heading
206
+
207
+ # ---------------------------------------------------------------------------
208
+ # Advanced — selector file loading (JSON).
209
+ # ---------------------------------------------------------------------------
210
+ Scenario: Load selectors from a single JSON file.
211
+ When I add selectors from "homepage-selectors.json" file
212
+ Then I see visible homepage heading
213
+ And I see visible homepage first heading
214
+ And I print css selectors
215
+ And I print xpath selectors
216
+
217
+ Scenario: Load selectors from two JSON files (front-end + back-end).
218
+ When I add selectors from "front-end-selectors.json" file
219
+ And I add selectors from "back-end-selectors.json" file
220
+ Then I see visible page heading, admin heading
221
+ And I see visible first heading, admin first heading
222
+
223
+ Scenario: Loaded file selectors mix with components and inline registrations.
224
+ When I add selectors from "homepage-selectors.json" file
225
+ And I add "inline heading" selector for "h1" css selector
226
+ And I add "inline first heading" selector for "//h1[1]" xpath selector
227
+ Then I see visible homepage heading
228
+ And I see visible inline heading
229
+ And I see visible inline first heading
230
+ And I see heading above list
231
+ And I see homepage heading above list
232
+
233
+ # ---------------------------------------------------------------------------
234
+ # Advanced — resolver priority (components → css → xpath) with overrides.
235
+ # ---------------------------------------------------------------------------
236
+ Scenario: Component overrides a CSS registration of the same name.
237
+ When I add "shared" selector for "ul" css selector
238
+ And I define css selectors:
239
+ | shared | h1 |
240
+ Then I see visible shared
241
+ And I see shared above list
242
+
243
+ Scenario: CSS registration overrides a prior CSS registration of same name.
244
+ When I add "dynamic" selector for "h1" css selector
245
+ And I add "dynamic" selector for "ul" css selector
246
+ Then I see visible dynamic
247
+ And I see heading above dynamic
248
+
249
+ Scenario: XPath-only registration resolves via xpath= prefix.
250
+ When I add "first subline xp" selector for "//h3[1]" xpath selector
251
+ Then I see visible first subline xp
252
+
253
+ # ---------------------------------------------------------------------------
254
+ # Advanced — multi-subject, multi-target position dispatch.
255
+ # ---------------------------------------------------------------------------
256
+ Scenario: Multiple subjects, single target (above).
257
+ Then I see heading, subline above list
258
+
259
+ Scenario: Single subject, multiple targets with "and" + comma.
260
+ Then I see heading above subline, list
261
+
262
+ Scenario: Chain of position assertions covers layout order.
263
+ Then I see heading above subline, list
264
+ And I see subline above list
265
+ And I see list below subline, heading
266
+
267
+ # ---------------------------------------------------------------------------
268
+ # Advanced — inside / outside containment.
269
+ # ---------------------------------------------------------------------------
270
+ Scenario: Heading and list both inside body.
271
+ Given I define css selectors:
272
+ | body | body |
273
+ Then I see heading, list inside of body
274
+ And I see body outside of heading, list
275
+
276
+ # ---------------------------------------------------------------------------
277
+ # Advanced — "not over" negation (non-overlap).
278
+ # ---------------------------------------------------------------------------
279
+ Scenario: Block-level neighbours do not overlap.
280
+ Then I see heading not over list
281
+
282
+ # ---------------------------------------------------------------------------
283
+ # Advanced — breakpoint resize then layout reassert.
284
+ # ---------------------------------------------------------------------------
285
+ Scenario: After switching to xs, layout order still holds.
286
+ Given I am viewing the site on a xs screen
287
+ Then I see visible heading, subline, list
288
+ And I see heading above list
289
+
290
+ Scenario: Switch through multiple breakpoints in one scenario.
291
+ Given I am viewing the site on a xs screen
292
+ Then I see visible heading
293
+ Given I am viewing the site on a md screen
294
+ Then I see visible heading
295
+ Given I am viewing the site on a xl screen
296
+ Then I see visible heading
297
+ And I see heading above list
298
+ Given I am viewing the site on a xxxl screen
299
+ Then I see visible heading
300
+
301
+ # ---------------------------------------------------------------------------
302
+ # Advanced — click via xpath-registered selector.
303
+ # ---------------------------------------------------------------------------
304
+ Scenario: Click via an XPath-registered selector.
305
+ When I add "first heading xp" selector for "//h1[1]" xpath selector
306
+ And I click first heading xp
307
+
308
+ # ---------------------------------------------------------------------------
309
+ # Advanced — full input-field workflow (focus → select → re-fill).
310
+ # ---------------------------------------------------------------------------
311
+ Scenario: End-to-end field workflow — focus, select all, refill, partial select.
312
+ Given I am on "/test--when--i-fill-in.html"
313
+ And I add "username" selector for "[name='username']" css selector
314
+ And I fill in "username" with "varbase-e2e-initial"
315
+ When I move focus to "username" field
316
+ Then I see username has focus
317
+ When I select all text in "username" field
318
+ And I fill in "username" with "varbase-e2e-replacement-value"
319
+ And I select from 0 to 7 text in "username" field
320
+ And I select "replacement" text in "username" field
@@ -0,0 +1,13 @@
1
+ Feature: An example to ensure that the input text does not contain a specific value based on its attribute
2
+ As a tester,
3
+ I want to ensure that the textbox does not contain a specific value based on its attributes.
4
+
5
+ Scenario: Ensuring that a textbox does not contain a specific value based on its attributes.
6
+ Given I am on "/test--then--i-should--not--see-text-in-element.html"
7
+ When I fill in "Username" with "user1"
8
+ And I fill in "Password" with "1234"
9
+ Then I should see "user1" in the "Username" element
10
+ When I fill in "uname" with: by attr
11
+ And I fill in "Password" with:
12
+ Then I should not see "user1" in the "Username" element
13
+ And I should not see "1234" in the "pword" element by attr
@@ -0,0 +1,10 @@
1
+ Feature: An example to ensure that the input text contain a specific value based on its attribute
2
+ As a tester,
3
+ I want to ensure that the textbox contain a specific value based on its attributes.
4
+
5
+ Scenario: Ensuring that a textbox contain a specific value based on its attributes.
6
+ Given I am on "/test--then--i-should--not--see-text-in-element.html"
7
+ When I fill in "Username" with "user1"
8
+ And I fill in "Password" with "1234"
9
+ Then I should see "user1" in the "uname" element by its "id" attr
10
+ And I should see "1234" in the "pwordcss" element by attr
@@ -0,0 +1,10 @@
1
+ Feature: An example to ensure that the input text contain a specific value based on its label
2
+ As a tester,
3
+ I want to ensure thlabelat the textbox does not contain a specific value based on its label
4
+
5
+ Scenario: Ensuring that a textbox does not contain a specific value based on its label.
6
+ Given I am on "/test--then--i-should--not--see-text-in-element.html"
7
+ When I fill in "Username" with "user1"
8
+ And I fill in "Password" with "1234"
9
+ Then I should see "user1" in the "Username" element
10
+ And I should see "1234" in the "Password" element
@@ -0,0 +1,13 @@
1
+ Feature: An example of ensuring that a pattern matches the text in a specific element
2
+ As a developer,
3
+ I want to ensure that a pattern matches the text in a specific element.
4
+
5
+ Scenario: Ensuring that the text in an element matches the 12-hour time format pattern
6
+ Given I am on "/test--then--i-should--see-text-matching-pattern.html"
7
+ And I wait max of 3 seconds
8
+ Then I should see text matching "(((0[1-9])|(1[0-2])):([0-5])(0|5)\s(A|P|a|p)(M|m))" in the ".time" element
9
+
10
+ Scenario: Ensuring that the text in an element matches the DD/MM/YYYY or DD-MM-YYYY date format pattern
11
+ Given I am on "/test--then--i-should--see-text-matching-pattern.html"
12
+ And I wait max of 3 seconds
13
+ Then I should see text matching "(0?[1-9]|[12][0-9]|3[01])[\/\-](0?[1-9]|1[012])[\/\-]\d{4}" in the "#date" element
@@ -0,0 +1,18 @@
1
+ Feature: An example of ensuring that a pattern matches the text on a specific page.
2
+ As a developer,
3
+ I want to ensure that a pattern matches the text in a specific page.
4
+
5
+ Scenario: Ensure that there is a text matching the pattern of text starting with 'T' on a specific page
6
+ Given I am on "/test--then--i-should--see-text-matching-pattern.html"
7
+ And I wait max of 3 seconds
8
+ Then I should see text matching "^T\w+"
9
+
10
+ Scenario: Ensure that there is no text matching the pattern of text starting with 'O' on a specific page
11
+ Given I am on "/test--then--i-should--see-text-matching-pattern.html"
12
+ And I wait max of 3 seconds
13
+ Then I should not see text matching "^O\w+"
14
+
15
+ Scenario: Ensure that there is text matching the email pattern on a specific page
16
+ Given I am on "/test--then--i-should--see-text-matching-pattern.html"
17
+ And I wait max of 3 seconds
18
+ Then I should see text matching "[a-z0-9]+@[a-z]+\.[a-z]{2,3}"