@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,391 @@
1
+ # Varbase steps
2
+
3
+ 14 steps, defined in `tests/step-definitions/varbase.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 | `Given I am a logged in user with the "webmaster" user` |
10
+ | 2 | `When I fill in the international phone field with "+14155552671"` |
11
+ | 3 | `When I go to the default theme settings page` |
12
+ | 4 | `When I enable the sticky header theme setting` |
13
+ | 5 | `When I warm up "/" at all testing breakpoints` |
14
+ | 6 | `When I click next button in tour` |
15
+ | 7 | `When I close the tour` |
16
+ | 8 | `Then I should see the accessibility checker` |
17
+ | 9 | `When I close the accessibility checker` |
18
+ | 10 | `Then the page should have a working header` |
19
+ | 11 | `Then the page should have a working footer` |
20
+ | 12 | `When I press the "desktop" responsive preview device button` |
21
+ | 13 | `Then the "site header" should be sticky` |
22
+ | 14 | `Then the "site header" should have the "scrolled" class within 5 seconds` |
23
+
24
+ ---
25
+
26
+ ## 1. Given I am a logged in user with the "webmaster" user
27
+
28
+ Authenticate a Varbase user defined in cucumber.js worldParameters.users.
29
+
30
+ **Keyword**: `Given`
31
+
32
+ **Pattern**
33
+
34
+ ```js
35
+ /^I am a logged in user with( the)*( username)* "([^"]*)?"( user)*$/
36
+ ```
37
+
38
+ **Examples**
39
+
40
+ ```gherkin
41
+ Given I am a logged in user with the "webmaster" user
42
+ Given I am a logged in user with the "Content admin" user
43
+ Given I am a logged in user with the username "editor"
44
+ Given I am a logged in user with "admin"
45
+ And I am a logged in user with the "webmaster" user
46
+ ```
47
+
48
+ ## 2. When I fill in the international phone field with "+14155552671"
49
+
50
+ Fill an international telephone field (Webform `tel` element with
51
+ `#international`, rendered by the intl-tel-input library). Setting the raw
52
+ value with a plain "fill in" step is not enough: intl-tel-input validates
53
+ the number with libphonenumber and rejects anything it cannot parse, so the
54
+ webform's clientside/serverside validation fails. This step drives the
55
+ intl-tel-input instance itself (`setNumber`) and dispatches input/blur so
56
+ both the widget and the webform see a valid, formatted number.
57
+
58
+ Pass the number in E.164 form (e.g. "+14155552671") for deterministic
59
+ results regardless of the field's selected country.
60
+
61
+ **Keyword**: `When`
62
+
63
+ **Pattern**
64
+
65
+ ```js
66
+ /^(?:I |we )*fill in the international phone (?:field|number)(?: "[^"]*")? with "([^"]*)"$/
67
+ ```
68
+
69
+ **Examples**
70
+
71
+ ```gherkin
72
+ When I fill in the international phone field with "+14155552671"
73
+ And I fill in the international phone number with "+442071838750"
74
+ When we fill in the international phone field with "+14155552671"
75
+ And I fill in the international phone field "Phone" with "+14155552671"
76
+ Given I fill in the international phone number with "+12025550143"
77
+ ```
78
+
79
+ ## 3. When I go to the default theme settings page
80
+
81
+ Go to the default theme's settings page, resolved by machine name (not
82
+ hard-coded), so the test works whatever the default theme is.
83
+
84
+ **Keyword**: `When`
85
+
86
+ **Pattern**
87
+
88
+ ```js
89
+ /^(?:I |we )*go to the default theme settings(?: page)?$/
90
+ ```
91
+
92
+ **Examples**
93
+
94
+ ```gherkin
95
+ When I go to the default theme settings page
96
+ And I go to the default theme settings
97
+ When we go to the default theme settings page
98
+ And we go to the default theme settings
99
+ Given I go to the default theme settings page
100
+ ```
101
+
102
+ ## 4. When I enable the sticky header theme setting
103
+
104
+ Enable or disable the default theme's "Sticky header" setting and save.
105
+ The Gin-styled checkbox is visually hidden, so it is toggled in-page. Opens
106
+ the default theme's settings form, sets the checkbox, and submits.
107
+
108
+ Run a login step first (e.g. the webmaster).
109
+
110
+ **Keyword**: `When`
111
+
112
+ **Pattern**
113
+
114
+ ```js
115
+ /^(?:I |we )*(enable|disable) the sticky header theme setting$/
116
+ ```
117
+
118
+ **Examples**
119
+
120
+ ```gherkin
121
+ When I enable the sticky header theme setting
122
+ And I disable the sticky header theme setting
123
+ When we enable the sticky header theme setting
124
+ And we disable the sticky header theme setting
125
+ Given I enable the sticky header theme setting
126
+ ```
127
+
128
+ ## 5. When I warm up "/" at all testing breakpoints
129
+
130
+ Warm up a page across every viewport breakpoint in the testing settings.
131
+
132
+ The default theme renders responsive images via drimage_improved, which builds
133
+ a different WebP derivative per rendered width. This visits the page once at
134
+ each breakpoint from worldParameters.selectors.breakpoints (scrolling to the
135
+ bottom to trigger lazy images) so every derivative is generated and cached to
136
+ disk before the health checks assert on console errors. It makes no
137
+ assertions; it only primes the cache.
138
+
139
+ **Keyword**: `When`
140
+
141
+ **Pattern**
142
+
143
+ ```js
144
+ /^(?:I |we )*warm up "([^"]*)" at all testing breakpoints$/
145
+ ```
146
+
147
+ **Examples**
148
+
149
+ ```gherkin
150
+ When I warm up "/" at all testing breakpoints
151
+ And I warm up "/features" at all testing breakpoints
152
+ When we warm up "/blog" at all testing breakpoints
153
+ And I warm up "/contact-us" at all testing breakpoints
154
+ Given I warm up "/about-varbase" at all testing breakpoints
155
+ ```
156
+
157
+ ## 6. When I click next button in tour
158
+
159
+ Click the "Next" button in the Varbase / Drupal Shepherd tour.
160
+
161
+ Ports VarbaseContext::iClickNextInTour. The tour button lives in a
162
+ shadow/overlay dialog; click it via an in-page native click after scrolling
163
+ it into view.
164
+
165
+ **Keyword**: `When`
166
+
167
+ **Pattern**
168
+
169
+ ```js
170
+ /^(?:I |we )*click next button in tour$/
171
+ ```
172
+
173
+ **Examples**
174
+
175
+ ```gherkin
176
+ When I click next button in tour
177
+ And I click next button in tour
178
+ When we click next button in tour
179
+ Given I click next button in tour
180
+ And we click next button in tour
181
+ ```
182
+
183
+ ## 7. When I close the tour
184
+
185
+ Close the Varbase / Drupal Shepherd tour.
186
+
187
+ Ports VarbaseContext::iCloseTour: tries the cancel/close control, then falls
188
+ back to dispatching Escape.
189
+
190
+ **Keyword**: `When`
191
+
192
+ **Pattern**
193
+
194
+ ```js
195
+ /^(?:I |we )*close the tour$/
196
+ ```
197
+
198
+ **Examples**
199
+
200
+ ```gherkin
201
+ When I close the tour
202
+ And I close the tour
203
+ When we close the tour
204
+ Given I close the tour
205
+ And we close the tour
206
+ ```
207
+
208
+ ## 8. Then I should see the accessibility checker
209
+
210
+ Assert the Editoria11y accessibility checker panel is (or is not) present.
211
+
212
+ Ports VarbaseContext::iShouldSeeTheAccessibilityChecker /
213
+ iShouldNotSeeTheAccessibilityChecker. The checker mounts an
214
+ <ed11y-element-panel> custom element.
215
+
216
+ **Keyword**: `Then`
217
+
218
+ **Pattern**
219
+
220
+ ```js
221
+ /^(?:I |we )*should( not)? see (?:the )?(?:accessibility |a11y )?checker$/
222
+ ```
223
+
224
+ **Examples**
225
+
226
+ ```gherkin
227
+ Then I should see the accessibility checker
228
+ And I should see the a11y checker
229
+ Then should see a11y checker
230
+ And I should not see the accessibility checker
231
+ Then should not see a11y checker
232
+ ```
233
+
234
+ ## 9. When I close the accessibility checker
235
+
236
+ Close the Editoria11y accessibility checker to clear space for more actions.
237
+
238
+ Ports VarbaseContext::iCloseTheAccessibilityChecker: toggles the panel via
239
+ its shadow-root toggle button.
240
+
241
+ **Keyword**: `When`
242
+
243
+ **Pattern**
244
+
245
+ ```js
246
+ /^(?:I |we )*close (?:the )?(?:accessibility |a11y )?checker$/
247
+ ```
248
+
249
+ **Examples**
250
+
251
+ ```gherkin
252
+ When I close the accessibility checker
253
+ And I close the a11y checker
254
+ When we close the accessibility checker
255
+ Given I close the a11y checker
256
+ And we close the accessibility checker
257
+ ```
258
+
259
+ ## 10. Then the page should have a working header
260
+
261
+ Verify the page header is "working".
262
+
263
+ On a Varbase site the Main navigation menu is rendered through the Drupal
264
+ Canvas global Header region, so a working header means those primary links
265
+ are present. Alter the links below to match your own site's main menu.
266
+
267
+ Example: Then the page should have a working header
268
+
269
+ **Keyword**: `Then`
270
+
271
+ **Pattern**
272
+
273
+ ```js
274
+ /^(?:the page should have|(?:I |we )*should have) a working header$/
275
+ ```
276
+
277
+ **Examples**
278
+
279
+ ```gherkin
280
+ Then the page should have a working header
281
+ And I should have a working header
282
+ Then I should have a working header
283
+ And we should have a working header
284
+ Then the page should have a working header
285
+ ```
286
+
287
+ ## 11. Then the page should have a working footer
288
+
289
+ Verify the page footer is "working".
290
+
291
+ On a Varbase site the Secondary, Footer and Social media menus are rendered
292
+ through the Drupal Canvas global Footer region. A working footer means the
293
+ footer link text is present, the social profiles are linked, and the credits
294
+ and logos show. Alter the lines below to match your own site.
295
+
296
+ Example: Then the page should have a working footer
297
+
298
+ **Keyword**: `Then`
299
+
300
+ **Pattern**
301
+
302
+ ```js
303
+ /^(?:the page should have|(?:I |we )*should have) a working footer$/
304
+ ```
305
+
306
+ **Examples**
307
+
308
+ ```gherkin
309
+ Then the page should have a working footer
310
+ And I should have a working footer
311
+ Then I should have a working footer
312
+ And we should have a working footer
313
+ Then the page should have a working footer
314
+ ```
315
+
316
+ ## 12. When I press the "desktop" responsive preview device button
317
+
318
+ Press a responsive-preview device button (Drupal core Responsive preview).
319
+
320
+ Ports VarbaseContext::iPressResponsivePreviewDeviceButton: clicks the control
321
+ carrying data-responsive-preview-name.
322
+
323
+ **Keyword**: `When`
324
+
325
+ **Pattern**
326
+
327
+ ```js
328
+ /^(?:I |we )*press the "([^"]*)" responsive preview device button$/
329
+ ```
330
+
331
+ **Examples**
332
+
333
+ ```gherkin
334
+ When I press the "desktop" responsive preview device button
335
+ And I press the "mobile" responsive preview device button
336
+ When we press the "tablet" responsive preview device button
337
+ And I press the "widescreen" responsive preview device button
338
+ When I press the "mobile" responsive preview device button
339
+ ```
340
+
341
+ ## 13. Then the "site header" should be sticky
342
+
343
+ Assert an element renders as a sticky element (CSS position: sticky).
344
+
345
+ Resolves a named selector from the registry (falling back to a raw CSS
346
+ selector) and checks its computed position. Reads better in a feature than
347
+ asserting on a raw "position:sticky;" CSS property string.
348
+
349
+ **Keyword**: `Then`
350
+
351
+ **Pattern**
352
+
353
+ ```js
354
+ /^the "([^"]*)" should( not)? be sticky$/
355
+ ```
356
+
357
+ **Examples**
358
+
359
+ ```gherkin
360
+ Then the "site header" should be sticky
361
+ And the "site header" should be sticky
362
+ Then the "site header" should not be sticky
363
+ And the "footer" should not be sticky
364
+ Then the "main content" should be sticky
365
+ ```
366
+
367
+ ## 14. Then the "site header" should have the "scrolled" class within 5 seconds
368
+
369
+ Assert a named element gains (or loses) a CSS class, with auto-retry.
370
+
371
+ Resolves a named selector from the registry (falling back to a raw CSS
372
+ selector) and polls its class list. Use this instead of the raw-selector
373
+ web-first step when the feature should read with a registered name.
374
+
375
+ **Keyword**: `Then`
376
+
377
+ **Pattern**
378
+
379
+ ```js
380
+ /^the "([^"]*)" should( not)? have the "([^"]*)" class(?: within (\d+) seconds?)?$/
381
+ ```
382
+
383
+ **Examples**
384
+
385
+ ```gherkin
386
+ Then the "site header" should have the "scrolled" class within 5 seconds
387
+ And the "site header" should have the "scrolled" class
388
+ Then the "site header" should not have the "scrolled" class
389
+ And the "main content" should have the "is-active" class within 3 seconds
390
+ Then the "footer" should not have the "scrolled" class
391
+ ```
@@ -0,0 +1,111 @@
1
+ # Video recording steps
2
+
3
+ 4 steps, defined in `tests/step-definitions/video.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 | `When I start video recording` |
10
+ | 2 | `When I stop video recording` |
11
+ | 3 | `When I save the current video as "checkout-flow.webm"` |
12
+ | 4 | `Then print video path` |
13
+
14
+ ---
15
+
16
+ ## 1. When I start video recording
17
+
18
+ Start recording the browser as a webm video. Closes the current page +
19
+ context and reopens with `recordVideo` enabled. Place BEFORE any
20
+ navigation in the scenario.
21
+
22
+ **Keyword**: `When`
23
+
24
+ **Pattern**
25
+
26
+ ```js
27
+ /^(I |we )*start video recording$/
28
+ ```
29
+
30
+ **Examples**
31
+
32
+ ```gherkin
33
+ When I start video recording
34
+ And I start video recording
35
+ Given I start video recording
36
+ But I start video recording
37
+ Then I start video recording
38
+ ```
39
+
40
+ ## 2. When I stop video recording
41
+
42
+ Stop recording. Closes the current page + context (which flushes the
43
+ webm to disk) and reopens a fresh, non-recording browser so the rest
44
+ of the scenario can continue.
45
+
46
+ **Keyword**: `When`
47
+
48
+ **Pattern**
49
+
50
+ ```js
51
+ /^(I |we )*stop video recording$/
52
+ ```
53
+
54
+ **Examples**
55
+
56
+ ```gherkin
57
+ When I stop video recording
58
+ And I stop video recording
59
+ But I stop video recording
60
+ Then I stop video recording
61
+ Then I stop video recording
62
+ ```
63
+
64
+ ## 3. When I save the current video as "checkout-flow.webm"
65
+
66
+ Reserve a custom filename for the current scenario's video. The actual
67
+ save happens at scenario end (Playwright's `video.saveAs()` blocks
68
+ until recording finishes, so we cannot copy bytes mid-flight). If the
69
+ scenario calls `stop video recording` before scenario end, the manual
70
+ webm uses this name instead of the automatic timestamped one.
71
+
72
+ **Keyword**: `When`
73
+
74
+ **Pattern**
75
+
76
+ ```js
77
+ /^(I |we )*save the current video as "([^"]*)"$/
78
+ ```
79
+
80
+ **Examples**
81
+
82
+ ```gherkin
83
+ When I save the current video as "checkout-flow.webm"
84
+ When I save the current video as "regression-21.webm"
85
+ And I save the current video as "smoke.webm"
86
+ Then I save the current video as "demo.webm"
87
+ But I save the current video as "rerun.webm"
88
+ ```
89
+
90
+ ## 4. Then print video path
91
+
92
+ Print the path that the current video will be written to. Diagnostic
93
+ only — never asserts, never fails.
94
+
95
+ **Keyword**: `Then`
96
+
97
+ **Pattern**
98
+
99
+ ```js
100
+ /^print video path$/
101
+ ```
102
+
103
+ **Examples**
104
+
105
+ ```gherkin
106
+ Then print video path
107
+ And print video path
108
+ But print video path
109
+ Then print video path
110
+ Then print video path
111
+ ```