webship-js 2.0.5 → 2.0.7
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/.drone.yml +0 -0
- package/.harness/webship-js-pipeline.yml +0 -0
- package/.semaphore/semaphore.yml +0 -0
- package/.teamcity/pom.xml +0 -0
- package/.teamcity/settings.kts +0 -0
- package/.travis.yml +0 -0
- package/AGENTS.md +1 -1
- package/CLAUDE.md +5 -5
- package/Jenkinsfile +0 -0
- package/azure-pipelines.yml +0 -0
- package/bamboo-specs/bamboo.yml +0 -0
- package/bin/generate-reports.js +0 -0
- package/bin/init-webship.js +9 -10
- package/bin/postinstall.js +0 -0
- package/buildspec.yml +0 -0
- package/cloudbuild.yaml +0 -0
- package/codefresh.yml +0 -0
- package/cucumber.js +3 -1
- package/docs/00-quick-start.md +0 -0
- package/docs/01-getting-started.md +0 -0
- package/docs/02-bbr-smart-waits.md +24 -1
- package/docs/03-selector-registry.md +0 -0
- package/docs/04-step-reference.md +4 -0
- package/docs/05-web-first-assertions.md +2 -0
- package/docs/06-network-and-dialogs.md +0 -0
- package/docs/07-auth-state.md +0 -0
- package/docs/08-clock-mocking.md +0 -0
- package/docs/09-api-testing.md +0 -0
- package/docs/10-accessibility.md +24 -3
- package/docs/11-debugging.md +0 -0
- package/docs/12-ai-agent-guide.md +0 -0
- package/docs/13-faq.md +0 -0
- package/docs/14-recipes-cookbook.md +0 -0
- package/docs/15-tag-conventions.md +0 -0
- package/docs/16-ci-cd.md +0 -0
- package/docs/README.md +2 -2
- package/docs/advanced-screenshots/then-i-save-fullscreen-screenshot.md +0 -0
- package/docs/advanced-screenshots/then-i-save-width-x-height-screenshot.md +0 -0
- package/docs/advanced-screenshots/when-i-save-screenshot-name-filename.md +0 -0
- package/docs/advanced-screenshots.md +0 -0
- package/docs/advanced-selectors.md +0 -0
- package/docs/api-step-definitions.md +0 -0
- package/docs/global-settings.md +5 -2
- package/docs/install-webship-js/ddev-webship-js.md +0 -0
- package/docs/step-definitions/given-i-am-anonymous-user.md +0 -0
- package/docs/step-definitions/given-i-am-homepage.md +0 -0
- package/docs/step-definitions/given-i-am-specific-page.md +0 -0
- package/docs/step-definitions/then-i-should-be.md +0 -0
- package/docs/step-definitions/then-i-should-see.md +6 -0
- package/docs/step-definitions/then-item-checkbox.md +0 -0
- package/docs/step-definitions/then-item-link-should-contain-url.md +0 -0
- package/docs/step-definitions/then-item-should-contain.md +0 -0
- package/docs/step-definitions/then-radio-button-value-should-be-selected.md +0 -0
- package/docs/step-definitions/then-response-status-code-should-be-number.md +0 -0
- package/docs/step-definitions/then-value-radio-button-selected.md +0 -0
- package/docs/step-definitions/when-i-attach-file-file-name-element.md +0 -0
- package/docs/step-definitions/when-i-check-checkbox.md +0 -0
- package/docs/step-definitions/when-i-click-link.md +0 -0
- package/docs/step-definitions/when-i-click-operation-text-row.md +0 -0
- package/docs/step-definitions/when-i-fill.md +0 -0
- package/docs/step-definitions/when-i-go-homepage.md +0 -0
- package/docs/step-definitions/when-i-go-specific-page.md +0 -0
- package/docs/step-definitions/when-i-move-backward-one-page.md +0 -0
- package/docs/step-definitions/when-i-move-forward-one-page.md +0 -0
- package/docs/step-definitions/when-i-press-button.md +0 -0
- package/docs/step-definitions/when-i-reload-page.md +0 -0
- package/docs/step-definitions/when-i-scroll.md +0 -0
- package/docs/step-definitions/when-i-select-option-select-list.md +0 -0
- package/docs/step-definitions/when-i-select-radio-button-value.md +0 -0
- package/docs/step-definitions/when-i-uncheck-checkbox.md +0 -0
- package/docs/step-definitions/when-i-wait-ajax-finish.md +0 -0
- package/docs/step-definitions/when-i-wait.md +0 -0
- package/docs/step-definitions.md +0 -0
- package/examples/a11y.html +8 -0
- package/examples/account.html +0 -0
- package/examples/ajax-wait-examples.html +0 -0
- package/examples/cookies.html +0 -0
- package/examples/date.html +0 -0
- package/examples/dynamic-examples.html +0 -0
- package/examples/element-visibility.html +17 -0
- package/examples/element.html +0 -0
- package/examples/field.html +0 -0
- package/examples/keyboard.html +0 -0
- package/examples/links.html +0 -0
- package/examples/modal.html +0 -0
- package/examples/native-dialogs.html +22 -0
- package/examples/never-settles.html +32 -0
- package/examples/path.html +0 -0
- package/examples/table.html +0 -0
- package/examples/test--modal-dialogs.html +0 -0
- package/examples/test--when--i-additionally-select.html +0 -0
- package/examples/test--when--i-select-radio-button.html +0 -0
- package/examples/video-demo.html +0 -0
- package/examples/web-first-text.html +18 -0
- package/package.json +2 -2
- package/playwright.config.ts +0 -0
- package/tests/assets/test-document.pdf +0 -0
- package/tests/features/a11y.feature +22 -0
- package/tests/features/ajax-wait-examples.feature +0 -0
- package/tests/features/cookie.feature +0 -0
- package/tests/features/date.feature +0 -0
- package/tests/features/dynamic-content-examples.feature +0 -0
- package/tests/features/element.feature +0 -0
- package/tests/features/field.feature +0 -0
- package/tests/features/keyboard.feature +0 -0
- package/tests/features/link.feature +0 -0
- package/tests/features/modal-advanced-example.feature +0 -0
- package/tests/features/modal-basic-example.feature +0 -0
- package/tests/features/modal-error-handling-example.feature +0 -0
- package/tests/features/modal.feature +0 -0
- package/tests/features/path.feature +0 -0
- package/tests/features/pronoun-prefix-steps.feature +81 -0
- package/tests/features/response.feature +0 -0
- package/tests/features/responsive.feature +0 -0
- package/tests/features/smart-settle-budget.feature +12 -0
- package/tests/features/table.feature +0 -0
- package/tests/features/test--given--i-am-an-anonymous-user.feature +0 -0
- package/tests/features/test--then--i-save-screenshot.feature +0 -0
- package/tests/features/test--then--i-see-locator.feature +0 -0
- package/tests/features/test--then--i-should-not-see-an-element.feature +11 -1
- package/tests/features/test--then--i-should-see-n-elements.feature +0 -0
- package/tests/features/test--then--print-current-url-and-response.feature +0 -0
- package/tests/features/test--when--i-additionally-select.feature +0 -0
- package/tests/features/test--when--i-follow.feature +0 -0
- package/tests/features/test--when--i-select-radio-button.feature +0 -0
- package/tests/features/video.feature +0 -0
- package/tests/features/wait.feature +0 -0
- package/tests/features/web-first-text.feature +21 -0
- package/tests/features/yaml.feature +0 -0
- package/tests/reports/README.md +0 -0
- package/tests/selectors/_canonical-keys.json +0 -0
- package/tests/selectors/back-end-selectors.json +0 -0
- package/tests/selectors/cms-contentful-admin.json +0 -0
- package/tests/selectors/cms-craft-admin.json +0 -0
- package/tests/selectors/cms-drupal-cms-gin.json +0 -0
- package/tests/selectors/cms-drupal-core-claro.json +0 -0
- package/tests/selectors/cms-generic-admin.json +0 -0
- package/tests/selectors/cms-ghost-admin.json +0 -0
- package/tests/selectors/cms-joomla-admin.json +0 -0
- package/tests/selectors/cms-magento2-admin.json +0 -0
- package/tests/selectors/cms-prestashop-admin.json +0 -0
- package/tests/selectors/cms-shopify-admin.json +0 -0
- package/tests/selectors/cms-strapi-admin.json +0 -0
- package/tests/selectors/cms-typo3-admin.json +0 -0
- package/tests/selectors/cms-woocommerce-front.json +0 -0
- package/tests/selectors/cms-wordpress-admin.json +0 -0
- package/tests/selectors/framework-ant-design.json +0 -0
- package/tests/selectors/framework-bootstrap.json +0 -0
- package/tests/selectors/framework-bulma.json +0 -0
- package/tests/selectors/framework-chakra.json +0 -0
- package/tests/selectors/framework-foundation.json +0 -0
- package/tests/selectors/framework-material-ui.json +0 -0
- package/tests/selectors/framework-shadcn.json +0 -0
- package/tests/selectors/framework-tailwind.json +0 -0
- package/tests/selectors/framework-vuetify.json +0 -0
- package/tests/selectors/front-end-selectors.json +0 -0
- package/tests/selectors/homepage-selectors.json +0 -0
- package/tests/step-definitions/a11y.steps.js +340 -114
- package/tests/step-definitions/action.steps.js +0 -0
- package/tests/step-definitions/api.steps.js +0 -0
- package/tests/step-definitions/assertion.steps.js +18 -3
- package/tests/step-definitions/auth.steps.js +1 -1
- package/tests/step-definitions/clock.steps.js +2 -2
- package/tests/step-definitions/cookie.steps.js +0 -0
- package/tests/step-definitions/debug.steps.js +0 -0
- package/tests/step-definitions/dialog.steps.js +4 -4
- package/tests/step-definitions/element.steps.js +0 -0
- package/tests/step-definitions/field.steps.js +0 -0
- package/tests/step-definitions/file-download.steps.js +0 -0
- package/tests/step-definitions/form.steps.js +0 -0
- package/tests/step-definitions/iframe.steps.js +1 -1
- package/tests/step-definitions/input.steps.js +0 -0
- package/tests/step-definitions/javascript.steps.js +0 -0
- package/tests/step-definitions/keyboard.steps.js +0 -0
- package/tests/step-definitions/link.steps.js +0 -0
- package/tests/step-definitions/metatag.steps.js +0 -0
- package/tests/step-definitions/modal.steps.js +0 -0
- package/tests/step-definitions/navigation.steps.js +0 -0
- package/tests/step-definitions/network.steps.js +1 -1
- package/tests/step-definitions/path.steps.js +0 -0
- package/tests/step-definitions/response.steps.js +0 -0
- package/tests/step-definitions/responsive.steps.js +0 -0
- package/tests/step-definitions/rest.steps.js +0 -0
- package/tests/step-definitions/screenshot.steps.js +0 -0
- package/tests/step-definitions/scroll.steps.js +0 -0
- package/tests/step-definitions/selectors.steps.js +0 -0
- package/tests/step-definitions/storage.steps.js +0 -0
- package/tests/step-definitions/table.steps.js +0 -0
- package/tests/step-definitions/video.steps.js +0 -0
- package/tests/step-definitions/wait.steps.js +3 -3
- package/tests/step-definitions/web-first.steps.js +14 -3
- package/tests/step-definitions/webship.js +57 -20
- package/tests/step-definitions/xml.steps.js +1 -1
- package/tests/step-definitions/yaml.steps.js +1 -1
- package/tsconfig.json +0 -0
- package/videos/README.md +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webship-js",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.7",
|
|
4
4
|
"description": "Webship JS automated functional testing.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"homepage": "https://github.com/webship/webship-js",
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@axe-core/playwright": "^4.11.3",
|
|
39
|
-
"@cucumber/cucumber": "
|
|
39
|
+
"@cucumber/cucumber": "^12",
|
|
40
40
|
"@cucumber/pretty-formatter": "~1",
|
|
41
41
|
"@types/node": "~20",
|
|
42
42
|
"ajv": "^8.20.0",
|
package/playwright.config.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -37,3 +37,25 @@ Feature: Accessibility (a11y) smoke checks
|
|
|
37
37
|
And the page should not violate the accessibility rule "image-alt"
|
|
38
38
|
And the page should not violate the accessibility rule "label"
|
|
39
39
|
And the page should pass the accessibility rules "image-alt, label, button-name"
|
|
40
|
+
|
|
41
|
+
Scenario: Elements hidden from assistive technology are out of scope
|
|
42
|
+
Given I am on "/a11y.html"
|
|
43
|
+
Then every button should have an accessible name
|
|
44
|
+
And every link should have an accessible name
|
|
45
|
+
And every image should have an alt attribute
|
|
46
|
+
And every form field should have an accessible label
|
|
47
|
+
|
|
48
|
+
Scenario: The impact gate covers everything worse than the level named
|
|
49
|
+
Given I am on "/a11y.html"
|
|
50
|
+
Then the page should have no minor accessibility violations
|
|
51
|
+
And the page should have no moderate accessibility violations
|
|
52
|
+
And the page should have no serious accessibility violations
|
|
53
|
+
And the page should have no critical accessibility violations
|
|
54
|
+
And the page should have no accessibility violations
|
|
55
|
+
|
|
56
|
+
Scenario: One step for the whole page
|
|
57
|
+
Given I am on "/a11y.html"
|
|
58
|
+
Then the page should pass the full accessibility check
|
|
59
|
+
And the page should pass the full accessibility check at level "AA"
|
|
60
|
+
And the element "main" should not violate the accessibility rule "image-alt"
|
|
61
|
+
And I print the full accessibility check
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
Feature: Steps that open with the optional "I " or "we " run
|
|
2
|
+
As a tester,
|
|
3
|
+
I want every step that takes the optional pronoun to run,
|
|
4
|
+
because cucumber-js refuses a step whose function declares fewer parameters
|
|
5
|
+
than its pattern has groups: "function has 0 arguments, should have 1".
|
|
6
|
+
|
|
7
|
+
Scenario: Print the accessibility violations
|
|
8
|
+
Given I am on "/a11y.html"
|
|
9
|
+
Then I print accessibility violations
|
|
10
|
+
|
|
11
|
+
Scenario: Clear the auth state
|
|
12
|
+
Given I am on "/cookies.html"
|
|
13
|
+
Then a cookie with the name "session_id" should exist
|
|
14
|
+
When I clear the auth state
|
|
15
|
+
Then a cookie with the name "session_id" should not exist
|
|
16
|
+
|
|
17
|
+
Scenario: Pause and resume the clock
|
|
18
|
+
Given the system time is "2026-05-08T10:00:00Z"
|
|
19
|
+
And I am on the homepage
|
|
20
|
+
When I pause the clock
|
|
21
|
+
And I resume the clock
|
|
22
|
+
Then I should see "Step Definitions Examples:"
|
|
23
|
+
|
|
24
|
+
Scenario: Accept the next dialog
|
|
25
|
+
Given I am on "/native-dialogs.html"
|
|
26
|
+
And I will accept the next dialog
|
|
27
|
+
When I press "Delete item"
|
|
28
|
+
Then I should see "Item deleted #1"
|
|
29
|
+
And the last dialog message should be "Delete this item?"
|
|
30
|
+
|
|
31
|
+
Scenario: Dismiss the next dialog
|
|
32
|
+
Given I am on "/native-dialogs.html"
|
|
33
|
+
And I will dismiss the next dialog
|
|
34
|
+
When I press "Delete item"
|
|
35
|
+
Then I should see "Deletion cancelled #1"
|
|
36
|
+
And the last dialog type should be "confirm"
|
|
37
|
+
|
|
38
|
+
Scenario: Accept all confirmation dialogs
|
|
39
|
+
Given I am on "/native-dialogs.html"
|
|
40
|
+
And I accept all confirmation dialogs
|
|
41
|
+
When I press "Delete item"
|
|
42
|
+
And I press "Delete item"
|
|
43
|
+
Then I should see "Item deleted #2"
|
|
44
|
+
|
|
45
|
+
Scenario: Do not accept any confirmation dialogs
|
|
46
|
+
Given I am on "/native-dialogs.html"
|
|
47
|
+
And I do not accept any confirmation dialogs
|
|
48
|
+
When I press "Delete item"
|
|
49
|
+
And I press "Delete item"
|
|
50
|
+
Then I should see "Deletion cancelled #2"
|
|
51
|
+
|
|
52
|
+
Scenario: Switch to the root document
|
|
53
|
+
Given I am on the homepage
|
|
54
|
+
When I switch to the root document
|
|
55
|
+
Then I should see "Step Definitions Examples:"
|
|
56
|
+
|
|
57
|
+
Scenario: Start recording network requests
|
|
58
|
+
Given I am on the homepage
|
|
59
|
+
And I start recording network requests
|
|
60
|
+
When I go to "/about-us.html"
|
|
61
|
+
Then a request to "about-us.html" should have been made
|
|
62
|
+
And no request to "contact-us.html" should have been made
|
|
63
|
+
|
|
64
|
+
Scenario Outline: Wait until the page settles
|
|
65
|
+
Given I am on the homepage
|
|
66
|
+
When I wait until <condition>
|
|
67
|
+
Then I should see "Step Definitions Examples:"
|
|
68
|
+
|
|
69
|
+
Examples:
|
|
70
|
+
| condition |
|
|
71
|
+
| the network is idle |
|
|
72
|
+
| requests are complete |
|
|
73
|
+
| network goes quiet |
|
|
74
|
+
| the page is interactive |
|
|
75
|
+
| page is interactive |
|
|
76
|
+
| pending timers settle |
|
|
77
|
+
|
|
78
|
+
Scenario: Print the last XML and YAML responses
|
|
79
|
+
Given I am on the homepage
|
|
80
|
+
When I print last XML response
|
|
81
|
+
And I print last YAML response
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Feature: Smart wait stays inside its budget
|
|
2
|
+
|
|
3
|
+
A page with analytics, a chat widget or a self-rescheduling timer never
|
|
4
|
+
reaches network idle and never drains its pending timers. The smart wait has
|
|
5
|
+
to spend its budget and hand control back, rather than block until cucumber
|
|
6
|
+
kills the step.
|
|
7
|
+
|
|
8
|
+
Scenario: A page that never settles does not stall the run
|
|
9
|
+
Given I am on "/never-settles.html"
|
|
10
|
+
Then I should see "Never Settles"
|
|
11
|
+
When I wait until the page is loaded
|
|
12
|
+
Then I should see "Never Settles"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -5,4 +5,14 @@ Feature: An example to ensure that a specific element is not visible on the curr
|
|
|
5
5
|
Scenario: Ensure to test that a specific element is not visible by its label
|
|
6
6
|
Given I am on "/test--then--i-should--see-text-in-element.html"
|
|
7
7
|
Then I should not see an "Eamil" element
|
|
8
|
-
And I should not see a "Country" element
|
|
8
|
+
And I should not see a "Country" element
|
|
9
|
+
|
|
10
|
+
Scenario: An element that is hidden is not seen
|
|
11
|
+
Given I am on "/element-visibility.html"
|
|
12
|
+
Then I should not see a "Hidden note" element
|
|
13
|
+
And I should not see a "Promo banner" element
|
|
14
|
+
|
|
15
|
+
Scenario: A label stands for the control it labels
|
|
16
|
+
Given I am on "/element-visibility.html"
|
|
17
|
+
Then I should see an "Email" element
|
|
18
|
+
And I should not see a "Ghost label" element
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Feature: Web-first text assertions read the text a visitor reads
|
|
2
|
+
As a tester,
|
|
3
|
+
I want "<selector>" should contain text "<text>" to ignore the whitespace the markup carries,
|
|
4
|
+
because a line the markup wraps reads as one line on the page.
|
|
5
|
+
|
|
6
|
+
Scenario: Text that the markup wraps onto a second line
|
|
7
|
+
Given I am on "/web-first-text.html"
|
|
8
|
+
Then ".site-footer" should contain text "Powered by Example"
|
|
9
|
+
And ".site-footer" should contain text "Powered by"
|
|
10
|
+
|
|
11
|
+
Scenario: Non-breaking spaces count as spaces
|
|
12
|
+
Given I am on "/web-first-text.html"
|
|
13
|
+
Then ".price" should contain text "Price: $99"
|
|
14
|
+
|
|
15
|
+
Scenario: The expected text is collapsed too
|
|
16
|
+
Given I am on "/web-first-text.html"
|
|
17
|
+
Then ".site-footer" should contain text "Powered by Example"
|
|
18
|
+
|
|
19
|
+
Scenario: Should have text stays the exact match
|
|
20
|
+
Given I am on "/web-first-text.html"
|
|
21
|
+
Then ".tagline" should have text "Built with care"
|
|
File without changes
|
package/tests/reports/README.md
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|