webship-js 2.0.2 → 2.0.4

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 (181) hide show
  1. package/.circleci/config.yml +7 -31
  2. package/.drone.yml +68 -0
  3. package/.harness/webship-js-pipeline.yml +101 -0
  4. package/.semaphore/semaphore.yml +58 -0
  5. package/.teamcity/pom.xml +52 -0
  6. package/.teamcity/settings.kts +92 -0
  7. package/.travis.yml +24 -3
  8. package/AGENTS.md +109 -0
  9. package/CLAUDE.md +317 -0
  10. package/Jenkinsfile +54 -0
  11. package/azure-pipelines.yml +82 -0
  12. package/bamboo-specs/bamboo.yml +131 -0
  13. package/bin/generate-reports.js +181 -9
  14. package/buildspec.yml +56 -0
  15. package/cloudbuild.yaml +49 -0
  16. package/codefresh.yml +77 -0
  17. package/cucumber.js +48 -5
  18. package/docs/00-quick-start.md +102 -0
  19. package/docs/01-getting-started.md +102 -0
  20. package/docs/02-bbr-smart-waits.md +77 -0
  21. package/docs/03-selector-registry.md +95 -0
  22. package/docs/04-step-reference.md +799 -0
  23. package/docs/05-web-first-assertions.md +91 -0
  24. package/docs/06-network-and-dialogs.md +83 -0
  25. package/docs/07-auth-state.md +75 -0
  26. package/docs/08-clock-mocking.md +59 -0
  27. package/docs/09-api-testing.md +114 -0
  28. package/docs/10-accessibility.md +167 -0
  29. package/docs/11-debugging.md +129 -0
  30. package/docs/12-ai-agent-guide.md +338 -0
  31. package/docs/13-faq.md +236 -0
  32. package/docs/14-recipes-cookbook.md +255 -0
  33. package/docs/15-tag-conventions.md +76 -0
  34. package/docs/16-ci-cd.md +879 -0
  35. package/docs/README.md +113 -0
  36. package/docs/advanced-screenshots/then-i-save-fullscreen-screenshot.md +36 -0
  37. package/docs/advanced-screenshots/then-i-save-width-x-height-screenshot.md +34 -0
  38. package/docs/advanced-screenshots/when-i-save-screenshot-name-filename.md +45 -0
  39. package/docs/advanced-screenshots.md +52 -0
  40. package/docs/advanced-selectors.md +18 -0
  41. package/docs/api-step-definitions.md +45 -0
  42. package/docs/diffy-step-definitions/then-compare-diffy-env1-env2.md +30 -0
  43. package/docs/diffy-step-definitions/then-create-diffy-comparison-name-value.md +21 -0
  44. package/docs/diffy-step-definitions/then-create-diffy-comparison.md +25 -0
  45. package/docs/diffy-step-definitions/then-create-diffy-screenshot-environment-name.md +35 -0
  46. package/docs/diffy-step-definitions/then-i-take-screenshot.md +21 -0
  47. package/docs/diffy-step-definitions/then-i-take-screenshots-all-breakpoints.md +27 -0
  48. package/docs/diffy-step-definitions/then-send-screenshots-diffy-name-value.md +27 -0
  49. package/docs/diffy-step-definitions/then-upload-folder-url-diffy-snapshotname.md +28 -0
  50. package/docs/diffy-step-definitions/then-wait-diffy-comparison-complete.md +21 -0
  51. package/docs/diffy-step-definitions/when-i-resize-window-number.md +29 -0
  52. package/docs/diffy-step-definitions.md +21 -0
  53. package/docs/global-settings.md +295 -0
  54. package/docs/install-webship-js/ddev-webship-js.md +52 -0
  55. package/docs/install-webship-js.md +35 -0
  56. package/docs/overview.md +41 -0
  57. package/docs/step-definitions/given-i-am-anonymous-user.md +67 -0
  58. package/docs/step-definitions/given-i-am-homepage.md +68 -0
  59. package/docs/step-definitions/given-i-am-specific-page.md +72 -0
  60. package/docs/step-definitions/then-i-should-be.md +56 -0
  61. package/docs/step-definitions/then-i-should-see.md +62 -0
  62. package/docs/step-definitions/then-item-checkbox.md +54 -0
  63. package/docs/step-definitions/then-item-link-should-contain-url.md +84 -0
  64. package/docs/step-definitions/then-item-should-contain.md +67 -0
  65. package/docs/step-definitions/then-radio-button-value-should-be-selected.md +68 -0
  66. package/docs/step-definitions/then-response-status-code-should-be-number.md +69 -0
  67. package/docs/step-definitions/then-value-radio-button-selected.md +62 -0
  68. package/docs/step-definitions/when-i-attach-file-file-name-element.md +71 -0
  69. package/docs/step-definitions/when-i-check-checkbox.md +60 -0
  70. package/docs/step-definitions/when-i-click-link.md +51 -0
  71. package/docs/step-definitions/when-i-click-operation-text-row.md +71 -0
  72. package/docs/step-definitions/when-i-fill.md +59 -0
  73. package/docs/step-definitions/when-i-go-homepage.md +60 -0
  74. package/docs/step-definitions/when-i-go-specific-page.md +67 -0
  75. package/docs/step-definitions/when-i-move-backward-one-page.md +49 -0
  76. package/docs/step-definitions/when-i-move-forward-one-page.md +58 -0
  77. package/docs/step-definitions/when-i-press-button.md +58 -0
  78. package/docs/step-definitions/when-i-reload-page.md +51 -0
  79. package/docs/step-definitions/when-i-scroll.md +73 -0
  80. package/docs/step-definitions/when-i-select-option-select-list.md +53 -0
  81. package/docs/step-definitions/when-i-select-radio-button-value.md +62 -0
  82. package/docs/step-definitions/when-i-uncheck-checkbox.md +57 -0
  83. package/docs/step-definitions/when-i-wait-ajax-finish.md +64 -0
  84. package/docs/step-definitions/when-i-wait.md +62 -0
  85. package/docs/step-definitions.md +50 -0
  86. package/examples/a11y.html +31 -0
  87. package/examples/cookies.html +10 -0
  88. package/examples/date.html +12 -0
  89. package/examples/element.html +11 -0
  90. package/examples/field.html +24 -0
  91. package/examples/keyboard.html +11 -0
  92. package/examples/links.html +9 -0
  93. package/examples/modal.html +14 -0
  94. package/examples/path.html +3 -0
  95. package/examples/table.html +13 -0
  96. package/examples/video-demo.html +43 -0
  97. package/package.json +10 -3
  98. package/playwright.config.ts +3 -2
  99. package/tests/features/a11y.feature +39 -0
  100. package/tests/features/cookie.feature +13 -0
  101. package/tests/features/date.feature +11 -0
  102. package/tests/features/element.feature +16 -0
  103. package/tests/features/field.feature +25 -0
  104. package/tests/features/keyboard.feature +10 -0
  105. package/tests/features/link.feature +11 -0
  106. package/tests/features/modal-advanced-example.feature +1 -1
  107. package/tests/features/modal.feature +11 -0
  108. package/tests/features/path.feature +16 -0
  109. package/tests/features/response.feature +8 -0
  110. package/tests/features/responsive.feature +10 -0
  111. package/tests/features/table.feature +18 -0
  112. package/tests/features/video.feature +18 -0
  113. package/tests/features/wait.feature +7 -0
  114. package/tests/features/yaml.feature +102 -0
  115. package/tests/reports/README.md +55 -0
  116. package/tests/selectors/_canonical-keys.json +113 -0
  117. package/tests/selectors/back-end-selectors.json +7 -1
  118. package/tests/selectors/cms-contentful-admin.json +35 -0
  119. package/tests/selectors/cms-craft-admin.json +39 -0
  120. package/tests/selectors/cms-drupal-cms-gin.json +56 -0
  121. package/tests/selectors/cms-drupal-core-claro.json +50 -0
  122. package/tests/selectors/cms-generic-admin.json +34 -0
  123. package/tests/selectors/cms-ghost-admin.json +34 -0
  124. package/tests/selectors/cms-joomla-admin.json +41 -0
  125. package/tests/selectors/cms-magento2-admin.json +32 -0
  126. package/tests/selectors/cms-prestashop-admin.json +38 -0
  127. package/tests/selectors/cms-shopify-admin.json +25 -0
  128. package/tests/selectors/cms-strapi-admin.json +42 -0
  129. package/tests/selectors/cms-typo3-admin.json +41 -0
  130. package/tests/selectors/cms-woocommerce-front.json +50 -0
  131. package/tests/selectors/cms-wordpress-admin.json +31 -0
  132. package/tests/selectors/framework-ant-design.json +80 -0
  133. package/tests/selectors/framework-bootstrap.json +86 -0
  134. package/tests/selectors/framework-bulma.json +74 -0
  135. package/tests/selectors/framework-chakra.json +58 -0
  136. package/tests/selectors/framework-foundation.json +51 -0
  137. package/tests/selectors/framework-material-ui.json +72 -0
  138. package/tests/selectors/framework-shadcn.json +51 -0
  139. package/tests/selectors/framework-tailwind.json +40 -0
  140. package/tests/selectors/framework-vuetify.json +61 -0
  141. package/tests/step-definitions/a11y.steps.js +800 -0
  142. package/tests/step-definitions/action.steps.js +167 -0
  143. package/tests/step-definitions/{webship-api.js → api.steps.js} +41 -23
  144. package/tests/step-definitions/assertion.steps.js +352 -0
  145. package/tests/step-definitions/auth.steps.js +126 -0
  146. package/tests/step-definitions/clock.steps.js +128 -0
  147. package/tests/step-definitions/cookie.steps.js +216 -0
  148. package/tests/step-definitions/debug.steps.js +39 -0
  149. package/tests/step-definitions/dialog.steps.js +193 -0
  150. package/tests/step-definitions/element.steps.js +356 -0
  151. package/tests/step-definitions/field.steps.js +653 -0
  152. package/tests/step-definitions/file-download.steps.js +211 -0
  153. package/tests/step-definitions/form.steps.js +333 -0
  154. package/tests/step-definitions/iframe.steps.js +228 -0
  155. package/tests/step-definitions/input.steps.js +202 -0
  156. package/tests/step-definitions/javascript.steps.js +232 -0
  157. package/tests/step-definitions/keyboard.steps.js +112 -0
  158. package/tests/step-definitions/link.steps.js +142 -0
  159. package/tests/step-definitions/metatag.steps.js +91 -0
  160. package/tests/step-definitions/modal.steps.js +244 -0
  161. package/tests/step-definitions/navigation.steps.js +218 -0
  162. package/tests/step-definitions/network.steps.js +280 -0
  163. package/tests/step-definitions/path.steps.js +141 -0
  164. package/tests/step-definitions/response.steps.js +98 -0
  165. package/tests/step-definitions/responsive.steps.js +125 -0
  166. package/tests/step-definitions/rest.steps.js +111 -0
  167. package/tests/step-definitions/{webship-screenshot.js → screenshot.steps.js} +1 -5
  168. package/tests/step-definitions/scroll.steps.js +189 -0
  169. package/tests/step-definitions/{webship-selectors.js → selectors.steps.js} +64 -27
  170. package/tests/step-definitions/storage.steps.js +194 -0
  171. package/tests/step-definitions/table.steps.js +181 -0
  172. package/tests/step-definitions/video.steps.js +178 -0
  173. package/tests/step-definitions/wait.steps.js +400 -0
  174. package/tests/step-definitions/web-first.steps.js +298 -0
  175. package/tests/step-definitions/webship.js +741 -1477
  176. package/tests/step-definitions/xml.steps.js +411 -0
  177. package/tests/step-definitions/yaml.steps.js +913 -0
  178. package/tests/step-definitions-diffy/webship-diffy.js +0 -13
  179. package/tsconfig.json +19 -3
  180. package/videos/README.md +32 -0
  181. package/.travis-ci.yml +0 -16
@@ -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,18 @@
1
+ @video
2
+ Feature: 🎬 Video recording
3
+
4
+ As a tester, I want to record a short browser video so that I can attach it
5
+ to a bug report and let reviewers replay what happened.
6
+
7
+ Scenario: 🎥 Record a tiny click flow with emojis
8
+ When I start video recording
9
+ Given I am on "/video-demo.html"
10
+ Then I should see "Webship-js Video Demo"
11
+ When I press "👋 Wave"
12
+ Then I should see "Hello, world"
13
+ When I press "🚀 Launch"
14
+ Then I should see "Liftoff!"
15
+ When I press "🎉 Celebrate"
16
+ Then I should see "Party time"
17
+ When I save the current video as "demo.webm"
18
+ When I stop video recording
@@ -0,0 +1,7 @@
1
+ Feature: Wait step definitions
2
+
3
+ Scenario: Wait helpers
4
+ Given I am on the homepage
5
+ When I wait for 1 second
6
+ And I wait for 1 seconds
7
+ And I wait for 1 second for AJAX to finish
@@ -0,0 +1,102 @@
1
+ Feature: YAML response assertions
2
+
3
+ Scenario: Existence, equality, contains, count
4
+ Given the YAML response content is the following:
5
+ """
6
+ apiVersion: apps/v1
7
+ kind: Deployment
8
+ metadata:
9
+ name: web
10
+ labels:
11
+ app: web
12
+ team: platform
13
+ spec:
14
+ replicas: 3
15
+ containers:
16
+ - name: nginx
17
+ image: nginx:1.25
18
+ - name: api
19
+ image: myapp:1.0
20
+ """
21
+ Then the response should be in YAML format
22
+ And the YAML should have no duplicate keys
23
+ And the YAML element "/kind" should exist
24
+ And the YAML element "/spec/replicas" should be equal to "3"
25
+ And the YAML element "/metadata/name" should contain "we"
26
+ And the YAML element "/spec/containers" should have 2 elements
27
+ And the YAML attribute "kind" on element "/" should exist
28
+ And the YAML attribute "kind" on element "/" should be equal to "Deployment"
29
+
30
+ Scenario: Type and emptiness assertions
31
+ Given the YAML response content is the following:
32
+ """
33
+ replicas: 3
34
+ name: web
35
+ paused: false
36
+ tags: []
37
+ meta: {}
38
+ notes: null
39
+ """
40
+ Then the YAML value at "/replicas" should be of type "integer"
41
+ And the YAML value at "/name" should be of type "string"
42
+ And the YAML value at "/paused" should be of type "boolean"
43
+ And the YAML value at "/tags" should be of type "array"
44
+ And the YAML value at "/meta" should be of type "object"
45
+ And the YAML value at "/notes" should be of type "null"
46
+ And the YAML value at "/tags" should be empty
47
+ And the YAML value at "/meta" should be empty
48
+ And the YAML value at "/name" should not be empty
49
+
50
+ Scenario: Numeric comparisons
51
+ Given the YAML response content is the following:
52
+ """
53
+ spec:
54
+ replicas: 5
55
+ timeout: 30
56
+ """
57
+ Then the YAML value at "/spec/replicas" should be greater than 0
58
+ And the YAML value at "/spec/replicas" should be greater than or equal to 5
59
+ And the YAML value at "/spec/replicas" should be less than 10
60
+ And the YAML value at "/spec/replicas" should be less than or equal to 5
61
+ And the YAML value at "/timeout" should be between 5 and 60
62
+
63
+ Scenario: Array operations
64
+ Given the YAML response content is the following:
65
+ """
66
+ spec:
67
+ containers:
68
+ - name: nginx
69
+ image: nginx:1.25
70
+ - name: api
71
+ image: myapp:1.0
72
+ """
73
+ Then the YAML array at "/spec/containers" should contain an item where "/name" is "nginx"
74
+ And the YAML array at "/spec/containers" should contain no item where "/image" is "alpine:latest"
75
+ And every item in "/spec/containers" should have key "image"
76
+
77
+ Scenario: Key-set assertions
78
+ Given the YAML response content is the following:
79
+ """
80
+ metadata:
81
+ name: web
82
+ namespace: default
83
+ labels:
84
+ app: web
85
+ """
86
+ Then the YAML keys at "/metadata" should be exactly "name, namespace, labels"
87
+ And the YAML at "/metadata" should have keys "name, namespace"
88
+
89
+ Scenario: Multi-document streams
90
+ Given the YAML response content is the following:
91
+ """
92
+ apiVersion: v1
93
+ kind: ConfigMap
94
+ ---
95
+ apiVersion: v1
96
+ kind: Service
97
+ """
98
+ Then the YAML response should have 2 documents
99
+ And the YAML element "/kind" should be equal to "ConfigMap"
100
+ Given the active YAML document is 2
101
+ Then the YAML element "/kind" should be equal to "Service"
102
+
@@ -0,0 +1,55 @@
1
+ # tests/reports
2
+
3
+ Generated test artefacts land here. Everything in this directory **except this
4
+ README** is gitignored — these files are produced fresh on every run.
5
+
6
+ ## What gets written
7
+
8
+ | File | Producer | When |
9
+ | --- | --- | --- |
10
+ | `cucumber_report.json` | `cucumber-js` (default `format` in `cucumber.js`) | Every run |
11
+ | `cucumber_report.html` | `cucumber-html-reporter` (auto-invoked at run end) | Every run |
12
+ | `cucumber_report.pdf` | `bin/generate-reports.js --format pdf` | On demand |
13
+
14
+ Override paths with env vars:
15
+
16
+ | Variable | Default | Effect |
17
+ | --- | --- | --- |
18
+ | `WEBSHIP_REPORT_JSON` | `tests/reports/cucumber_report.json` | JSON output path |
19
+ | `WEBSHIP_REPORT_OUT` | `tests/reports/cucumber_report.html` | HTML output path |
20
+ | `WEBSHIP_REPORT_DISABLE` | _unset_ | `1` to skip HTML generation |
21
+ | `WEBSHIP_REPORT_THEME` | `bootstrap` | `bootstrap` / `hierarchy` / `foundation` / `simple` |
22
+ | `WEBSHIP_REPORT_TITLE` | `Test Report` | Brand title in the HTML header |
23
+ | `WEBSHIP_REPORT_APP_VERSION` | `2.0.0` | Metadata field |
24
+ | `WEBSHIP_REPORT_ENV` | `development` | Test-environment metadata |
25
+ | `WEBSHIP_REPORT_EXECUTED` | `Remote` | Execution location metadata |
26
+
27
+ ## Regenerate manually
28
+
29
+ ```bash
30
+ # HTML only (re-uses the JSON from the last run)
31
+ npx generate-reports
32
+
33
+ # HTML + PDF in one shot
34
+ npx generate-reports --format all
35
+
36
+ # PDF only — Letter, landscape, slim margin
37
+ npx generate-reports --format pdf --pdf-format Letter --pdf-landscape --pdf-margin 10mm
38
+
39
+ # Branded PDF with header / footer
40
+ npx generate-reports --format pdf \
41
+ --pdf-header '<div style="font-size:10px;width:100%;text-align:center;">Q3 Regression</div>' \
42
+ --pdf-footer '<div style="font-size:10px;width:100%;text-align:center;"><span class="pageNumber"></span>/<span class="totalPages"></span></div>'
43
+
44
+ # Full help
45
+ npx generate-reports --help
46
+ ```
47
+
48
+ ## Why these files are ignored
49
+
50
+ * They change on every run — committing them creates noise and merge conflicts.
51
+ * They are large (HTML ~3 MB, PDF ~5 MB on the full suite).
52
+ * They contain timestamps and per-machine metadata that vary by author.
53
+
54
+ If you need to share a report, attach the file to a PR / issue or upload to
55
+ your CI artefact store rather than committing it.
@@ -0,0 +1,113 @@
1
+ {
2
+ "_description": "Canonical selector key index. CMS/framework JSON files should expose these names so steps work consistently across projects. Framework-specific extras may also be present.",
3
+ "categories": {
4
+ "layout": [
5
+ "main nav",
6
+ "main nav item",
7
+ "sidebar",
8
+ "header bar",
9
+ "main content",
10
+ "page title",
11
+ "page header",
12
+ "footer",
13
+ "breadcrumb",
14
+ "user menu",
15
+ "container"
16
+ ],
17
+ "modal": [
18
+ "modal",
19
+ "modal overlay",
20
+ "modal content",
21
+ "modal header",
22
+ "modal title",
23
+ "modal body",
24
+ "modal footer",
25
+ "modal close"
26
+ ],
27
+ "buttons": [
28
+ "primary button",
29
+ "secondary button",
30
+ "danger button",
31
+ "save button",
32
+ "cancel button",
33
+ "delete button",
34
+ "publish button",
35
+ "icon button",
36
+ "link button",
37
+ "ghost button"
38
+ ],
39
+ "notices": [
40
+ "notice success",
41
+ "notice error",
42
+ "notice warning",
43
+ "notice info",
44
+ "toast"
45
+ ],
46
+ "forms": [
47
+ "form",
48
+ "form item",
49
+ "form label",
50
+ "form input",
51
+ "form select",
52
+ "form textarea",
53
+ "form actions",
54
+ "form error",
55
+ "checkbox",
56
+ "checkbox checked",
57
+ "radio",
58
+ "radio checked",
59
+ "switch"
60
+ ],
61
+ "tables": [
62
+ "data table",
63
+ "table header",
64
+ "table row",
65
+ "table first row",
66
+ "table row cell"
67
+ ],
68
+ "lists": [
69
+ "data list",
70
+ "list item",
71
+ "first list item"
72
+ ],
73
+ "tabs": [
74
+ "tabs",
75
+ "tab item",
76
+ "active tab",
77
+ "tab content"
78
+ ],
79
+ "navigation": [
80
+ "menu",
81
+ "active menu item",
82
+ "dropdown",
83
+ "dropdown menu",
84
+ "dropdown item",
85
+ "pagination"
86
+ ],
87
+ "feedback": [
88
+ "tooltip",
89
+ "popover",
90
+ "spinner",
91
+ "skeleton",
92
+ "progress",
93
+ "badge",
94
+ "tag"
95
+ ],
96
+ "search": [
97
+ "search input"
98
+ ],
99
+ "card": [
100
+ "card",
101
+ "card content",
102
+ "card header",
103
+ "card footer"
104
+ ]
105
+ },
106
+ "naming_rules": {
107
+ "case": "kebab words separated by single space (e.g. \"primary button\", \"data table\")",
108
+ "modifiers": "place modifier first (e.g. \"active tab\", \"danger button\", \"first list item\")",
109
+ "no_synonyms": "use canonical name; do not add \"alert\"/\"notification\"/\"callout\" — always \"notice\"",
110
+ "tables_vs_lists": "\"data table\" for HTML tables; \"data list\" for ul/ol/list-of-cards collections",
111
+ "navigation": "site-wide nav = \"main nav\"; admin app sidebar = \"sidebar\"; collapsible inline menu = \"menu\""
112
+ }
113
+ }
@@ -1,9 +1,15 @@
1
1
  {
2
2
  "css": {
3
+ "modal": "[role=\"dialog\"], dialog",
3
4
  "admin heading": "h1",
4
5
  "admin subline": "h3",
5
6
  "admin list": "ul",
6
- "admin body": "body"
7
+ "admin body": "body",
8
+ "save button": "button[type=\"submit\"], input[type=\"submit\"]",
9
+ "notice success": ".alert-success, .notice-success",
10
+ "notice error": ".alert-danger, .notice-error",
11
+ "data table": "table",
12
+ "search input": "input[type=\"search\"], input[name=\"search\"]"
7
13
  },
8
14
  "xpath": {
9
15
  "admin first heading": "//h1[1]",
@@ -0,0 +1,35 @@
1
+ {
2
+ "css": {
3
+ "modal": "[role=\"dialog\"], [data-test-id=\"cf-ui-modal\"]",
4
+ "main nav": "[data-test-id=\"main-nav\"], nav[aria-label*=\"main\" i]",
5
+ "page header": "[data-test-id=\"workbench-header\"]",
6
+ "page title": "[data-test-id=\"workbench-header\"] h1",
7
+ "sidebar": "[data-test-id=\"workbench-sidebar\"]",
8
+ "main content": "[data-test-id=\"workbench-main\"]",
9
+ "save button": "[data-test-id=\"workbench-header-actions\"] button:has-text('Save')",
10
+ "publish button": "[data-test-id=\"change-state-published\"], button:has-text('Publish')",
11
+ "archive button": "[data-test-id=\"change-state-archived\"]",
12
+ "primary button": "button.btn-primary, button[data-variant=\"primary\"]",
13
+ "secondary button": "button[data-variant=\"secondary\"]",
14
+ "danger button": "button[data-variant=\"negative\"]",
15
+ "notice success": "[data-test-id=\"cf-ui-notification\"][class*=\"success\"]",
16
+ "notice error": "[data-test-id=\"cf-ui-notification\"][class*=\"error\"]",
17
+ "notice warning": "[data-test-id=\"cf-ui-notification\"][class*=\"warning\"]",
18
+ "data table": "[data-test-id=\"entry-list\"]",
19
+ "table row": "[data-test-id=\"entry-row\"]",
20
+ "form input": "[data-test-id*=\"cf-ui-text-input\"], input.cf-form-input",
21
+ "form label": "[data-test-id*=\"cf-ui-form-label\"], label.cf-form-label",
22
+ "select trigger": "[data-test-id=\"cf-ui-select\"]",
23
+ "tabs": "[data-test-id=\"workbench-tabs\"], [role=\"tablist\"]",
24
+ "tab item": "[role=\"tab\"]",
25
+ "active tab": "[role=\"tab\"][aria-selected=\"true\"]",
26
+ "search input": "[data-test-id=\"search-input\"]",
27
+ "user menu": "[data-test-id=\"account-menu-trigger\"]",
28
+ "breadcrumb": "[data-test-id=\"breadcrumbs\"]"
29
+ },
30
+ "xpath": {
31
+ "page main heading": "//header[@data-test-id='workbench-header']//h1",
32
+ "save button": "//button[contains(.,'Save')]",
33
+ "first entry row": "//*[@data-test-id='entry-row'][1]"
34
+ }
35
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "css": {
3
+ "modal": ".modal.shown, [role=\"dialog\"], .hud",
4
+ "sidebar": "#global-sidebar, .global-sidebar",
5
+ "main nav": "#nav, nav#nav",
6
+ "main nav item": "#nav li a",
7
+ "page title": "#header h1, .header h1, h1.title",
8
+ "page header": "#page-title, #header",
9
+ "save button": "button.submit, .btn.submit, #save-btn",
10
+ "save and continue": "#action-menu .action-btn",
11
+ "primary button": "button.btn.submit, .btn.primary",
12
+ "secondary button": ".btn.secondary",
13
+ "delete button": ".btn.delete",
14
+ "notice success": ".notification.notice, .notice",
15
+ "notice error": ".notification.error, .errors",
16
+ "notice warning": ".notification.warning",
17
+ "data table": "table.data, table.fullwidth",
18
+ "table row": "tbody tr",
19
+ "table first row": "tbody tr:first-child",
20
+ "table checkbox": "td.checkbox-cell input",
21
+ "tabs": "#tabs, .tabs",
22
+ "active tab": "#tabs li.sel, .tabs li.sel",
23
+ "form item": ".field, .flex-fields .field",
24
+ "form input": ".field input.text, .field .nicetext",
25
+ "form label": ".field .heading label, .field label",
26
+ "lightswitch": ".lightswitch",
27
+ "search input": ".search input, #search-container input",
28
+ "filter button": ".btn.menubtn",
29
+ "site picker": "#site-crumb, .site-crumb-button",
30
+ "user menu": "#user-info, .user.menubtn",
31
+ "breadcrumb": ".crumbs, #crumbs"
32
+ },
33
+ "xpath": {
34
+ "page main heading": "//div[@id='header']//h1 | //h1[@class='title']",
35
+ "save button": "//button[contains(@class,'submit')]",
36
+ "first table row": "//table[contains(@class,'data')]//tbody/tr[1]",
37
+ "notification": "//div[contains(@class,'notification')]"
38
+ }
39
+ }
@@ -0,0 +1,56 @@
1
+ {
2
+ "css": {
3
+ "modal": ".ui-dialog, [role=\"dialog\"], .dialog-off-canvas-main-canvas",
4
+ "main nav": ".gin--navigation, #gin-sidebar, .gin-sidebar",
5
+ "main nav item": ".gin--navigation a, .gin-sidebar a",
6
+ "page title": "h1.page-title, .region-page-title h1",
7
+ "sticky header": ".region-sticky, .region.region-sticky",
8
+ "save button": "#edit-submit, .button--primary, .gin-sticky-form-actions .button--primary",
9
+ "delete button": ".button--danger, a.button[href*='delete']",
10
+ "primary button": ".button--primary",
11
+ "notice success": ".messages--status",
12
+ "notice error": ".messages--error",
13
+ "notice warning": ".messages--warning",
14
+ "breadcrumb": ".gin-breadcrumb, .breadcrumb, nav.breadcrumb",
15
+ "breadcrumb list": ".gin-breadcrumb__list, .breadcrumb__list",
16
+ "breadcrumb back": ".gin-back-to-admin",
17
+ "secondary toolbar": ".gin-secondary-toolbar",
18
+ "header bar": ".gin--navigation-top-bar, .top-bar--gin",
19
+ "local tasks": ".tabs--primary",
20
+ "local task item": ".tabs--primary li",
21
+ "local actions": ".local-actions, .action-links",
22
+ "content area": "main.page-content, .layout-container main",
23
+ "form": ".layout-container form, main form",
24
+ "form item": ".form-item",
25
+ "form input": ".form-element, input.form-text",
26
+ "form select": ".form-element--type-select, select",
27
+ "form textarea": "textarea",
28
+ "form actions": ".form-actions, .gin-sticky-form-actions",
29
+ "more actions": ".gin-more-actions",
30
+ "more actions menu": ".gin-more-actions__menu",
31
+ "sidebar toggle": ".gin-sidebar-toggle",
32
+ "sidebar": ".gin-sidebar",
33
+ "layout container": ".layout-container",
34
+ "data table": "table.views-table, table.responsive-enabled, .gin--table-sticky",
35
+ "table header": "thead tr",
36
+ "table row": "tbody tr",
37
+ "table first row": "tbody tr:first-child",
38
+ "pager": ".pager",
39
+ "pager next": ".pager__item--next a",
40
+ "dropbutton": ".dropbutton-wrapper",
41
+ "layer wrapper": ".gin-layer-wrapper",
42
+ "edit form": ".gin--edit-form",
43
+ "confirm form": ".gin-confirm-form",
44
+ "dark mode toggle": ".gin--dark-mode-toggle",
45
+ "user menu": ".toolbar-tab--toolbar-item-user, .toolbar-icon-user",
46
+ "search input": "input.form-search, input[placeholder*='Search']"
47
+ },
48
+ "xpath": {
49
+ "page main heading": "//h1[contains(@class,'page-title')]",
50
+ "gin nav first item": "//nav[contains(@class,'gin--navigation')]//a[1]",
51
+ "first table row": "//table//tbody/tr[1]",
52
+ "messages block": "//div[contains(@class,'messages')]",
53
+ "save button": "//input[@value='Save'] | //button[normalize-space()='Save']",
54
+ "breadcrumb link": "//nav[contains(@class,'gin-breadcrumb')]//a[1]"
55
+ }
56
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "css": {
3
+ "modal": ".ui-dialog, [role=\"dialog\"], .dialog-off-canvas-main-canvas",
4
+ "main nav": "#toolbar-bar, .toolbar-bar, .toolbar-menu, #toolbar-item-administration-tray",
5
+ "main nav item": ".toolbar-menu a",
6
+ "page title": "h1.page-title, .region-page-title h1, .page-header h1",
7
+ "save button": "#edit-submit, .button--primary, input[value=\"Save\"]",
8
+ "delete button": ".button--danger, a.button[href*='delete']",
9
+ "primary button": ".button--primary",
10
+ "notice success": ".messages--status, .messages[role=\"contentinfo\"]",
11
+ "notice error": ".messages--error, .messages[role=\"alert\"]",
12
+ "notice warning": ".messages--warning",
13
+ "breadcrumb": ".breadcrumb, nav[role=\"navigation\"].breadcrumb",
14
+ "breadcrumb list": ".breadcrumb__list",
15
+ "breadcrumb item": ".breadcrumb__item",
16
+ "local tasks": ".tabs--primary, [data-drupal-nav-tabs]",
17
+ "local task item": ".tabs--primary li, .tabs__tab",
18
+ "local actions": ".local-actions, .action-links",
19
+ "content area": ".layout-container main, main[role=\"main\"], .page-content",
20
+ "form": ".layout-container form, main form",
21
+ "form item": ".form-item",
22
+ "form input": ".form-element, input.form-text, input.form-email",
23
+ "form select": ".form-element--type-select, select.form-select",
24
+ "form textarea": "textarea.form-textarea",
25
+ "form actions": ".form-actions",
26
+ "details": ".claro-details, details",
27
+ "details summary": ".claro-details__summary, details > summary",
28
+ "vertical tabs": ".vertical-tabs",
29
+ "vertical tab item": ".vertical-tabs__item",
30
+ "exposed filters": ".views-exposed-form, .exposed-filters",
31
+ "data table": "table.views-table, table.responsive-enabled",
32
+ "table header": "thead tr",
33
+ "table row": "tbody tr",
34
+ "table first row": "tbody tr:first-child",
35
+ "pager": ".pager, nav[role=\"navigation\"].pager",
36
+ "pager next": ".pager__item--next a",
37
+ "dropbutton": ".dropbutton-wrapper",
38
+ "status report": ".system-status-report",
39
+ "user menu": ".toolbar-tab--toolbar-item-user",
40
+ "search input": "input[data-drupal-selector*='search'], input.form-search"
41
+ },
42
+ "xpath": {
43
+ "page main heading": "//h1[contains(@class,'page-title')]",
44
+ "admin toolbar first item": "//nav[contains(@class,'toolbar-menu')]//a[1]",
45
+ "first table row": "//table//tbody/tr[1]",
46
+ "messages block": "//div[contains(@class,'messages')]",
47
+ "primary tab item": "//ul[contains(@class,'tabs--primary')]//a",
48
+ "save button": "//input[@value='Save'] | //button[normalize-space()='Save']"
49
+ }
50
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "css": {
3
+ "modal": "[role=\"dialog\"], dialog, .modal.show, .modal.active, .modal.open",
4
+ "sidebar": "aside, nav.sidebar, .sidebar, #sidebar",
5
+ "main nav": "nav, .navbar, .navigation, header nav",
6
+ "page title": "h1, .page-title, .page-heading",
7
+ "save button": "button[type=\"submit\"], input[type=\"submit\"], .btn-save, .btn-primary",
8
+ "cancel button": "button.cancel, .btn-cancel, .btn-secondary",
9
+ "delete button": "button.delete, .btn-delete, .btn-danger",
10
+ "notice success": ".alert-success, .success, .notice-success, [role=\"alert\"].success",
11
+ "notice error": ".alert-danger, .alert-error, .error, .notice-error, [role=\"alert\"].error",
12
+ "notice warning": ".alert-warning, .warning, .notice-warning",
13
+ "notice info": ".alert-info, .info, .notice-info",
14
+ "data table": "table, .data-table, .list-table",
15
+ "table row": "tbody tr",
16
+ "table first row": "tbody tr:first-child",
17
+ "pagination": ".pagination, nav[aria-label*=\"page\"], [role=\"navigation\"].pagination",
18
+ "search input": "input[type=\"search\"], input[name=\"search\"], input[placeholder*=\"Search\"]",
19
+ "breadcrumb": ".breadcrumb, [aria-label=\"breadcrumb\"], nav.breadcrumb",
20
+ "dropdown menu": ".dropdown-menu, .dropdown-content",
21
+ "form": "form",
22
+ "form input": "input:not([type=\"hidden\"]):not([type=\"submit\"]):not([type=\"button\"])",
23
+ "loading spinner": ".spinner, .loader, .loading, [role=\"progressbar\"]",
24
+ "user avatar": ".avatar, .user-avatar",
25
+ "logout link": "a[href*=\"logout\"], a[href*=\"signout\"], button.logout"
26
+ },
27
+ "xpath": {
28
+ "page main heading": "//h1[1]",
29
+ "first table row": "//table//tbody/tr[1]",
30
+ "nav first item": "//nav//a[1]",
31
+ "any alert": "//div[contains(@class,'alert') or contains(@class,'notice') or contains(@class,'message')]",
32
+ "submit form": "//button[@type='submit' or @type='button'][contains(.,'Save') or contains(.,'Submit') or contains(.,'Update')]"
33
+ }
34
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "css": {
3
+ "modal": ".fullscreen-modal, .modal-content, [role=\"dialog\"]",
4
+ "main nav": ".gh-nav, nav.gh-nav",
5
+ "main nav item": ".gh-nav-list a",
6
+ "main content": ".gh-main, main.gh-main",
7
+ "page title": ".gh-canvas-header h1, .gh-canvas-header h2",
8
+ "canvas header": ".gh-canvas-header",
9
+ "save button": ".gh-publishmenu-trigger, button.gh-btn-primary",
10
+ "publish button": ".gh-publishmenu-button.gh-btn-black",
11
+ "preview button": ".gh-editor-preview-trigger",
12
+ "settings button": ".settings-menu-toggle",
13
+ "primary button": ".gh-btn-primary, .gh-btn.gh-btn-primary",
14
+ "danger button": ".gh-btn-red, .gh-btn-outline-red",
15
+ "notice success": ".gh-notification-success, .gh-alert-blue",
16
+ "notice error": ".gh-notification-error, .gh-alert-red",
17
+ "notice warning": ".gh-notification-warn, .gh-alert-yellow",
18
+ "data list": ".posts-list, .gh-list",
19
+ "table row": ".gh-posts-list-item, .gh-list-row",
20
+ "first list item": ".gh-list-row:first-of-type, .gh-posts-list-item:first-of-type",
21
+ "search input": ".gh-search-input, .gh-input-icon input",
22
+ "tag input": ".select-tags input",
23
+ "title input": ".gh-editor-title, textarea.gh-editor-title",
24
+ "editor": ".gh-koenig-editor, .koenig-editor",
25
+ "filter dropdown": ".gh-contentfilter",
26
+ "user menu": ".gh-user-avatar, .gh-user-list-action",
27
+ "settings panel": ".settings-menu-pane, .gh-settings-menu"
28
+ },
29
+ "xpath": {
30
+ "page main heading": "//header[contains(@class,'gh-canvas-header')]//h1",
31
+ "first post item": "//ol[contains(@class,'posts-list')]/li[1]",
32
+ "publish button": "//button[contains(@class,'gh-publishmenu-trigger')]"
33
+ }
34
+ }