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.
- package/.circleci/config.yml +7 -31
- package/.drone.yml +68 -0
- package/.harness/webship-js-pipeline.yml +101 -0
- package/.semaphore/semaphore.yml +58 -0
- package/.teamcity/pom.xml +52 -0
- package/.teamcity/settings.kts +92 -0
- package/.travis.yml +24 -3
- package/AGENTS.md +109 -0
- package/CLAUDE.md +317 -0
- package/Jenkinsfile +54 -0
- package/azure-pipelines.yml +82 -0
- package/bamboo-specs/bamboo.yml +131 -0
- package/bin/generate-reports.js +181 -9
- package/buildspec.yml +56 -0
- package/cloudbuild.yaml +49 -0
- package/codefresh.yml +77 -0
- package/cucumber.js +48 -5
- package/docs/00-quick-start.md +102 -0
- package/docs/01-getting-started.md +102 -0
- package/docs/02-bbr-smart-waits.md +77 -0
- package/docs/03-selector-registry.md +95 -0
- package/docs/04-step-reference.md +799 -0
- package/docs/05-web-first-assertions.md +91 -0
- package/docs/06-network-and-dialogs.md +83 -0
- package/docs/07-auth-state.md +75 -0
- package/docs/08-clock-mocking.md +59 -0
- package/docs/09-api-testing.md +114 -0
- package/docs/10-accessibility.md +167 -0
- package/docs/11-debugging.md +129 -0
- package/docs/12-ai-agent-guide.md +338 -0
- package/docs/13-faq.md +236 -0
- package/docs/14-recipes-cookbook.md +255 -0
- package/docs/15-tag-conventions.md +76 -0
- package/docs/16-ci-cd.md +879 -0
- package/docs/README.md +113 -0
- package/docs/advanced-screenshots/then-i-save-fullscreen-screenshot.md +36 -0
- package/docs/advanced-screenshots/then-i-save-width-x-height-screenshot.md +34 -0
- package/docs/advanced-screenshots/when-i-save-screenshot-name-filename.md +45 -0
- package/docs/advanced-screenshots.md +52 -0
- package/docs/advanced-selectors.md +18 -0
- package/docs/api-step-definitions.md +45 -0
- package/docs/diffy-step-definitions/then-compare-diffy-env1-env2.md +30 -0
- package/docs/diffy-step-definitions/then-create-diffy-comparison-name-value.md +21 -0
- package/docs/diffy-step-definitions/then-create-diffy-comparison.md +25 -0
- package/docs/diffy-step-definitions/then-create-diffy-screenshot-environment-name.md +35 -0
- package/docs/diffy-step-definitions/then-i-take-screenshot.md +21 -0
- package/docs/diffy-step-definitions/then-i-take-screenshots-all-breakpoints.md +27 -0
- package/docs/diffy-step-definitions/then-send-screenshots-diffy-name-value.md +27 -0
- package/docs/diffy-step-definitions/then-upload-folder-url-diffy-snapshotname.md +28 -0
- package/docs/diffy-step-definitions/then-wait-diffy-comparison-complete.md +21 -0
- package/docs/diffy-step-definitions/when-i-resize-window-number.md +29 -0
- package/docs/diffy-step-definitions.md +21 -0
- package/docs/global-settings.md +295 -0
- package/docs/install-webship-js/ddev-webship-js.md +52 -0
- package/docs/install-webship-js.md +35 -0
- package/docs/overview.md +41 -0
- package/docs/step-definitions/given-i-am-anonymous-user.md +67 -0
- package/docs/step-definitions/given-i-am-homepage.md +68 -0
- package/docs/step-definitions/given-i-am-specific-page.md +72 -0
- package/docs/step-definitions/then-i-should-be.md +56 -0
- package/docs/step-definitions/then-i-should-see.md +62 -0
- package/docs/step-definitions/then-item-checkbox.md +54 -0
- package/docs/step-definitions/then-item-link-should-contain-url.md +84 -0
- package/docs/step-definitions/then-item-should-contain.md +67 -0
- package/docs/step-definitions/then-radio-button-value-should-be-selected.md +68 -0
- package/docs/step-definitions/then-response-status-code-should-be-number.md +69 -0
- package/docs/step-definitions/then-value-radio-button-selected.md +62 -0
- package/docs/step-definitions/when-i-attach-file-file-name-element.md +71 -0
- package/docs/step-definitions/when-i-check-checkbox.md +60 -0
- package/docs/step-definitions/when-i-click-link.md +51 -0
- package/docs/step-definitions/when-i-click-operation-text-row.md +71 -0
- package/docs/step-definitions/when-i-fill.md +59 -0
- package/docs/step-definitions/when-i-go-homepage.md +60 -0
- package/docs/step-definitions/when-i-go-specific-page.md +67 -0
- package/docs/step-definitions/when-i-move-backward-one-page.md +49 -0
- package/docs/step-definitions/when-i-move-forward-one-page.md +58 -0
- package/docs/step-definitions/when-i-press-button.md +58 -0
- package/docs/step-definitions/when-i-reload-page.md +51 -0
- package/docs/step-definitions/when-i-scroll.md +73 -0
- package/docs/step-definitions/when-i-select-option-select-list.md +53 -0
- package/docs/step-definitions/when-i-select-radio-button-value.md +62 -0
- package/docs/step-definitions/when-i-uncheck-checkbox.md +57 -0
- package/docs/step-definitions/when-i-wait-ajax-finish.md +64 -0
- package/docs/step-definitions/when-i-wait.md +62 -0
- package/docs/step-definitions.md +50 -0
- package/examples/a11y.html +31 -0
- package/examples/cookies.html +10 -0
- package/examples/date.html +12 -0
- package/examples/element.html +11 -0
- package/examples/field.html +24 -0
- package/examples/keyboard.html +11 -0
- package/examples/links.html +9 -0
- package/examples/modal.html +14 -0
- package/examples/path.html +3 -0
- package/examples/table.html +13 -0
- package/examples/video-demo.html +43 -0
- package/package.json +10 -3
- package/playwright.config.ts +3 -2
- package/tests/features/a11y.feature +39 -0
- package/tests/features/cookie.feature +13 -0
- package/tests/features/date.feature +11 -0
- package/tests/features/element.feature +16 -0
- package/tests/features/field.feature +25 -0
- package/tests/features/keyboard.feature +10 -0
- package/tests/features/link.feature +11 -0
- package/tests/features/modal-advanced-example.feature +1 -1
- package/tests/features/modal.feature +11 -0
- package/tests/features/path.feature +16 -0
- package/tests/features/response.feature +8 -0
- package/tests/features/responsive.feature +10 -0
- package/tests/features/table.feature +18 -0
- package/tests/features/video.feature +18 -0
- package/tests/features/wait.feature +7 -0
- package/tests/features/yaml.feature +102 -0
- package/tests/reports/README.md +55 -0
- package/tests/selectors/_canonical-keys.json +113 -0
- package/tests/selectors/back-end-selectors.json +7 -1
- package/tests/selectors/cms-contentful-admin.json +35 -0
- package/tests/selectors/cms-craft-admin.json +39 -0
- package/tests/selectors/cms-drupal-cms-gin.json +56 -0
- package/tests/selectors/cms-drupal-core-claro.json +50 -0
- package/tests/selectors/cms-generic-admin.json +34 -0
- package/tests/selectors/cms-ghost-admin.json +34 -0
- package/tests/selectors/cms-joomla-admin.json +41 -0
- package/tests/selectors/cms-magento2-admin.json +32 -0
- package/tests/selectors/cms-prestashop-admin.json +38 -0
- package/tests/selectors/cms-shopify-admin.json +25 -0
- package/tests/selectors/cms-strapi-admin.json +42 -0
- package/tests/selectors/cms-typo3-admin.json +41 -0
- package/tests/selectors/cms-woocommerce-front.json +50 -0
- package/tests/selectors/cms-wordpress-admin.json +31 -0
- package/tests/selectors/framework-ant-design.json +80 -0
- package/tests/selectors/framework-bootstrap.json +86 -0
- package/tests/selectors/framework-bulma.json +74 -0
- package/tests/selectors/framework-chakra.json +58 -0
- package/tests/selectors/framework-foundation.json +51 -0
- package/tests/selectors/framework-material-ui.json +72 -0
- package/tests/selectors/framework-shadcn.json +51 -0
- package/tests/selectors/framework-tailwind.json +40 -0
- package/tests/selectors/framework-vuetify.json +61 -0
- package/tests/step-definitions/a11y.steps.js +800 -0
- package/tests/step-definitions/action.steps.js +167 -0
- package/tests/step-definitions/{webship-api.js → api.steps.js} +41 -23
- package/tests/step-definitions/assertion.steps.js +352 -0
- package/tests/step-definitions/auth.steps.js +126 -0
- package/tests/step-definitions/clock.steps.js +128 -0
- package/tests/step-definitions/cookie.steps.js +216 -0
- package/tests/step-definitions/debug.steps.js +39 -0
- package/tests/step-definitions/dialog.steps.js +193 -0
- package/tests/step-definitions/element.steps.js +356 -0
- package/tests/step-definitions/field.steps.js +653 -0
- package/tests/step-definitions/file-download.steps.js +211 -0
- package/tests/step-definitions/form.steps.js +333 -0
- package/tests/step-definitions/iframe.steps.js +228 -0
- package/tests/step-definitions/input.steps.js +202 -0
- package/tests/step-definitions/javascript.steps.js +232 -0
- package/tests/step-definitions/keyboard.steps.js +112 -0
- package/tests/step-definitions/link.steps.js +142 -0
- package/tests/step-definitions/metatag.steps.js +91 -0
- package/tests/step-definitions/modal.steps.js +244 -0
- package/tests/step-definitions/navigation.steps.js +218 -0
- package/tests/step-definitions/network.steps.js +280 -0
- package/tests/step-definitions/path.steps.js +141 -0
- package/tests/step-definitions/response.steps.js +98 -0
- package/tests/step-definitions/responsive.steps.js +125 -0
- package/tests/step-definitions/rest.steps.js +111 -0
- package/tests/step-definitions/{webship-screenshot.js → screenshot.steps.js} +1 -5
- package/tests/step-definitions/scroll.steps.js +189 -0
- package/tests/step-definitions/{webship-selectors.js → selectors.steps.js} +64 -27
- package/tests/step-definitions/storage.steps.js +194 -0
- package/tests/step-definitions/table.steps.js +181 -0
- package/tests/step-definitions/video.steps.js +178 -0
- package/tests/step-definitions/wait.steps.js +400 -0
- package/tests/step-definitions/web-first.steps.js +298 -0
- package/tests/step-definitions/webship.js +741 -1477
- package/tests/step-definitions/xml.steps.js +411 -0
- package/tests/step-definitions/yaml.steps.js +913 -0
- package/tests/step-definitions-diffy/webship-diffy.js +0 -13
- package/tsconfig.json +19 -3
- package/videos/README.md +32 -0
- package/.travis-ci.yml +0 -16
|
@@ -179,9 +179,6 @@ When(/^(?:I |we )?resize window to "([^"]*)"$/, async function (breakpoint) {
|
|
|
179
179
|
* Example #5: But I take screenshot
|
|
180
180
|
* Example #6: Then take screenshot
|
|
181
181
|
* Example #7: And take screenshot
|
|
182
|
-
* Example #8: When I take screenshot
|
|
183
|
-
* Example #9: When we take screenshot
|
|
184
|
-
* Example #10: Given I take screenshot
|
|
185
182
|
*
|
|
186
183
|
*/
|
|
187
184
|
Then(/^(?:I |we )?take screenshot$/, async function () {
|
|
@@ -198,10 +195,6 @@ Then(/^(?:I |we )?take screenshot$/, async function () {
|
|
|
198
195
|
* Example #4: And we take screenshots for all breakpoints
|
|
199
196
|
* Example #5: Then take screenshots for all breakpoints
|
|
200
197
|
* Example #6: And take screenshots for all breakpoints
|
|
201
|
-
* Example #7: When I take screenshots for all breakpoints
|
|
202
|
-
* Example #8: When we take screenshots for all breakpoints
|
|
203
|
-
* Example #9: But I take screenshots for all breakpoints
|
|
204
|
-
* Example #10: Given I take screenshots for all breakpoints
|
|
205
198
|
*
|
|
206
199
|
*/
|
|
207
200
|
Then(/^(?:I |we )?take screenshots for all breakpoints$/, async function () {
|
|
@@ -274,9 +267,6 @@ Then(/^(I |we )*send screenshots to diffy with name "([^"]*)"$/, async function
|
|
|
274
267
|
* Example #5: And I create diffy comparison
|
|
275
268
|
* Example #6: And we create diffy comparison
|
|
276
269
|
* Example #7: But I create diffy comparison
|
|
277
|
-
* Example #8: When I create diffy comparison
|
|
278
|
-
* Example #9: When we create diffy comparison
|
|
279
|
-
* Example #10: Given create diffy comparison
|
|
280
270
|
*
|
|
281
271
|
*/
|
|
282
272
|
Then(/^(I |we )*create diffy comparison$/, async function (pronounCase) {
|
|
@@ -451,9 +441,6 @@ function detectPngWidth(buffer) {
|
|
|
451
441
|
* Example #5: And I wait for diffy comparison to complete
|
|
452
442
|
* Example #6: And we wait for diffy comparison to complete
|
|
453
443
|
* Example #7: But I wait for diffy comparison to complete
|
|
454
|
-
* Example #8: When I wait for diffy comparison to complete
|
|
455
|
-
* Example #9: When we wait for diffy comparison to complete
|
|
456
|
-
* Example #10: Given wait for diffy comparison to complete
|
|
457
444
|
*
|
|
458
445
|
*/
|
|
459
446
|
Then(/^(I |we )*wait for diffy comparison to complete$/, { timeout: 60 * 60 * 1000 }, async function (pronounCase) {
|
package/tsconfig.json
CHANGED
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"target": "
|
|
4
|
-
"module": "
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "NodeNext",
|
|
5
|
+
"moduleResolution": "NodeNext",
|
|
6
|
+
"lib": ["ES2022", "DOM"],
|
|
5
7
|
"strict": true,
|
|
8
|
+
"noImplicitAny": false,
|
|
6
9
|
"esModuleInterop": true,
|
|
10
|
+
"resolveJsonModule": true,
|
|
11
|
+
"allowJs": true,
|
|
12
|
+
"checkJs": false,
|
|
13
|
+
"skipLibCheck": true,
|
|
14
|
+
"isolatedModules": true,
|
|
15
|
+
"verbatimModuleSyntax": false,
|
|
7
16
|
"types": ["node"]
|
|
8
17
|
},
|
|
9
|
-
"include": [
|
|
18
|
+
"include": [
|
|
19
|
+
"playwright.config.ts",
|
|
20
|
+
"tests/**/*.ts",
|
|
21
|
+
"tests/**/*.js",
|
|
22
|
+
"bin/**/*.ts",
|
|
23
|
+
"bin/**/*.js"
|
|
24
|
+
],
|
|
25
|
+
"exclude": ["node_modules", "tests/reports", "screenshots"]
|
|
10
26
|
}
|
package/videos/README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# videos/
|
|
2
|
+
|
|
3
|
+
Generated by Playwright when video recording is enabled. Default mode is
|
|
4
|
+
**off** — this directory stays empty unless you opt in.
|
|
5
|
+
|
|
6
|
+
## Enable recording
|
|
7
|
+
|
|
8
|
+
| How | Effect |
|
|
9
|
+
| --- | --- |
|
|
10
|
+
| `WEBSHIP_VIDEO=on npm test` | Record every scenario in this run. |
|
|
11
|
+
| `WEBSHIP_VIDEO=on-failure npm test` | Record every scenario, keep only failures. |
|
|
12
|
+
| Tag scenario `@video` | Force-record this one scenario (mode-independent). |
|
|
13
|
+
| `worldParameters.video.mode = 'on'` in `cucumber.js` | Persist recording for every run. |
|
|
14
|
+
|
|
15
|
+
## File naming
|
|
16
|
+
|
|
17
|
+
Default template: `{datetime}.{feature_file}.{scenario}.{status}.{ext}` —
|
|
18
|
+
e.g. `2026-05-13T01-47-01-567Z.video.Record_a_tiny_click_flow_with_emojis.PASSED.webm`.
|
|
19
|
+
|
|
20
|
+
Mid-scenario `When I save the current video as "name.webm"` overrides the
|
|
21
|
+
template for that scenario.
|
|
22
|
+
|
|
23
|
+
## What is gitignored
|
|
24
|
+
|
|
25
|
+
Everything except this README. `.gitignore` keeps `videos/*.webm` out of
|
|
26
|
+
the repo so binary recordings do not bloat history. Share via your CI
|
|
27
|
+
artefact store or attach to a PR description directly.
|
|
28
|
+
|
|
29
|
+
## Step reference
|
|
30
|
+
|
|
31
|
+
See `docs/04-step-reference.md` → "Video recording" for the full step
|
|
32
|
+
list and mode matrix.
|