webship-js 2.0.10 → 2.0.12
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 +10 -1
- package/.drone.yml +7 -7
- package/.github/ISSUE_TEMPLATE/issue.md +37 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +24 -0
- package/.github/workflows/github-actions.yml +101 -4
- package/.gitlab-ci.yml +9 -4
- package/.harness/webship-js-pipeline.yml +5 -6
- package/.semaphore/semaphore.yml +6 -9
- package/.teamcity/settings.kts +7 -6
- package/.travis.yml +6 -1
- package/AGENTS.md +1 -1
- package/CLAUDE.md +69 -24
- package/Jenkinsfile +5 -3
- package/README.md +13 -1
- package/azure-pipelines.yml +17 -8
- package/bamboo-specs/bamboo.yml +9 -15
- package/bin/generate-reports.js +51 -7
- package/bin/init-webship.js +127 -23
- package/bitbucket-pipelines.yml +5 -1
- package/buildspec.yml +6 -7
- package/cloudbuild.yaml +28 -12
- package/codefresh.yml +6 -6
- package/cucumber.js +46 -11
- package/docs/00-quick-start.md +38 -7
- package/docs/02-bbr-smart-waits.md +21 -10
- package/docs/03-selector-registry.md +24 -0
- package/docs/04-step-reference.md +53 -27
- package/docs/05-web-first-assertions.md +6 -0
- package/docs/07-auth-state.md +1 -1
- package/docs/08-clock-mocking.md +21 -2
- package/docs/09-api-testing.md +40 -2
- package/docs/10-accessibility.md +2 -0
- package/docs/11-debugging.md +24 -1
- package/docs/12-ai-agent-guide.md +8 -1
- package/docs/13-faq.md +75 -1
- package/docs/14-recipes-cookbook.md +2 -0
- package/docs/15-tag-conventions.md +5 -1
- package/docs/16-ci-cd.md +161 -124
- package/docs/README.md +5 -5
- package/docs/advanced-screenshots.md +3 -1
- package/docs/api-step-definitions.md +16 -2
- package/docs/global-settings.md +70 -18
- package/docs/install-webship-js/ddev-webship-js.md +3 -0
- package/docs/install-webship-js.md +16 -2
- package/docs/step-definitions/then-i-should-see.md +14 -1
- package/docs/step-definitions/then-item-checkbox.md +2 -0
- package/docs/step-definitions/when-i-fill.md +4 -0
- package/docs/step-definitions/when-i-select-option-select-list.md +2 -0
- package/examples/a11y-legacy-widget.html +34 -0
- package/examples/auth-state.html +42 -0
- package/examples/choice-controls.html +29 -0
- package/examples/clock.html +33 -0
- package/examples/datetime-fields.html +52 -0
- package/examples/downloads/webship-archive.zip +0 -0
- package/examples/downloads/webship-notes.txt +4 -0
- package/examples/downloads/webship-report.csv +4 -0
- package/examples/downloads.html +16 -0
- package/examples/element-selector-hint.html +16 -0
- package/examples/element-viewport.html +42 -0
- package/examples/field-states.html +27 -0
- package/examples/field-types.html +98 -0
- package/examples/fill-in-empty.html +26 -0
- package/examples/fill-unreachable.html +27 -0
- package/examples/iframe-inner.html +20 -0
- package/examples/iframe-nested.html +16 -0
- package/examples/iframe-newsletter.html +29 -0
- package/examples/iframe-order.html +26 -0
- package/examples/iframe-outer.html +15 -0
- package/examples/iframe.html +21 -0
- package/examples/javascript-errors.html +35 -0
- package/examples/links.html +1 -0
- package/examples/metatags.html +18 -0
- package/examples/mouse-and-pointer.html +83 -0
- package/examples/multi-value-fields.html +54 -0
- package/examples/native-dialogs.html +8 -0
- package/examples/network.html +83 -0
- package/examples/registered-names.html +15 -0
- package/examples/scroll-horizontal.html +50 -0
- package/examples/select-by-label.html +33 -0
- package/examples/selectors-position.html +29 -0
- package/examples/settle-budget.html +21 -0
- package/examples/sorted-tables.html +38 -0
- package/examples/storage.html +57 -0
- package/examples/text-matching.html +48 -0
- package/examples/text-order.html +25 -0
- package/examples/touch.html +22 -0
- package/examples/viewport-size.html +24 -0
- package/examples/viewport-top.html +36 -0
- package/examples/wait-conditions.html +69 -0
- package/examples/web-first.html +99 -0
- package/package.json +24 -2
- package/playwright.config.ts +3 -1
- package/tests/assets/catalog.xml +19 -0
- package/tests/assets/feed-namespaced.xml +13 -0
- package/tests/assets/sitemap.xml +14 -0
- package/tests/assets/webship-site-expected.yaml +21 -0
- package/tests/assets/webship-site.schema.json +46 -0
- package/tests/assets/webship-site.yaml +21 -0
- package/tests/check-api-launch-url.js +106 -0
- package/tests/check-assets.js +103 -0
- package/tests/check-attachments.js +105 -0
- package/tests/check-breakpoints.js +117 -0
- package/tests/check-clock.js +143 -0
- package/tests/check-config.js +90 -0
- package/tests/check-context.js +215 -0
- package/tests/check-dry-run.js +104 -0
- package/tests/check-examples.js +241 -0
- package/tests/check-exit-report.js +141 -0
- package/tests/check-javascript-errors.js +105 -0
- package/tests/check-must-fail.js +85 -0
- package/tests/check-paths.js +82 -0
- package/tests/check-report.js +119 -0
- package/tests/check-scaffold.js +246 -0
- package/tests/check-screenshots.js +117 -0
- package/tests/check-settle-verbs.js +137 -0
- package/tests/check-time-limit.js +104 -0
- package/tests/check-video.js +156 -0
- package/tests/check-world.js +167 -0
- package/tests/features/a11y.feature +18 -0
- package/tests/features/api-base-url.feature +25 -0
- package/tests/features/api-form-data.feature +18 -0
- package/tests/features/api-json-paths.feature +24 -0
- package/tests/features/api-response-contains.feature +21 -0
- package/tests/features/api-response-header-presence.feature +17 -0
- package/tests/features/api-response-header.feature +17 -0
- package/tests/features/api-saved-placeholders.feature +37 -0
- package/tests/features/api-step-definitions-individual.feature +1 -1
- package/tests/features/api-tables.feature +40 -0
- package/tests/features/auth-state.feature +32 -0
- package/tests/features/breakpoints.feature +25 -0
- package/tests/features/choice-controls.feature +35 -0
- package/tests/features/clock.feature +27 -0
- package/tests/features/complete-api-testing-examples.feature +1 -1
- package/tests/features/cookie.feature +9 -0
- package/tests/features/datetime-field-lookup.feature +29 -0
- package/tests/features/dialog.feature +27 -0
- package/tests/features/element-selector-hint.feature +14 -0
- package/tests/features/element.feature +47 -0
- package/tests/features/field-state.feature +21 -0
- package/tests/features/field.feature +104 -0
- package/tests/features/file-download.feature +64 -0
- package/tests/features/fill-in-empty-value.feature +41 -0
- package/tests/features/fill-reachable.feature +13 -0
- package/tests/features/iframe-nested.feature +43 -0
- package/tests/features/iframe.feature +83 -0
- package/tests/features/javascript-tolerated-errors.feature +20 -0
- package/tests/features/javascript.feature +47 -0
- package/tests/features/link.feature +11 -0
- package/tests/features/metatag.feature +38 -0
- package/tests/features/modal-open.feature +13 -0
- package/tests/features/mouse-and-pointer.feature +86 -0
- package/tests/features/multi-value-field-lookup.feature +30 -0
- package/tests/features/network-mocking.feature +80 -0
- package/tests/features/registered-names.feature +14 -0
- package/tests/features/responsive.feature +27 -0
- package/tests/features/scroll-horizontal.feature +55 -0
- package/tests/features/select-by-label.feature +31 -0
- package/tests/features/selector-files.feature +14 -0
- package/tests/features/selectors-position.feature +41 -0
- package/tests/features/selectors-table-header.feature +35 -0
- package/tests/features/settle-budget.feature +11 -0
- package/tests/features/sorted-tables.feature +19 -0
- package/tests/features/storage-quoted-values.feature +26 -0
- package/tests/features/storage.feature +98 -0
- package/tests/features/test--then--i-see-locator.feature +13 -0
- package/tests/features/test--then--i-should--see-text-in-element.feature +9 -1
- package/tests/features/test--then--the-field-should-contain-value.feature +8 -0
- package/tests/features/text-matching.feature +38 -0
- package/tests/features/text-order.feature +14 -0
- package/tests/features/touch.feature +21 -0
- package/tests/features/video.feature +1 -0
- package/tests/features/viewport-top.feature +13 -0
- package/tests/features/wait.feature +89 -0
- package/tests/features/web-first.feature +100 -0
- package/tests/features/xml-namespaces.feature +34 -0
- package/tests/features/xml.feature +96 -0
- package/tests/features/yaml.feature +75 -0
- package/tests/must-fail/api-json-paths.feature +21 -0
- package/tests/must-fail/api-response-contains.feature +23 -0
- package/tests/must-fail/api-response-header-presence.feature +17 -0
- package/tests/must-fail/api-response-header.feature +21 -0
- package/tests/must-fail/api-without-base-url.feature +11 -0
- package/tests/must-fail/assertions.feature +96 -0
- package/tests/must-fail/breakpoints.feature +15 -0
- package/tests/must-fail/choice-controls.feature +25 -0
- package/tests/must-fail/clock.feature +11 -0
- package/tests/must-fail/datetime-field.feature +10 -0
- package/tests/must-fail/element-selector-hint.feature +17 -0
- package/tests/must-fail/field-state.feature +20 -0
- package/tests/must-fail/fill-field.feature +30 -0
- package/tests/must-fail/iframe-text.feature +17 -0
- package/tests/must-fail/modal-open.feature +26 -0
- package/tests/must-fail/multi-value-field.feature +18 -0
- package/tests/must-fail/registered-names.feature +25 -0
- package/tests/must-fail/select-list.feature +15 -0
- package/tests/must-fail/selector-files.feature +10 -0
- package/tests/must-fail/sorted-tables.feature +20 -0
- package/tests/must-fail/storage-before-a-page.feature +13 -0
- package/tests/must-fail/text-matching.feature +16 -0
- package/tests/must-fail/text-order.feature +15 -0
- package/tests/must-fail/viewport-top.feature +20 -0
- package/tests/must-fail/waits.feature +51 -0
- package/tests/must-fail/yaml-numbers.feature +48 -0
- package/tests/reports/README.md +2 -2
- package/tests/step-definitions/a11y.steps.js +36 -23
- package/tests/step-definitions/action.steps.js +22 -8
- package/tests/step-definitions/api.steps.js +349 -67
- package/tests/step-definitions/assertion.steps.js +327 -63
- package/tests/step-definitions/auth.steps.js +15 -18
- package/tests/step-definitions/clock.steps.js +22 -0
- package/tests/step-definitions/debug.steps.js +8 -0
- package/tests/step-definitions/dialog.steps.js +9 -2
- package/tests/step-definitions/element.steps.js +135 -18
- package/tests/step-definitions/field.steps.js +523 -80
- package/tests/step-definitions/file-download.steps.js +74 -10
- package/tests/step-definitions/form.steps.js +76 -29
- package/tests/step-definitions/iframe.steps.js +89 -29
- package/tests/step-definitions/input.steps.js +26 -7
- package/tests/step-definitions/javascript.steps.js +64 -22
- package/tests/step-definitions/modal.steps.js +79 -13
- package/tests/step-definitions/navigation.steps.js +14 -0
- package/tests/step-definitions/network.steps.js +15 -5
- package/tests/step-definitions/response.steps.js +6 -4
- package/tests/step-definitions/responsive.steps.js +26 -33
- package/tests/step-definitions/screenshot.steps.js +26 -9
- package/tests/step-definitions/scroll.steps.js +20 -0
- package/tests/step-definitions/selectors.steps.js +104 -51
- package/tests/step-definitions/storage.steps.js +41 -16
- package/tests/step-definitions/table.steps.js +81 -6
- package/tests/step-definitions/video.steps.js +52 -55
- package/tests/step-definitions/wait.steps.js +209 -54
- package/tests/step-definitions/web-first.steps.js +69 -35
- package/tests/step-definitions/webship.js +807 -128
- package/tests/step-definitions/xml.steps.js +124 -28
- package/tests/step-definitions/yaml.steps.js +90 -46
- package/.scratch/commit.txt +0 -14
- package/.scratch/docs.py +0 -42
- package/.scratch/echo-server.js +0 -8
- package/.scratch/echo.js +0 -35
- package/.scratch/echo.pid +0 -1
- package/.scratch/features/cookies.feature +0 -22
- package/.scratch/http.pid +0 -1
- package/.scratch/https.pid +0 -1
- package/.scratch/issue.md +0 -49
- package/.scratch/one.js +0 -2
- package/.scratch/one.json +0 -280
- package/.scratch/patch.py +0 -163
- package/.scratch/pr.md +0 -30
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
Feature: The API headers and body tables send every row
|
|
2
|
+
As a tester,
|
|
3
|
+
I want the first row of a headers or body table to be sent like the others
|
|
4
|
+
So that no header and no field is silently left out
|
|
5
|
+
|
|
6
|
+
Scenario: The first row of the headers table is sent
|
|
7
|
+
Given the API base URL is "/"
|
|
8
|
+
And I set the following headers:
|
|
9
|
+
| Range | bytes=0-9 |
|
|
10
|
+
| Accept | application/json |
|
|
11
|
+
When I send a GET request to "/example-api.json"
|
|
12
|
+
Then the API response code should be 206
|
|
13
|
+
|
|
14
|
+
Scenario: A headers table that starts with a row naming its columns
|
|
15
|
+
Given the API base URL is "/"
|
|
16
|
+
And I set the following headers:
|
|
17
|
+
| header | value |
|
|
18
|
+
| Range | bytes=0-9 |
|
|
19
|
+
When I send a GET request to "/example-api.json"
|
|
20
|
+
Then the API response code should be 206
|
|
21
|
+
|
|
22
|
+
Scenario: The first row of the request body table is sent
|
|
23
|
+
Given the API base URL is "https://jsonplaceholder.typicode.com"
|
|
24
|
+
And I set the request body with:
|
|
25
|
+
| title | First row |
|
|
26
|
+
| userId | 1 |
|
|
27
|
+
When I send a POST request to "/posts"
|
|
28
|
+
Then the API response code should be 201
|
|
29
|
+
And the JSON response should have "title" equal to "First row"
|
|
30
|
+
And the JSON response should have "userId" equal to 1
|
|
31
|
+
|
|
32
|
+
Scenario: A request body table that starts with a row naming its columns
|
|
33
|
+
Given the API base URL is "https://jsonplaceholder.typicode.com"
|
|
34
|
+
And I set the request body with:
|
|
35
|
+
| field | value |
|
|
36
|
+
| title | Second row |
|
|
37
|
+
When I send a POST request to "/posts"
|
|
38
|
+
Then the API response code should be 201
|
|
39
|
+
And the JSON response should have "title" equal to "Second row"
|
|
40
|
+
And the JSON response should not have property "field"
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
Feature: Save and restore the auth state
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to save the cookies and the local storage of a signed-in visitor to a file and restore them later,
|
|
4
|
+
so that a scenario starts signed in without going through the sign-in form.
|
|
5
|
+
|
|
6
|
+
Scenario: Save the state of a signed-in visitor, then restore it
|
|
7
|
+
Given I am on "/auth-state.html"
|
|
8
|
+
Then "#auth-status" should have text "You are not signed in"
|
|
9
|
+
When I press "Sign in"
|
|
10
|
+
Then "#auth-status" should have text "Signed in as Webship Tester"
|
|
11
|
+
When I save the auth state to "tests/auth/webship-tester.json"
|
|
12
|
+
And I clear the auth state
|
|
13
|
+
And I reload the page
|
|
14
|
+
Then "#auth-status" should have text "You are not signed in"
|
|
15
|
+
And a cookie with the name "webship_session" should not exist
|
|
16
|
+
When I restore the auth state from "tests/auth/webship-tester.json"
|
|
17
|
+
And I am on "/auth-state.html"
|
|
18
|
+
Then "#auth-status" should have text "Signed in as Webship Tester"
|
|
19
|
+
And a cookie with the name "webship_session" and the value "signed-in" should exist
|
|
20
|
+
|
|
21
|
+
Scenario: The saved state carries cookies and local storage to another page
|
|
22
|
+
Given I am on "/storage.html"
|
|
23
|
+
And the cookie "webship_session" is set to "signed-in"
|
|
24
|
+
And the local storage "webship_user" is set to "Webship Editor"
|
|
25
|
+
When we save the auth state to "tests/auth/webship-editor.json"
|
|
26
|
+
And we clear the auth state
|
|
27
|
+
And we restore the auth state from "tests/auth/webship-editor.json"
|
|
28
|
+
And I am on "/auth-state.html"
|
|
29
|
+
Then "#auth-status" should have text "Signed in as Webship Editor"
|
|
30
|
+
When I am on "/storage.html"
|
|
31
|
+
Then "#cookies" should have text "webship_session = signed-in"
|
|
32
|
+
And "#local-storage" should have text "webship_user = Webship Editor"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
Feature: One breakpoint registry for every step and tag
|
|
2
|
+
The viewing-the-site step, the set-the-viewport step and the tags for
|
|
3
|
+
mobile and desktop read the same named sizes: the built-in names, the
|
|
4
|
+
project's worldParameters.selectors.breakpoints,
|
|
5
|
+
WEBSHIP_SELECTORS_BREAKPOINTS and the names a scenario adds.
|
|
6
|
+
tests/check-breakpoints.js covers the environment variable and the
|
|
7
|
+
breakpoint marked default.
|
|
8
|
+
|
|
9
|
+
Scenario: The viewing-the-site step knows the built-in mobile, tablet and desktop
|
|
10
|
+
Given I am on "/viewport-size.html"
|
|
11
|
+
When I am viewing the site on a "mobile" screen
|
|
12
|
+
Then "#viewport-size" should have text "Viewport is 375 by 667"
|
|
13
|
+
When I am viewing the site on a tablet device
|
|
14
|
+
Then "#viewport-size" should have text "Viewport is 768 by 1024"
|
|
15
|
+
When I am viewing the site on a "desktop" screen
|
|
16
|
+
Then "#viewport-size" should have text "Viewport is 1200 by 900"
|
|
17
|
+
|
|
18
|
+
Scenario: A breakpoint a scenario adds reaches the viewing-the-site step
|
|
19
|
+
Given I am on "/viewport-size.html"
|
|
20
|
+
And the following responsive breakpoints:
|
|
21
|
+
| pocket | 320 | 480 |
|
|
22
|
+
When I am viewing the site on a "pocket" screen
|
|
23
|
+
Then "#viewport-size" should have text "Viewport is 320 by 480"
|
|
24
|
+
When I set the viewport to the "xxl" breakpoint
|
|
25
|
+
Then "#viewport-size" should have text "Viewport is 1400 by 900"
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
Feature: Checkboxes, radio buttons and fields named by their label, name or id
|
|
2
|
+
As a tester,
|
|
3
|
+
I want the checkbox, radio button and field steps to find a control the way the check steps do,
|
|
4
|
+
so that a scenario names a control by what the form shows.
|
|
5
|
+
|
|
6
|
+
Scenario: The state of a checkbox named by its label, its name or its id
|
|
7
|
+
Given I am on "/choice-controls.html"
|
|
8
|
+
Then the "Newsletter" checkbox should be checked
|
|
9
|
+
And the "#opt-news" checkbox should be checked
|
|
10
|
+
And the checkbox "terms" should not be checked
|
|
11
|
+
And the "opt-terms" checkbox is not checked
|
|
12
|
+
And the checkbox "Accept the terms" is not checked
|
|
13
|
+
|
|
14
|
+
Scenario: Check and uncheck a checkbox named by its label or its name
|
|
15
|
+
Given I am on "/choice-controls.html"
|
|
16
|
+
When I check the checkbox "Accept the terms"
|
|
17
|
+
And I uncheck the checkbox "newsletter"
|
|
18
|
+
Then the checkbox "terms" is checked
|
|
19
|
+
And the "Newsletter" checkbox should not be checked
|
|
20
|
+
|
|
21
|
+
Scenario: The state of a radio button named by its label, its id or its value
|
|
22
|
+
Given I am on "/choice-controls.html"
|
|
23
|
+
Then the radio button "Premium" should be selected
|
|
24
|
+
And the "plan-basic" radio button is not selected
|
|
25
|
+
And the radio button "basic" should not be selected
|
|
26
|
+
When I choose the radio button "Basic"
|
|
27
|
+
Then the radio button "basic" should be selected
|
|
28
|
+
And the "Premium" radio button is not selected
|
|
29
|
+
|
|
30
|
+
Scenario: Fill a field named by its label or its name
|
|
31
|
+
Given I am on "/choice-controls.html"
|
|
32
|
+
When I fill in the field "City" with "Amman"
|
|
33
|
+
And I fill in the field "nickname" with "Ali"
|
|
34
|
+
Then "#city" should have value "Amman"
|
|
35
|
+
And "#nick" should have value "Ali"
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Feature: The browser clock
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to set the time the page reads and move it forward,
|
|
4
|
+
so that an autosave, a timeout or a date can be tested without waiting for it.
|
|
5
|
+
|
|
6
|
+
Scenario: Advance the clock by milliseconds, seconds and minutes
|
|
7
|
+
Given the system time is "2026-05-08T10:00:00Z"
|
|
8
|
+
And I am on "/clock.html"
|
|
9
|
+
Then "#today" should have text "2026-05-08"
|
|
10
|
+
And "#autosave" should have text "Draft not saved yet"
|
|
11
|
+
When I advance the clock by 1000 ms
|
|
12
|
+
Then "#autosave" should have text "Draft not saved yet"
|
|
13
|
+
When I advance the clock by 29 seconds
|
|
14
|
+
Then "#autosave" should have text "Draft saved"
|
|
15
|
+
And "#session" should have text "Session active"
|
|
16
|
+
When we advance the clock by 1 second
|
|
17
|
+
And I advance the clock by 4 minutes
|
|
18
|
+
Then "#session" should have text "Session active"
|
|
19
|
+
When I advance the clock by 1 minute
|
|
20
|
+
Then "#session" should have text "Session expired"
|
|
21
|
+
|
|
22
|
+
Scenario: Set the system time
|
|
23
|
+
Given the system time is "2026-12-31T23:59:00Z"
|
|
24
|
+
And I am on "/clock.html"
|
|
25
|
+
Then "#today" should have text "2026-12-31"
|
|
26
|
+
When I set the system time to "2027-01-01T00:00:30Z"
|
|
27
|
+
Then "#today" should have text "2027-01-01"
|
|
@@ -130,7 +130,7 @@ Feature: Complete API Testing Examples - All Step Definitions
|
|
|
130
130
|
Scenario: Response Header Validation
|
|
131
131
|
When I send a GET request to "/posts/1"
|
|
132
132
|
Then the API response code should be 200
|
|
133
|
-
And the response header "Content-Type" should be "application/json"
|
|
133
|
+
And the response header "Content-Type" should be "application/json; charset=utf-8"
|
|
134
134
|
|
|
135
135
|
Scenario: Placeholder Usage
|
|
136
136
|
Given I set placeholder "{{postId}}" to "1"
|
|
@@ -11,3 +11,12 @@ Feature: Cookie step definitions
|
|
|
11
11
|
And a cookie with the name "language" and the value "fr" should not exist
|
|
12
12
|
And a cookie with the name "preferences" and a value containing "lightmode" should not exist
|
|
13
13
|
And a cookie with a name containing "old" should not exist
|
|
14
|
+
|
|
15
|
+
Scenario: Part of a cookie name together with its value
|
|
16
|
+
Given I am on "/cookies.html"
|
|
17
|
+
Then a cookie with a name containing "pref" and the value "darkmode-enabled" should exist
|
|
18
|
+
And a cookie with a name containing "session" and the value "abc123" should exist
|
|
19
|
+
And a cookie with a name containing "session" and the value "expired" should not exist
|
|
20
|
+
And a cookie with a name containing "lang" and the value "fr" should not exist
|
|
21
|
+
And a cookie with a name containing "pref" and a value containing "lightmode" should not exist
|
|
22
|
+
And a cookie with a name containing "old" and a value containing "darkmode" should not exist
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
Feature: Find the inputs of a datetime field by its own label
|
|
2
|
+
As a tester,
|
|
3
|
+
I want a datetime step to fill the inputs of the field it names and no other,
|
|
4
|
+
so that a form with several date fields is filled in the right places.
|
|
5
|
+
|
|
6
|
+
Scenario: A label that contains the text of another one is not taken for it
|
|
7
|
+
Given I am on "/datetime-fields.html"
|
|
8
|
+
When I fill in the date part of the datetime field "Start" with "2026-05-08"
|
|
9
|
+
Then "#start-date" should have value "2026-05-08"
|
|
10
|
+
And "#restart-date" should have value ""
|
|
11
|
+
|
|
12
|
+
Scenario: Two fields in one paragraph
|
|
13
|
+
Given I am on "/datetime-fields.html"
|
|
14
|
+
When I fill in the datetime field "Closing" with date "2026-06-30" and time "18:00"
|
|
15
|
+
And I fill in the date part of the datetime field "Opening" with "2026-06-01"
|
|
16
|
+
Then "#closing-date" should have value "2026-06-30"
|
|
17
|
+
And "#closing-time" should have value "18:00"
|
|
18
|
+
And "#opening-date" should have value "2026-06-01"
|
|
19
|
+
|
|
20
|
+
Scenario: A label alone in its wrapper
|
|
21
|
+
Given I am on "/datetime-fields.html"
|
|
22
|
+
When I fill in the datetime field "Arrival" with date "2026-07-04" and time "08:30"
|
|
23
|
+
Then "#arrival-date" should have value "2026-07-04"
|
|
24
|
+
And "#arrival-time" should have value "08:30"
|
|
25
|
+
And "#leaving-date" should have value ""
|
|
26
|
+
And "#leaving-time" should have value ""
|
|
27
|
+
When I fill in the time part of the datetime field "Leaving" with "20:15"
|
|
28
|
+
Then "#leaving-time" should have value "20:15"
|
|
29
|
+
And "#arrival-time" should have value "08:30"
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Feature: Native browser dialogs
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to answer a prompt and read what a dialog said,
|
|
4
|
+
so that a flow behind an alert, a confirm or a prompt can be tested.
|
|
5
|
+
|
|
6
|
+
Scenario: Accept the next prompt with a text
|
|
7
|
+
Given I am on "/native-dialogs.html"
|
|
8
|
+
And I will accept the next dialog with "Quarterly report"
|
|
9
|
+
When I press "Rename item"
|
|
10
|
+
Then I should see "Name: Quarterly report"
|
|
11
|
+
And the last dialog type should be "prompt"
|
|
12
|
+
And the last dialog message should contain "new name"
|
|
13
|
+
|
|
14
|
+
Scenario: Read a part of the message of a confirm
|
|
15
|
+
Given I am on "/native-dialogs.html"
|
|
16
|
+
And we will accept the next dialog with "ignored by a confirm"
|
|
17
|
+
When I press "Delete item"
|
|
18
|
+
Then I should see "Item deleted #1"
|
|
19
|
+
And the last dialog message should contain "Delete this"
|
|
20
|
+
And the last dialog type should be "confirm"
|
|
21
|
+
|
|
22
|
+
Scenario: Dismiss a prompt
|
|
23
|
+
Given I am on "/native-dialogs.html"
|
|
24
|
+
And I will dismiss the next dialog
|
|
25
|
+
When I press "Rename item"
|
|
26
|
+
Then I should see "Rename cancelled"
|
|
27
|
+
And the last dialog message should contain "Enter the new name"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Feature: An element named by its text, next to the same element named by a selector
|
|
2
|
+
`I should see a "…" element` reads its argument as the exact text of an
|
|
3
|
+
element or of a label; the web-first steps read a CSS selector.
|
|
4
|
+
|
|
5
|
+
Scenario: The text of an element and its selector
|
|
6
|
+
Given I am on "/element-selector-hint.html"
|
|
7
|
+
Then I should see a "First news item" element
|
|
8
|
+
And ".news-item" should be visible
|
|
9
|
+
And "header" should be visible
|
|
10
|
+
|
|
11
|
+
Scenario: A selector given to the negative is read as a text
|
|
12
|
+
Given I am on "/element-selector-hint.html"
|
|
13
|
+
Then I should not see a ".news-item" element
|
|
14
|
+
And I should not see a "Third news item" element
|
|
@@ -14,3 +14,50 @@ Feature: Element step definitions
|
|
|
14
14
|
Given I am on "/element.html"
|
|
15
15
|
When I click on the element "#btn"
|
|
16
16
|
Then I should see "clicked"
|
|
17
|
+
|
|
18
|
+
Scenario: No element has an attribute value containing a text
|
|
19
|
+
Given I am on "/element.html"
|
|
20
|
+
Then the element "p" with the attribute "data-role" and the value containing "tro" should exist
|
|
21
|
+
And the element "p" with the attribute "data-role" and the value containing "missing" should not exist
|
|
22
|
+
|
|
23
|
+
Scenario: Trigger a JS event on an element
|
|
24
|
+
Given I am on "/element-viewport.html"
|
|
25
|
+
Then "#event-log" should have text "No event yet"
|
|
26
|
+
When I trigger the JS event "change" on the element "#country"
|
|
27
|
+
Then "#event-log" should have text "The change event reached the country field"
|
|
28
|
+
When I trigger the JS event "webship-ping" on the element "#left-box"
|
|
29
|
+
Then "#event-log" should have text "The webship-ping event reached the left box"
|
|
30
|
+
|
|
31
|
+
Scenario: Hover over an element
|
|
32
|
+
Given I am on "/element-viewport.html"
|
|
33
|
+
When I hover over the element "#hover-button"
|
|
34
|
+
Then "#event-log" should have text "The pointer is over the hover button"
|
|
35
|
+
|
|
36
|
+
Scenario: Scroll to an element below the fold
|
|
37
|
+
Given I am on "/element-viewport.html"
|
|
38
|
+
Then the element "#top-banner" should be displayed within a viewport
|
|
39
|
+
And the element "#below-fold" should not be displayed within a viewport
|
|
40
|
+
When I scroll to the element "#below-fold"
|
|
41
|
+
Then the element "#below-fold" should be displayed within a viewport
|
|
42
|
+
And the element "#top-banner" should not be displayed within a viewport
|
|
43
|
+
|
|
44
|
+
Scenario: Element within the viewport with a top offset
|
|
45
|
+
Given I am on "/element-viewport.html"
|
|
46
|
+
Then the element "#centered-box" should be displayed within a viewport with a top offset of 60 pixels
|
|
47
|
+
And the element "#top-banner" should not be displayed within a viewport with a top offset of 60 pixels
|
|
48
|
+
And the element "#below-fold" should not be displayed within a viewport with a top offset of 60 pixels
|
|
49
|
+
|
|
50
|
+
Scenario: Element at the top of the viewport
|
|
51
|
+
Given I am on "/element-viewport.html"
|
|
52
|
+
Then the element "#top-banner" should be at the top of the viewport
|
|
53
|
+
|
|
54
|
+
Scenario: Element centered in the viewport
|
|
55
|
+
Given I am on "/element-viewport.html"
|
|
56
|
+
Then the element "#centered-box" should be centered in the viewport
|
|
57
|
+
|
|
58
|
+
Scenario: Element centered in the viewport after a resize
|
|
59
|
+
Given I am on "/element-viewport.html"
|
|
60
|
+
When I set the viewport size to 800x600
|
|
61
|
+
Then the element "#centered-box" should be centered in the viewport
|
|
62
|
+
When I scroll to the element "#below-fold"
|
|
63
|
+
Then the element "#below-fold" should be centered in the viewport
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Feature: The state of a field
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to check that a field is enabled, disabled, editable or read-only,
|
|
4
|
+
so that a form shows the right fields as locked.
|
|
5
|
+
|
|
6
|
+
Scenario: An enabled field that can be edited
|
|
7
|
+
Given I am on "/field-states.html"
|
|
8
|
+
Then the field "Username" should have "enabled" state
|
|
9
|
+
And the field "Username" should have "editable" state
|
|
10
|
+
|
|
11
|
+
Scenario: A disabled field
|
|
12
|
+
Given I am on "/field-states.html"
|
|
13
|
+
Then the field "Account ID" should have "disabled" state
|
|
14
|
+
And the field "account_id" should have "disabled" state
|
|
15
|
+
|
|
16
|
+
Scenario: A read-only field is enabled but cannot be edited
|
|
17
|
+
Given I am on "/field-states.html"
|
|
18
|
+
Then the field "Reference" should have "read-only" state
|
|
19
|
+
And the field "Reference" should have "readonly" state
|
|
20
|
+
And the field "Reference" should have "enabled" state
|
|
21
|
+
And the field "Notes" should have "read-only" state
|
|
@@ -23,3 +23,107 @@ Feature: Field step definitions
|
|
|
23
23
|
Scenario: Disable browser validation
|
|
24
24
|
Given I am on "/field.html"
|
|
25
25
|
And browser validation for the form "#f" is disabled
|
|
26
|
+
|
|
27
|
+
Scenario: Enabled and disabled state of a field
|
|
28
|
+
Given I am on "/field-types.html"
|
|
29
|
+
Then the field "Account ID" should have "disabled" state
|
|
30
|
+
And the field "account_id" should have "disabled" state
|
|
31
|
+
And the field "Display name" should have "enabled" state
|
|
32
|
+
And the field "#display-name" should have "enabled" state
|
|
33
|
+
|
|
34
|
+
Scenario: Fill a multi-value field
|
|
35
|
+
Given I am on "/field-types.html"
|
|
36
|
+
When I fill in the multi-value field "tags" with the following values:
|
|
37
|
+
| bdd |
|
|
38
|
+
| testing |
|
|
39
|
+
| webship |
|
|
40
|
+
And we fill in the multi-value field "phones" with the following values:
|
|
41
|
+
| 0790000000 |
|
|
42
|
+
| 0791111111 |
|
|
43
|
+
Then "#tags-1" should have value "bdd"
|
|
44
|
+
And "#tags-2" should have value "testing"
|
|
45
|
+
And "#tags-3" should have value "webship"
|
|
46
|
+
And "#phones-1" should have value "0790000000"
|
|
47
|
+
And "#phones-2" should have value "0791111111"
|
|
48
|
+
|
|
49
|
+
Scenario: Fill a rich-text field
|
|
50
|
+
Given I am on "/field-types.html"
|
|
51
|
+
When I fill in the WYSIWYG field "body" with the "Hello from the editor"
|
|
52
|
+
Then "#body-editor" should contain text "Hello from the editor"
|
|
53
|
+
And "#body-editor p" should have text "Hello from the editor"
|
|
54
|
+
And "#body" should have value "Hello from the editor"
|
|
55
|
+
|
|
56
|
+
Scenario: Fill one rich-text field of several
|
|
57
|
+
Given I am on "/field-types.html"
|
|
58
|
+
When I fill in the WYSIWYG field "summary" with the "Short summary"
|
|
59
|
+
Then "#summary-editor p" should have text "Short summary"
|
|
60
|
+
And "#summary" should have value "Short summary"
|
|
61
|
+
And "#body-editor" should have text ""
|
|
62
|
+
When I fill in the WYSIWYG field "Body" with the "Long body"
|
|
63
|
+
Then "#body-editor p" should have text "Long body"
|
|
64
|
+
And "#summary-editor p" should have text "Short summary"
|
|
65
|
+
When we fill in the WYSIWYG field "Summary" with the "Found by its label"
|
|
66
|
+
Then "#summary-editor p" should have text "Found by its label"
|
|
67
|
+
And "#body-editor p" should have text "Long body"
|
|
68
|
+
|
|
69
|
+
Scenario: Selected options of a select with several values
|
|
70
|
+
Given I am on "/field-types.html"
|
|
71
|
+
Then the option "Red" should be selected within the select element "#colors"
|
|
72
|
+
And the option "Blue" should be selected within the select element "#colors"
|
|
73
|
+
And the option "Green" should not be selected within the select element "#colors"
|
|
74
|
+
When I unselect "Red" from "#colors"
|
|
75
|
+
Then the option "Red" should not be selected within the select element "#colors"
|
|
76
|
+
And the option "Blue" should be selected within the select element "#colors"
|
|
77
|
+
And "#colors-summary" should have text "Selected: Blue"
|
|
78
|
+
When I clear the select "#colors"
|
|
79
|
+
Then the option "Blue" should not be selected within the select element "#colors"
|
|
80
|
+
And "#colors-summary" should have text "Selected: none"
|
|
81
|
+
|
|
82
|
+
Scenario: Uncheck a checkbox by its selector
|
|
83
|
+
Given I am on "/field-types.html"
|
|
84
|
+
Then the "#newsletter" checkbox is checked
|
|
85
|
+
And "#terms" checkbox is not checked
|
|
86
|
+
When I uncheck the checkbox "#newsletter"
|
|
87
|
+
Then the "#newsletter" checkbox is not checked
|
|
88
|
+
|
|
89
|
+
Scenario: Fill the date and the time of a datetime field
|
|
90
|
+
Given I am on "/field-types.html"
|
|
91
|
+
When I fill in the datetime field "Reminder" with date "2026-09-15" and time "14:00"
|
|
92
|
+
Then "#reminder-date" should have value "2026-09-15"
|
|
93
|
+
And "#reminder-time" should have value "14:00"
|
|
94
|
+
And "#pickup-date" should have value ""
|
|
95
|
+
|
|
96
|
+
Scenario: Fill one part of a datetime field
|
|
97
|
+
Given I am on "/field-types.html"
|
|
98
|
+
When I fill in the date part of the datetime field "Pickup" with "2026-07-04"
|
|
99
|
+
Then "#pickup-date" should have value "2026-07-04"
|
|
100
|
+
And "#pickup-time" should have value ""
|
|
101
|
+
When I fill in the time part of the datetime field "Pickup" with "08:30"
|
|
102
|
+
Then "#pickup-time" should have value "08:30"
|
|
103
|
+
And "#reminder-date" should have value ""
|
|
104
|
+
|
|
105
|
+
Scenario: Fill the start and the end of a date range
|
|
106
|
+
Given I am on "/field-types.html"
|
|
107
|
+
When I fill in the start datetime field "event" with date "2026-05-08" and time "10:00"
|
|
108
|
+
And I fill in the end datetime field "event" with date "2026-05-09" and time "18:00"
|
|
109
|
+
Then "#event-start-date" should have value "2026-05-08"
|
|
110
|
+
And "#event-start-time" should have value "10:00"
|
|
111
|
+
And "#event-end-date" should have value "2026-05-09"
|
|
112
|
+
And "#event-end-time" should have value "18:00"
|
|
113
|
+
|
|
114
|
+
Scenario: Datetime inputs right after their label, and a range named by its legend
|
|
115
|
+
Given I am on "/field-types.html"
|
|
116
|
+
When I fill in the datetime field "Departure" with date "2026-12-31" and time "23:59"
|
|
117
|
+
Then "#departure-date" should have value "2026-12-31"
|
|
118
|
+
And "#departure-time" should have value "23:59"
|
|
119
|
+
When I fill in the date part of the datetime field "Departure" with "2027-01-01"
|
|
120
|
+
And I fill in the time part of the datetime field "Departure" with "06:15"
|
|
121
|
+
Then "#departure-date" should have value "2027-01-01"
|
|
122
|
+
And "#departure-time" should have value "06:15"
|
|
123
|
+
When I fill in the start datetime field "Event" with date "2026-05-08" and time "10:00"
|
|
124
|
+
And we fill in the end datetime field "Event" with date "2026-05-09" and time "18:00"
|
|
125
|
+
Then "#event-start-date" should have value "2026-05-08"
|
|
126
|
+
And "#event-start-time" should have value "10:00"
|
|
127
|
+
And "#event-end-date" should have value "2026-05-09"
|
|
128
|
+
And "#event-end-time" should have value "18:00"
|
|
129
|
+
And "#reminder-date" should have value ""
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
Feature: File download steps
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to download a file from a link or a URL and read what came down,
|
|
4
|
+
so that I can check its name and its content.
|
|
5
|
+
|
|
6
|
+
Scenario: Download a file from a link and read it
|
|
7
|
+
Given I am on "/downloads.html"
|
|
8
|
+
When I download the file from the link "Download report"
|
|
9
|
+
Then the downloaded file name should be "webship-report.csv"
|
|
10
|
+
And the downloaded file name should contain "report"
|
|
11
|
+
And the downloaded file name should contain ".csv"
|
|
12
|
+
And the downloaded file should contain:
|
|
13
|
+
"""
|
|
14
|
+
name,role,status
|
|
15
|
+
"""
|
|
16
|
+
And the downloaded file should contain:
|
|
17
|
+
"""
|
|
18
|
+
Webship Admin,administrator,active
|
|
19
|
+
Webship Guest,visitor,blocked
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
Scenario: The link decides the name of the downloaded file
|
|
23
|
+
Given I am on "/downloads.html"
|
|
24
|
+
When we download the file from the link "Download release notes"
|
|
25
|
+
Then the downloaded file name should be "release-notes-2026.txt"
|
|
26
|
+
And the downloaded file name should contain "2026"
|
|
27
|
+
And the downloaded file should contain:
|
|
28
|
+
"""
|
|
29
|
+
Webship-js release notes
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
Scenario: A file downloaded from a URL is read the same way
|
|
33
|
+
When I download the file from the URL "/downloads/webship-report.csv"
|
|
34
|
+
Then the downloaded file name should contain "webship-report"
|
|
35
|
+
And the downloaded file should contain:
|
|
36
|
+
"""
|
|
37
|
+
Webship Tester,editor,active
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
Scenario: The files in a downloaded zip archive, by name
|
|
41
|
+
Given I am on "/downloads.html"
|
|
42
|
+
When I download the file from the link "Download archive"
|
|
43
|
+
Then the downloaded file name should be "webship-archive.zip"
|
|
44
|
+
And the downloaded file should be a zip archive containing the following files named:
|
|
45
|
+
| readme.txt |
|
|
46
|
+
| reports/summary.csv |
|
|
47
|
+
| reports/users-2026.csv |
|
|
48
|
+
And the downloaded file should be a zip archive containing the following files named:
|
|
49
|
+
| summary.csv | users-2026.csv |
|
|
50
|
+
|
|
51
|
+
Scenario: The files in a downloaded zip archive, by part of their name
|
|
52
|
+
When I download the file from the URL "/downloads/webship-archive.zip"
|
|
53
|
+
Then the downloaded file should be a zip archive containing the following files partially named:
|
|
54
|
+
| readme |
|
|
55
|
+
| reports/ |
|
|
56
|
+
| 2026 |
|
|
57
|
+
And the downloaded file should be a zip archive containing the following files partially named:
|
|
58
|
+
| summary | users |
|
|
59
|
+
And the downloaded file should be a zip archive not containing the following files partially named:
|
|
60
|
+
| secret |
|
|
61
|
+
| .env |
|
|
62
|
+
| __MACOSX |
|
|
63
|
+
And the downloaded file should be a zip archive not containing the following files partially named:
|
|
64
|
+
| .pdf | invoice |
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
Feature: Fill in a field with an empty value
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to fill a field with "" in every form of the fill step,
|
|
4
|
+
so that a scenario can clear a field the way it fills one.
|
|
5
|
+
|
|
6
|
+
Scenario: Fill a field with an empty value by its label
|
|
7
|
+
Given I am on "/fill-in-empty.html"
|
|
8
|
+
Then the field "title" should not be empty
|
|
9
|
+
When I fill in "Title" with ""
|
|
10
|
+
Then the field "title" should be empty
|
|
11
|
+
|
|
12
|
+
Scenario: Fill in an empty value for a field by its label
|
|
13
|
+
Given I am on "/fill-in-empty.html"
|
|
14
|
+
Then the field "summary" should not be empty
|
|
15
|
+
When I fill in "" for "Summary"
|
|
16
|
+
Then the field "summary" should be empty
|
|
17
|
+
|
|
18
|
+
Scenario: Fill a field with an empty value by its placeholder
|
|
19
|
+
Given I am on "/fill-in-empty.html"
|
|
20
|
+
When I fill in "Comma separated" with ""
|
|
21
|
+
Then the field "keywords" should be empty
|
|
22
|
+
|
|
23
|
+
Scenario: Fill a field with an empty value by attribute
|
|
24
|
+
Given I am on "/fill-in-empty.html"
|
|
25
|
+
When I fill in "#title" with "" by attr
|
|
26
|
+
And I fill in "keywords-field" with "" by its "class" attribute
|
|
27
|
+
Then the field "title" should be empty
|
|
28
|
+
And the field "keywords" should be empty
|
|
29
|
+
|
|
30
|
+
Scenario: Fill in an empty value for a field by attribute
|
|
31
|
+
Given I am on "/fill-in-empty.html"
|
|
32
|
+
When I fill in "" for "summary" by its "name" attribute
|
|
33
|
+
Then the field "summary" should be empty
|
|
34
|
+
|
|
35
|
+
Scenario: An empty cell of the fill table empties its field
|
|
36
|
+
Given I am on "/fill-in-empty.html"
|
|
37
|
+
When I fill in the following:
|
|
38
|
+
| Title | |
|
|
39
|
+
| Summary | New words |
|
|
40
|
+
Then the field "title" should be empty
|
|
41
|
+
And the field "summary" should not be empty
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Feature: Fill a field that can be filled, next to fields that cannot
|
|
2
|
+
As a tester,
|
|
3
|
+
I want the fill steps to fill a visible, enabled field as before,
|
|
4
|
+
so that the plain messages for the other fields change nothing else.
|
|
5
|
+
|
|
6
|
+
Scenario: Fill a visible field by its label, its placeholder and by attribute
|
|
7
|
+
Given I am on "/fill-unreachable.html"
|
|
8
|
+
When I fill in "Your name" with "Alice"
|
|
9
|
+
Then "#visible-name" should have value "Alice"
|
|
10
|
+
When I fill in "Full name" with "Bob"
|
|
11
|
+
Then "#visible-name" should have value "Bob"
|
|
12
|
+
When I fill in "visible_name" with "Carol" by its "name" attribute
|
|
13
|
+
Then "#visible-name" should have value "Carol"
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
Feature: Nested iframes, and finding elements and text inside an iframe like on the page
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to switch into an iframe inside an iframe, and to find its fields,
|
|
4
|
+
buttons and text the way the page steps do,
|
|
5
|
+
so that embedded widgets are tested like the rest of the page.
|
|
6
|
+
|
|
7
|
+
Scenario: Switch to an iframe inside the iframe that is active
|
|
8
|
+
Given I am on "/iframe-nested.html"
|
|
9
|
+
When I switch to iframe "#outer-frame"
|
|
10
|
+
Then I should see "Text of the outer frame" inside the iframe
|
|
11
|
+
When I switch to iframe "#inner-frame"
|
|
12
|
+
Then I should see "Text of the inner frame" inside the iframe
|
|
13
|
+
And I should not see "Text of the outer frame" inside the iframe
|
|
14
|
+
|
|
15
|
+
Scenario: Switch to a nested iframe by its name, and back to the root
|
|
16
|
+
Given I am on "/iframe-nested.html"
|
|
17
|
+
When I switch to the iframe with name "outer"
|
|
18
|
+
And I switch to the iframe with title "Inner frame"
|
|
19
|
+
Then I should see "two levels down" inside the iframe
|
|
20
|
+
When I switch to the root document
|
|
21
|
+
Then I should see "This text is in the root document of the nested example"
|
|
22
|
+
|
|
23
|
+
Scenario: Fill a field by its label or its placeholder inside the iframe
|
|
24
|
+
Given I am on "/iframe-nested.html"
|
|
25
|
+
When I switch to iframe "#outer-frame"
|
|
26
|
+
And I switch to iframe "#inner-frame"
|
|
27
|
+
And I fill in "Coupon code" with "SAVE10" inside the iframe
|
|
28
|
+
And I fill in "Gift note" with "Happy birthday" inside the iframe
|
|
29
|
+
And I click "Apply the coupon" by attr inside the iframe
|
|
30
|
+
Then I should see "Coupon SAVE10 applied" inside the iframe
|
|
31
|
+
|
|
32
|
+
Scenario: Click an element by its title inside the iframe
|
|
33
|
+
Given I am on "/iframe-nested.html"
|
|
34
|
+
When I switch to iframe "#outer-frame"
|
|
35
|
+
And I switch to iframe "#inner-frame"
|
|
36
|
+
And I click "Remove the coupon" by attr inside the iframe
|
|
37
|
+
Then I should see "Coupon removed" inside the iframe
|
|
38
|
+
|
|
39
|
+
Scenario: Text that arrives late inside the iframe
|
|
40
|
+
Given I am on "/iframe-nested.html"
|
|
41
|
+
When I switch to iframe "#outer-frame"
|
|
42
|
+
And I switch to iframe "#inner-frame"
|
|
43
|
+
Then I should see "A late message from the inner frame" inside the iframe
|