@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,217 @@
1
+ # Links steps
2
+
3
+ 9 steps, defined in `tests/step-definitions/link.steps.js`.
4
+
5
+ Cucumber-js loads every `*.steps.js` in that directory automatically — you never `require()` a step file from a feature.
6
+
7
+ | # | Step |
8
+ | --- | --- |
9
+ | 1 | `Then the link "About" with the href "/about" should exist` |
10
+ | 2 | `Then the link "Home" with the href "/" within the element "#main-nav" should exist` |
11
+ | 3 | `Then the link "Sign in" with the href "/login" should not exist` |
12
+ | 4 | `Then the link "Logout" with the href "/logout" within the element ".guest-nav" should not exist` |
13
+ | 5 | `Then the link with the title "Open menu" should exist` |
14
+ | 6 | `Then the link with the title "Delete user" should not exist` |
15
+ | 7 | `Then the link "Twitter" should be an absolute link` |
16
+ | 8 | `Then the link "Home" should not be an absolute link` |
17
+ | 9 | `When I click on the link with the title "Open menu"` |
18
+
19
+ ---
20
+
21
+ ## 1. Then the link "About" with the href "/about" should exist
22
+
23
+ Assert a link with the given visible text and an href containing a fragment exists.
24
+
25
+ **Keyword**: `Then`
26
+
27
+ **Pattern**
28
+
29
+ ```js
30
+ 'the link {string} with the href {string} should exist'
31
+ ```
32
+
33
+ **Examples**
34
+
35
+ ```gherkin
36
+ Then the link "About" with the href "/about" should exist
37
+ Then the link "Sign in" with the href "/login" should exist
38
+ And the link "Pricing" with the href "/pricing" should exist
39
+ Then the link "Docs" with the href "docs.example.com" should exist
40
+ Then the link "Contact" with the href "/contact-us" should exist
41
+ ```
42
+
43
+ ## 2. Then the link "Home" with the href "/" within the element "#main-nav" should exist
44
+
45
+ Assert a link exists inside a specific parent element.
46
+
47
+ **Keyword**: `Then`
48
+
49
+ **Pattern**
50
+
51
+ ```js
52
+ 'the link {string} with the href {string} within the element {string} should exist'
53
+ ```
54
+
55
+ **Examples**
56
+
57
+ ```gherkin
58
+ Then the link "Home" with the href "/" within the element "#main-nav" should exist
59
+ Then the link "Privacy" with the href "/privacy" within the element "footer" should exist
60
+ And the link "Sign in" with the href "/login" within the element ".header" should exist
61
+ Then the link "Docs" with the href "/docs" within the element "nav" should exist
62
+ Then the link "Pricing" with the href "/pricing" within the element ".cta-block" should exist
63
+ ```
64
+
65
+ ## 3. Then the link "Sign in" with the href "/login" should not exist
66
+
67
+ Assert NO link with the given visible text and href fragment exists.
68
+
69
+ **Keyword**: `Then`
70
+
71
+ **Pattern**
72
+
73
+ ```js
74
+ 'the link {string} with the href {string} should not exist'
75
+ ```
76
+
77
+ **Examples**
78
+
79
+ ```gherkin
80
+ Then the link "Sign in" with the href "/login" should not exist
81
+ Then the link "Admin" with the href "/admin" should not exist
82
+ And the link "Old docs" with the href "/v1/docs" should not exist
83
+ Then the link "Logout" with the href "/logout" should not exist
84
+ Then the link "Beta" with the href "/beta" should not exist
85
+ ```
86
+
87
+ ## 4. Then the link "Logout" with the href "/logout" within the element ".guest-nav" should not exist
88
+
89
+ Assert NO link with text+href exists inside a specific parent element.
90
+
91
+ **Keyword**: `Then`
92
+
93
+ **Pattern**
94
+
95
+ ```js
96
+ 'the link {string} with the href {string} within the element {string} should not exist'
97
+ ```
98
+
99
+ **Examples**
100
+
101
+ ```gherkin
102
+ Then the link "Logout" with the href "/logout" within the element ".guest-nav" should not exist
103
+ Then the link "Admin" with the href "/admin" within the element "footer" should not exist
104
+ And the link "Beta" with the href "/beta" within the element "#main-nav" should not exist
105
+ Then the link "Old" with the href "/v1" within the element ".breadcrumb" should not exist
106
+ Then the link "Internal" with the href "/internal" within the element ".public-nav" should not exist
107
+ ```
108
+
109
+ ## 5. Then the link with the title "Open menu" should exist
110
+
111
+ Assert at least one link has the exact `title` attribute.
112
+
113
+ **Keyword**: `Then`
114
+
115
+ **Pattern**
116
+
117
+ ```js
118
+ 'the link with the title {string} should exist'
119
+ ```
120
+
121
+ **Examples**
122
+
123
+ ```gherkin
124
+ Then the link with the title "Open menu" should exist
125
+ Then the link with the title "Edit profile" should exist
126
+ And the link with the title "Download PDF" should exist
127
+ Then the link with the title "Print page" should exist
128
+ Then the link with the title "Sign in" should exist
129
+ ```
130
+
131
+ ## 6. Then the link with the title "Delete user" should not exist
132
+
133
+ Assert NO link has the given exact `title` attribute.
134
+
135
+ **Keyword**: `Then`
136
+
137
+ **Pattern**
138
+
139
+ ```js
140
+ 'the link with the title {string} should not exist'
141
+ ```
142
+
143
+ **Examples**
144
+
145
+ ```gherkin
146
+ Then the link with the title "Delete user" should not exist
147
+ Then the link with the title "Open admin" should not exist
148
+ And the link with the title "Edit billing" should not exist
149
+ Then the link with the title "Sign out" should not exist
150
+ Then the link with the title "Reveal secret" should not exist
151
+ ```
152
+
153
+ ## 7. Then the link "Twitter" should be an absolute link
154
+
155
+ Assert a link's href is absolute (starts with `http://` or `https://`).
156
+
157
+ **Keyword**: `Then`
158
+
159
+ **Pattern**
160
+
161
+ ```js
162
+ 'the link {string} should be an absolute link'
163
+ ```
164
+
165
+ **Examples**
166
+
167
+ ```gherkin
168
+ Then the link "Twitter" should be an absolute link
169
+ Then the link "GitHub" should be an absolute link
170
+ And the link "Documentation" should be an absolute link
171
+ Then the link "Status page" should be an absolute link
172
+ Then the link "External docs" should be an absolute link
173
+ ```
174
+
175
+ ## 8. Then the link "Home" should not be an absolute link
176
+
177
+ Assert a link's href is relative (no `http://` / `https://` scheme).
178
+
179
+ **Keyword**: `Then`
180
+
181
+ **Pattern**
182
+
183
+ ```js
184
+ 'the link {string} should not be an absolute link'
185
+ ```
186
+
187
+ **Examples**
188
+
189
+ ```gherkin
190
+ Then the link "Home" should not be an absolute link
191
+ Then the link "About" should not be an absolute link
192
+ And the link "Privacy" should not be an absolute link
193
+ Then the link "Pricing" should not be an absolute link
194
+ Then the link "Docs" should not be an absolute link
195
+ ```
196
+
197
+ ## 9. When I click on the link with the title "Open menu"
198
+
199
+ Click a link addressed by its `title` attribute.
200
+
201
+ **Keyword**: `When`
202
+
203
+ **Pattern**
204
+
205
+ ```js
206
+ /^(I |we )*click on the link with the title "([^"]*)"$/
207
+ ```
208
+
209
+ **Examples**
210
+
211
+ ```gherkin
212
+ When I click on the link with the title "Open menu"
213
+ When I click on the link with the title "Edit profile"
214
+ And we click on the link with the title "Download PDF"
215
+ When I click on the link with the title "Print page"
216
+ When I click on the link with the title "Sign in"
217
+ ```
@@ -0,0 +1,99 @@
1
+ # Meta tags steps
2
+
3
+ 3 steps, defined in `tests/step-definitions/metatag.steps.js`.
4
+
5
+ Cucumber-js loads every `*.steps.js` in that directory automatically — you never `require()` a step file from a feature.
6
+
7
+ | # | Step |
8
+ | --- | --- |
9
+ | 1 | `Then the meta tag should exist with the following attributes:` |
10
+ | 2 | `Then the meta tag should not exist with the following attributes:` |
11
+ | 3 | `Then the "description" meta tag should not contain any HTML tags` |
12
+
13
+ ---
14
+
15
+ ## 1. Then the meta tag should exist with the following attributes:
16
+
17
+ Assert at least one `<meta>` tag matches every attribute in the data table.
18
+
19
+ **Keyword**: `Then`
20
+
21
+ **Pattern**
22
+
23
+ ```js
24
+ 'the meta tag should exist with the following attributes:'
25
+ ```
26
+
27
+ **Examples**
28
+
29
+ ```gherkin
30
+ Then the meta tag should exist with the following attributes:
31
+ | name | description |
32
+ | content | Documentation site |
33
+ Then the meta tag should exist with the following attributes:
34
+ | property | og:title |
35
+ | content | Home |
36
+ And the meta tag should exist with the following attributes:
37
+ | name | viewport |
38
+ | content | width=device-width, initial-scale=1 |
39
+ Then the meta tag should exist with the following attributes:
40
+ | name | robots |
41
+ | content | noindex,nofollow |
42
+ Then the meta tag should exist with the following attributes:
43
+ | charset | UTF-8 |
44
+ ```
45
+
46
+ ## 2. Then the meta tag should not exist with the following attributes:
47
+
48
+ Assert NO `<meta>` tag matches every attribute in the data table.
49
+
50
+ **Keyword**: `Then`
51
+
52
+ **Pattern**
53
+
54
+ ```js
55
+ 'the meta tag should not exist with the following attributes:'
56
+ ```
57
+
58
+ **Examples**
59
+
60
+ ```gherkin
61
+ Then the meta tag should not exist with the following attributes:
62
+ | name | description |
63
+ | content | Coming soon |
64
+ Then the meta tag should not exist with the following attributes:
65
+ | name | robots |
66
+ | content | noindex |
67
+ And the meta tag should not exist with the following attributes:
68
+ | property | og:title |
69
+ | content | Placeholder |
70
+ Then the meta tag should not exist with the following attributes:
71
+ | http-equiv | refresh |
72
+ | content | 5 |
73
+ Then the meta tag should not exist with the following attributes:
74
+ | name | author |
75
+ | content | Anonymous |
76
+ ```
77
+
78
+ ## 3. Then the "description" meta tag should not contain any HTML tags
79
+
80
+ Assert the `content` attribute of a named meta tag contains no HTML markup.
81
+ Useful for description / open-graph fields that should render as plain text.
82
+
83
+ **Keyword**: `Then`
84
+
85
+ **Pattern**
86
+
87
+ ```js
88
+ 'the {string} meta tag should not contain any HTML tags'
89
+ ```
90
+
91
+ **Examples**
92
+
93
+ ```gherkin
94
+ Then the "description" meta tag should not contain any HTML tags
95
+ Then the "og:title" meta tag should not contain any HTML tags
96
+ And the "twitter:description" meta tag should not contain any HTML tags
97
+ Then the "keywords" meta tag should not contain any HTML tags
98
+ Then the "author" meta tag should not contain any HTML tags
99
+ ```
@@ -0,0 +1,232 @@
1
+ # Modals steps
2
+
3
+ 9 steps, defined in `tests/step-definitions/modal.steps.js`.
4
+
5
+ Cucumber-js loads every `*.steps.js` in that directory automatically — you never `require()` a step file from a feature.
6
+
7
+ | # | Step |
8
+ | --- | --- |
9
+ | 1 | `Then I should see a modal` |
10
+ | 2 | `Then I should see a modal with title "Confirm Action"` |
11
+ | 3 | `Then I should see a "confirmation-modal" modal` |
12
+ | 4 | `Then I should see "Are you sure?" in the modal` |
13
+ | 5 | `Then the modal should contain "Welcome modal text"` |
14
+ | 6 | `Then the modal should not contain "Goodbye"` |
15
+ | 7 | `When I click "Confirm" in the modal` |
16
+ | 8 | `When I click on "#close-btn" in the modal` |
17
+ | 9 | `When I close the modal` |
18
+
19
+ ---
20
+
21
+ ## 1. Then I should see a modal
22
+
23
+ Assert that a modal dialog is visible or not visible on the page.
24
+
25
+ **Keyword**: `Then`
26
+
27
+ **Pattern**
28
+
29
+ ```js
30
+ /^(I |we )*should( not)* see (a |the )*modal( dialog)*$/
31
+ ```
32
+
33
+ **Examples**
34
+
35
+ ```gherkin
36
+ Then I should see a modal
37
+ Then I should see the modal
38
+ Then we should see a modal dialog
39
+ Then I should not see a modal
40
+ Then I should not see the modal dialog
41
+ ```
42
+
43
+ ## 2. Then I should see a modal with title "Confirm Action"
44
+
45
+ Assert that a modal dialog with a given title is visible or not visible.
46
+
47
+ **Keyword**: `Then`
48
+
49
+ **Pattern**
50
+
51
+ ```js
52
+ /^(I |we )*should( not)* see (a |the )*modal with title "([^"]*)?"$/
53
+ ```
54
+
55
+ **Examples**
56
+
57
+ ```gherkin
58
+ Then I should see a modal with title "Confirm Action"
59
+ Then I should see the modal with title "Welcome"
60
+ Then we should see a modal with title "Welcome Message"
61
+ Then I should not see a modal with title "Error"
62
+ Then I should not see the modal with title "Validation Error"
63
+ ```
64
+
65
+ ## 3. Then I should see a "confirmation-modal" modal
66
+
67
+ Assert that a specific modal by id/class/data-modal is visible or not.
68
+
69
+ **Keyword**: `Then`
70
+
71
+ **Pattern**
72
+
73
+ ```js
74
+ /^(I |we )*should( not)* see (a |the )*"([^"]*)?" modal$/
75
+ ```
76
+
77
+ **Examples**
78
+
79
+ ```gherkin
80
+ Then I should see a "confirmation-modal" modal
81
+ Then I should see the "#delete-modal" modal
82
+ Then we should see a "settings-modal" modal
83
+ Then I should not see a "error-modal" modal
84
+ Then I should not see the "#success-modal" modal
85
+ ```
86
+
87
+ ## 4. Then I should see "Are you sure?" in the modal
88
+
89
+ Assert that a modal contains or does not contain specific text.
90
+
91
+ **Keyword**: `Then`
92
+
93
+ **Pattern**
94
+
95
+ ```js
96
+ /^(I |we )*should( not)* see "([^"]*)?" in( the)* modal( dialog)*$/
97
+ ```
98
+
99
+ **Examples**
100
+
101
+ ```gherkin
102
+ Then I should see "Are you sure?" in the modal
103
+ Then I should see "Delete this item" in the modal
104
+ Then we should see "Confirmation required" in the modal dialog
105
+ Then I should not see "Error occurred" in the modal
106
+ ```
107
+
108
+ ## 5. Then the modal should contain "Welcome modal text"
109
+
110
+ Assert that the modal contains the given text (alternate phrasing).
111
+
112
+ Distinct from "I should see :text in the modal" — checks plain
113
+ `innerText`, ignoring nested layout. Use when the text is part of the
114
+ modal body rather than a specific element.
115
+
116
+ **Keyword**: `Then`
117
+
118
+ **Pattern**
119
+
120
+ ```js
121
+ 'the modal should contain {string}'
122
+ ```
123
+
124
+ **Examples**
125
+
126
+ ```gherkin
127
+ Then the modal should contain "Welcome modal text"
128
+ Then the modal should contain "Are you sure"
129
+ And the modal should contain "Order #1234"
130
+ When I press "Show details"
131
+ Then the modal should contain "Address"
132
+ Given I am on "/dashboard"
133
+ When I click "Open settings"
134
+ And I wait for the modal to appear
135
+ Then the modal should contain "Preferences"
136
+ ```
137
+
138
+ ## 6. Then the modal should not contain "Goodbye"
139
+
140
+ Assert that the modal does NOT contain the given text.
141
+
142
+ Passes when no modal exists OR when the modal exists but lacks the text.
143
+
144
+ **Keyword**: `Then`
145
+
146
+ **Pattern**
147
+
148
+ ```js
149
+ 'the modal should not contain {string}'
150
+ ```
151
+
152
+ **Examples**
153
+
154
+ ```gherkin
155
+ Then the modal should not contain "Goodbye"
156
+ Then the modal should not contain "Error"
157
+ And the modal should not contain "Payment failed"
158
+ When I close the modal
159
+ Then the modal should not contain "Welcome"
160
+ When I press "Refresh"
161
+ Then the modal should not contain "Loading"
162
+ ```
163
+
164
+ ## 7. When I click "Confirm" in the modal
165
+
166
+ Click a button or link inside a modal dialog by its visible text.
167
+
168
+ **Keyword**: `When`
169
+
170
+ **Pattern**
171
+
172
+ ```js
173
+ /^(I |we )*click "([^"]*)?"( button)* in( the)* modal( dialog)*$/
174
+ ```
175
+
176
+ **Examples**
177
+
178
+ ```gherkin
179
+ When I click "Confirm" in the modal
180
+ When I click "Cancel" in the modal dialog
181
+ When we click "OK" button in the modal
182
+ And I click "Close" in the modal
183
+ ```
184
+
185
+ ## 8. When I click on "#close-btn" in the modal
186
+
187
+ Click a CSS-selector-addressed element inside the active modal.
188
+
189
+ Distinct from "click :text in the modal" which uses visible button text.
190
+ Use this variant when the target lacks readable text (icon button) or
191
+ when text is ambiguous across multiple buttons in the modal.
192
+
193
+ **Keyword**: `When`
194
+
195
+ **Pattern**
196
+
197
+ ```js
198
+ /^(I |we )*click on "([^"]*)" in the modal$/
199
+ ```
200
+
201
+ **Examples**
202
+
203
+ ```gherkin
204
+ When I click on "#close-btn" in the modal
205
+ When I click on ".confirm-delete" in the modal
206
+ And I click on "[data-testid=accept]" in the modal
207
+ When I click on "button[aria-label=Close]" in the modal
208
+ When I press "Open settings"
209
+ And I wait for the modal to appear
210
+ Then I click on "#tab-notifications" in the modal
211
+ ```
212
+
213
+ ## 9. When I close the modal
214
+
215
+ Close or dismiss a modal dialog (uses close button, or Escape fallback).
216
+
217
+ **Keyword**: `When`
218
+
219
+ **Pattern**
220
+
221
+ ```js
222
+ /^(I |we )*(close|dismiss)( the)* modal( dialog)*$/
223
+ ```
224
+
225
+ **Examples**
226
+
227
+ ```gherkin
228
+ When I close the modal
229
+ When I dismiss the modal dialog
230
+ When we close the modal
231
+ And I dismiss the modal
232
+ ```