webship-js 1.0.45 → 1.0.46
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/.eslintrc.json +0 -0
- package/examples/about-us.html +0 -0
- package/examples/ajax-wait-examples.html +147 -0
- package/examples/contact-us.html +0 -0
- package/examples/dynamic-examples.html +499 -0
- package/examples/example-api.json +0 -0
- package/examples/existing-page.html +0 -0
- package/examples/index.html +1 -0
- package/examples/test--then--i-should--see-text-in-element.html +0 -0
- package/examples/test--then--i-should--see-text-matching-pattern.html +0 -0
- package/examples/test--then--i-should-see-text-in-table-row.html +0 -0
- package/examples/test--then--the-checkbox-checked.html +0 -0
- package/examples/test--then--the-element-should_not-contain-cssproperty.html +0 -0
- package/examples/test--then--the-link-should-contain.html +0 -0
- package/examples/test--when--i-attach-file-to-feild.html +0 -0
- package/examples/test--when--i-check-uncheck-checkbox.html +0 -0
- package/examples/test--when--i-click-link.html +0 -0
- package/examples/test--when--i-click-text-in-table-row.html +0 -0
- package/examples/test--when--i-press-button.html +0 -0
- package/examples/test--when--i-reload-page.html +0 -0
- package/examples/test--when--i-scroll-functionality.html +0 -0
- package/examples/test--when--i-scroll-left-right-functionality.html +0 -0
- package/examples/test--when--i-select-option-from-dropdownlist.html +0 -0
- package/examples/test--when--i-select-radio-button.html +95 -0
- package/examples/test--when-i-wait-max-of-time.html +0 -0
- package/examples/test--when-i-wait-page-until-is-loaded.html +0 -0
- package/examples/test--when-i-wait-specific-time.html +0 -0
- package/examples/test-acceptable-url-path.html +0 -0
- package/nightwatch.conf.js +1 -1
- package/package.json +1 -1
- package/tests/features/ajax-wait-examples.feature +24 -0
- package/tests/features/api-step-definitions-individual.feature +0 -0
- package/tests/features/complete-api-testing-examples.feature +0 -0
- package/tests/features/dynamic-content-examples.feature +156 -0
- package/tests/features/modal-advanced-example.feature +54 -0
- package/tests/features/modal-basic-example.feature +42 -0
- package/tests/features/modal-error-handling-example.feature +37 -0
- package/tests/features/test--given--i-am-on-homepage.feature +0 -0
- package/tests/features/test--then--i-should--not--see-text-in-element.feature +0 -0
- package/tests/features/test--then--i-should--see-text-in-element-by-attr.feature +0 -0
- package/tests/features/test--then--i-should--see-text-in-element.feature +0 -0
- package/tests/features/test--then--i-should--see-text-matching-pattern-in-element.feature +0 -0
- package/tests/features/test--then--i-should--see-text-matching-pattern.feature +0 -0
- package/tests/features/test--then--i-should-be-on-page.feature +0 -0
- package/tests/features/test--then--i-should-be-on-the-homepage.feature +0 -0
- package/tests/features/test--then--i-should-not-see-an-element-by-attr.feature +0 -0
- package/tests/features/test--then--i-should-not-see-an-element.feature +0 -0
- package/tests/features/test--then--i-should-see-an-element-by-attr.feature +0 -0
- package/tests/features/test--then--i-should-see-an-element.feature +0 -0
- package/tests/features/test--then--i-should-see-text-in-table-row.feature +0 -0
- package/tests/features/test--then--the-checkbox-is-checked.feature +0 -0
- package/tests/features/test--then--the-checkbox-should-be-checked.feature +0 -0
- package/tests/features/test--then--the-element-should-contain-cssproperty.feature +0 -0
- package/tests/features/test--then--the-element-should-not-contain-cssproperty.feature +0 -0
- package/tests/features/test--then--the-field-should-contain-value.feature +0 -0
- package/tests/features/test--then--the-response-should-contain.feature +0 -0
- package/tests/features/test--then--the-response-status-code-should-be.feature +0 -0
- package/tests/features/test--then--the-url-should-match.feature +0 -0
- package/tests/features/test--then-the-link-should-contain-by-attribute.feature +0 -0
- package/tests/features/test--then-the-link-should-contain.feature +0 -0
- package/tests/features/test--when--i-attach-file-to-feild.feature +0 -0
- package/tests/features/test--when--i-check-checkbox.feature +0 -0
- package/tests/features/test--when--i-click-link-by-attribute.feature +0 -0
- package/tests/features/test--when--i-click-link.feature +0 -0
- package/tests/features/test--when--i-click-text-in-table-row.feature +0 -0
- package/tests/features/test--when--i-fill-in-by-attr.feature +0 -0
- package/tests/features/test--when--i-fill-in-table-by-attr.feature +0 -0
- package/tests/features/test--when--i-fill-in.feature +0 -0
- package/tests/features/test--when--i-go-to-homepage.feature +0 -0
- package/tests/features/test--when--i-move-forward-backward-one-page.feature +0 -0
- package/tests/features/test--when--i-press-button-by-attribute.feature +0 -0
- package/tests/features/test--when--i-press-button.feature +0 -0
- package/tests/features/test--when--i-reload-page.feature +0 -0
- package/tests/features/test--when--i-scroll-left-right.feature +0 -0
- package/tests/features/test--when--i-scroll.feature +0 -0
- package/tests/features/test--when--i-select-option-from-dropdownlist.feature +0 -0
- package/tests/features/test--when--i-select-radio-button.feature +37 -0
- package/tests/features/test--when--i-wait-page-is-loaded.feature +0 -0
- package/tests/features/test--when--i-wait-time.feature +0 -0
- package/tests/step-definitions/webship.js +1469 -503
|
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,95 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset='utf-8'>
|
|
6
|
+
<title>Select Radio Button</title>
|
|
7
|
+
<style>
|
|
8
|
+
.style {
|
|
9
|
+
height: 50px;
|
|
10
|
+
font-size: 26px;
|
|
11
|
+
line-height: 50px;
|
|
12
|
+
}
|
|
13
|
+
.section {
|
|
14
|
+
margin: 20px 0;
|
|
15
|
+
padding: 15px;
|
|
16
|
+
border: 1px solid #ccc;
|
|
17
|
+
}
|
|
18
|
+
</style>
|
|
19
|
+
<script>
|
|
20
|
+
function onGenderSubmit() {
|
|
21
|
+
var genderForm = document.forms[0];
|
|
22
|
+
var selectedGender = "";
|
|
23
|
+
for (var i = 0; i < genderForm.length; i++) {
|
|
24
|
+
if (genderForm[i].type === 'radio' && genderForm[i].checked) {
|
|
25
|
+
selectedGender = genderForm[i].value;
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
const element = document.getElementById("gender-result");
|
|
30
|
+
element.innerText = "Selected: " + selectedGender;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function onPlanSubmit() {
|
|
34
|
+
var planForm = document.forms[2];
|
|
35
|
+
var selectedPlan = "";
|
|
36
|
+
for (var i = 0; i < planForm.length; i++) {
|
|
37
|
+
if (planForm[i].type === 'radio' && planForm[i].checked) {
|
|
38
|
+
selectedPlan = planForm[i].value;
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
const element = document.getElementById("plan-result");
|
|
43
|
+
element.innerText = "Plan: " + selectedPlan;
|
|
44
|
+
}
|
|
45
|
+
</script>
|
|
46
|
+
</head>
|
|
47
|
+
|
|
48
|
+
<body>
|
|
49
|
+
<h1>Select Radio Button Options</h1>
|
|
50
|
+
|
|
51
|
+
<div class="section">
|
|
52
|
+
<h2>Gender Selection (by Label)</h2>
|
|
53
|
+
<form>
|
|
54
|
+
<input type="radio" id="gender-male" name="gender" value="Male">
|
|
55
|
+
<label for="gender-male">Male</label><br>
|
|
56
|
+
<input type="radio" id="gender-female" name="gender" value="Female">
|
|
57
|
+
<label for="gender-female">Female</label><br>
|
|
58
|
+
<input type="radio" id="gender-other" name="gender" value="Other">
|
|
59
|
+
<label for="gender-other">Other</label><br>
|
|
60
|
+
</form>
|
|
61
|
+
<input type="button" value="Submit" onclick="onGenderSubmit()">
|
|
62
|
+
<div id="gender-result" class="style"></div>
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
<div class="section">
|
|
66
|
+
<h2>Color Selection (by Value)</h2>
|
|
67
|
+
<form>
|
|
68
|
+
<label>
|
|
69
|
+
<input type="radio" name="color" value="red"> Red
|
|
70
|
+
</label><br>
|
|
71
|
+
<label>
|
|
72
|
+
<input type="radio" name="color" value="blue"> Blue
|
|
73
|
+
</label><br>
|
|
74
|
+
<label>
|
|
75
|
+
<input type="radio" name="color" value="green"> Green
|
|
76
|
+
</label><br>
|
|
77
|
+
</form>
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
<div class="section">
|
|
81
|
+
<h2>Plan Selection (by ID Selector)</h2>
|
|
82
|
+
<form>
|
|
83
|
+
<input type="radio" id="plan-basic" name="plan" value="Basic">
|
|
84
|
+
<label for="plan-basic">Basic Plan</label><br>
|
|
85
|
+
<input type="radio" id="plan-premium" name="plan" value="Premium">
|
|
86
|
+
<label for="plan-premium">Premium Plan</label><br>
|
|
87
|
+
<input type="radio" id="plan-enterprise" name="plan" value="Enterprise">
|
|
88
|
+
<label for="plan-enterprise">Enterprise Plan</label><br>
|
|
89
|
+
</form>
|
|
90
|
+
<input type="button" value="Plan Submit" onclick="onPlanSubmit()">
|
|
91
|
+
<div id="plan-result" class="style"></div>
|
|
92
|
+
</div>
|
|
93
|
+
</body>
|
|
94
|
+
|
|
95
|
+
</html>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/nightwatch.conf.js
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
Feature: AJAX Wait Examples
|
|
2
|
+
As a tester
|
|
3
|
+
I want to wait for AJAX requests to complete
|
|
4
|
+
So that I can verify content that loads asynchronously
|
|
5
|
+
|
|
6
|
+
Background:
|
|
7
|
+
Given I am on "/ajax-wait-examples.html"
|
|
8
|
+
|
|
9
|
+
# Example 1: Wait for AJAX to finish before verifying content
|
|
10
|
+
Scenario: Wait for AJAX to finish after search
|
|
11
|
+
When I fill in "laptop" for "#search-input" by attr
|
|
12
|
+
And I press "Search" button
|
|
13
|
+
And I wait for AJAX to finish
|
|
14
|
+
Then I should see "Search Results"
|
|
15
|
+
And I should see "Laptop Pro 15"
|
|
16
|
+
|
|
17
|
+
# Example 2: Wait for AJAX to finish after form submission
|
|
18
|
+
Scenario: Wait for AJAX to finish after submitting form
|
|
19
|
+
When I fill in "John Doe" for "#name-input" by attr
|
|
20
|
+
And I fill in "john@example.com" for "#email-input" by attr
|
|
21
|
+
And I press "Submit" button
|
|
22
|
+
And I wait for AJAX to finish
|
|
23
|
+
Then I should see "Form submitted successfully"
|
|
24
|
+
And I should see "Thank you, John Doe"
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
Feature: Dynamic Content Handling Examples
|
|
2
|
+
As a tester
|
|
3
|
+
I want to test dynamically loaded content
|
|
4
|
+
So that I can verify the application works with JavaScript-rendered elements
|
|
5
|
+
|
|
6
|
+
Background:
|
|
7
|
+
Given I am on "/dynamic-examples.html"
|
|
8
|
+
|
|
9
|
+
# Example 1: Clicking a button that appears after page load
|
|
10
|
+
Scenario: Click dynamically loaded button
|
|
11
|
+
When I wait 2 seconds
|
|
12
|
+
Then I should see "Dynamic Content Loaded"
|
|
13
|
+
When I press "Submit Form" button
|
|
14
|
+
Then I should see "Form submitted successfully"
|
|
15
|
+
|
|
16
|
+
# Example 2: Filling form fields that are added by JavaScript
|
|
17
|
+
Scenario: Fill in dynamically rendered form fields
|
|
18
|
+
When I click "Show Registration Form"
|
|
19
|
+
And I wait 1 second
|
|
20
|
+
When I fill in "john.doe@example.com" for "#email" by attr
|
|
21
|
+
And I fill in "John Doe" for "#fullname" by attr
|
|
22
|
+
And I fill in "SecurePass123" for "#password" by attr
|
|
23
|
+
And I press "Register" button
|
|
24
|
+
Then I should see "Registration successful"
|
|
25
|
+
|
|
26
|
+
# Example 3: Selecting options from dynamically populated dropdown
|
|
27
|
+
Scenario: Select from dynamically loaded dropdown options
|
|
28
|
+
When I scroll down 200
|
|
29
|
+
And I wait 1 second
|
|
30
|
+
When I click "Load Countries"
|
|
31
|
+
And I wait 2 seconds
|
|
32
|
+
When I select "United States" from "country"
|
|
33
|
+
Then I should see "You selected: United States"
|
|
34
|
+
|
|
35
|
+
# Example 4: Clicking links in dynamically loaded table rows
|
|
36
|
+
Scenario: Interact with dynamically loaded table rows
|
|
37
|
+
When I scroll down 400
|
|
38
|
+
And I wait 1 second
|
|
39
|
+
When I click "Load Users Table"
|
|
40
|
+
And I wait 2 seconds
|
|
41
|
+
Then I should see "John Smith" in the "john@example.com" row
|
|
42
|
+
When I click "Edit" in the "john@example.com" row
|
|
43
|
+
Then I should see "Editing user: john@example.com"
|
|
44
|
+
|
|
45
|
+
# Example 5: Checking dynamically added checkboxes
|
|
46
|
+
Scenario: Check dynamically rendered checkboxes
|
|
47
|
+
When I scroll down 600
|
|
48
|
+
And I wait 1 second
|
|
49
|
+
When I click "Show Preferences"
|
|
50
|
+
And I wait 1 second
|
|
51
|
+
When I check "#newsletter"
|
|
52
|
+
And I check "#notifications"
|
|
53
|
+
Then the "#newsletter" checkbox should be checked
|
|
54
|
+
And the "#notifications" checkbox should be checked
|
|
55
|
+
|
|
56
|
+
# Example 6: Uploading file to dynamically rendered input
|
|
57
|
+
Scenario: Upload file to dynamic file input
|
|
58
|
+
When I scroll down 800
|
|
59
|
+
And I wait 1 second
|
|
60
|
+
When I click "Enable File Upload"
|
|
61
|
+
And I wait 1 second
|
|
62
|
+
When I attach the file "test-document.pdf" to "#file-upload"
|
|
63
|
+
Then I should see "File selected: test-document.pdf"
|
|
64
|
+
|
|
65
|
+
# Example 7: Scrolling to dynamically added elements
|
|
66
|
+
Scenario: Scroll to dynamically loaded content section
|
|
67
|
+
When I scroll down 1200
|
|
68
|
+
And I wait 1 second
|
|
69
|
+
When I click "Load More Content"
|
|
70
|
+
And I wait 2 seconds
|
|
71
|
+
When I scroll to bottom of "#content-container"
|
|
72
|
+
Then I should see "End of dynamic content"
|
|
73
|
+
|
|
74
|
+
# Example 8: Handling removed elements (should not interact)
|
|
75
|
+
Scenario: Verify removed elements are not interacted with
|
|
76
|
+
When I scroll down 1400
|
|
77
|
+
And I wait 1 second
|
|
78
|
+
When I click "Show Temporary Button"
|
|
79
|
+
And I wait 1 second
|
|
80
|
+
Then I should see a "temp-action" element by its "id" attr
|
|
81
|
+
When I click "Remove Button"
|
|
82
|
+
And I wait 1 second
|
|
83
|
+
# This should fail gracefully if the button is removed
|
|
84
|
+
# Then I should not see a "temp-action" element by its "id" attr
|
|
85
|
+
|
|
86
|
+
# Example 9: Single Page Application navigation with dynamic content
|
|
87
|
+
Scenario: Navigate in SPA with dynamically loaded pages
|
|
88
|
+
When I scroll down 1600
|
|
89
|
+
And I wait 1 second
|
|
90
|
+
When I click "Products" by its "data-page" attribute
|
|
91
|
+
And I wait 1 second
|
|
92
|
+
Then I should see "Product Catalog"
|
|
93
|
+
When I click "Add to Cart" in the "Laptop Pro 15" row
|
|
94
|
+
Then I should see "Item added to cart"
|
|
95
|
+
|
|
96
|
+
# Example 10: Batch form filling with dynamically rendered fields
|
|
97
|
+
Scenario: Fill multiple dynamic form fields using table
|
|
98
|
+
When I scroll down 1800
|
|
99
|
+
And I wait 1 second
|
|
100
|
+
When I click "Show Contact Form"
|
|
101
|
+
And I wait 2 seconds
|
|
102
|
+
When I fill in the following: by attr
|
|
103
|
+
| #contact-name | Jane Smith |
|
|
104
|
+
| #contact-email | jane@example.com |
|
|
105
|
+
| #contact-phone | +1-555-0123 |
|
|
106
|
+
| #contact-message | This is a test message |
|
|
107
|
+
And I press "Send Message" button
|
|
108
|
+
Then I should see "Message sent successfully"
|
|
109
|
+
|
|
110
|
+
# Example 11: Testing AJAX-loaded content after user action
|
|
111
|
+
Scenario: Interact with AJAX-loaded search results
|
|
112
|
+
When I scroll down 2200
|
|
113
|
+
And I wait 1 second
|
|
114
|
+
When I fill in "laptop" for "#search-input" by attr
|
|
115
|
+
And I press "Search" button
|
|
116
|
+
And I wait 2 seconds
|
|
117
|
+
Then I should see "Search Results"
|
|
118
|
+
When I click "View Details" in the "Laptop Pro 15" row
|
|
119
|
+
Then I should see "Product Details"
|
|
120
|
+
|
|
121
|
+
# Example 13: Infinite scroll content loading
|
|
122
|
+
Scenario: Load more content with infinite scroll
|
|
123
|
+
When I scroll down 2600
|
|
124
|
+
And I wait 1 second
|
|
125
|
+
When I scroll to bottom
|
|
126
|
+
And I wait 2 seconds
|
|
127
|
+
Then I should see "Loading more items"
|
|
128
|
+
And I wait 3 seconds
|
|
129
|
+
Then I should see "Item 21"
|
|
130
|
+
When I scroll to bottom
|
|
131
|
+
And I wait 2 seconds
|
|
132
|
+
Then I should see "Item 41"
|
|
133
|
+
|
|
134
|
+
# Example 14: React/Vue component interactions
|
|
135
|
+
Scenario: Interact with React component rendered buttons
|
|
136
|
+
When I scroll down 3000
|
|
137
|
+
And I wait 1 second
|
|
138
|
+
When I click "Initialize App"
|
|
139
|
+
And I wait 2 seconds
|
|
140
|
+
Then I should see "React App Loaded"
|
|
141
|
+
When I press "increment-btn" by its "id" attribute
|
|
142
|
+
And I press "increment-btn" by its "id" attribute
|
|
143
|
+
And I press "increment-btn" by its "id" attribute
|
|
144
|
+
Then I should see "Count: 3"
|
|
145
|
+
|
|
146
|
+
# Example 15: Conditional rendering based on user selection
|
|
147
|
+
Scenario: Handle conditionally rendered form fields
|
|
148
|
+
When I scroll down 3400
|
|
149
|
+
And I wait 1 second
|
|
150
|
+
When I select "Business" from "account-type"
|
|
151
|
+
And I wait 1 second
|
|
152
|
+
Then I should see a "company-name" element by attr
|
|
153
|
+
When I fill in "Acme Corporation" for "company-name" by attr
|
|
154
|
+
And I fill in "12-3456789" for "tax-id" by attr
|
|
155
|
+
And I press "Continue" button
|
|
156
|
+
Then I should see "Business account created"
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
Feature: Modal Dialog - Advanced Scenarios
|
|
2
|
+
As a QA engineer testing complex modal behaviors
|
|
3
|
+
I want to handle various modal interactions
|
|
4
|
+
So that I can ensure comprehensive modal testing coverage
|
|
5
|
+
|
|
6
|
+
Background:
|
|
7
|
+
Given I am on "/test--modal-dialogs.html"
|
|
8
|
+
|
|
9
|
+
Scenario: Verify modal with specific title
|
|
10
|
+
When I click "show-welcome-modal" by attr
|
|
11
|
+
And I wait for modal to appear
|
|
12
|
+
Then I should see a modal with title "Welcome Message"
|
|
13
|
+
And I should see "Thank you for joining us!" in the modal
|
|
14
|
+
When I click "OK" in the modal
|
|
15
|
+
And I wait 1 second
|
|
16
|
+
Then I should not see a modal
|
|
17
|
+
|
|
18
|
+
Scenario: Handle settings modal with form
|
|
19
|
+
When I click ".open-settings" by attr
|
|
20
|
+
And I wait for the modal to appear
|
|
21
|
+
Then I should see the "settings-modal" modal
|
|
22
|
+
And I should see "User Settings" in the modal dialog
|
|
23
|
+
When I fill in "username" with "john_doe" by attr
|
|
24
|
+
And I fill in "email" with "john@example.com" by "id" attr
|
|
25
|
+
And I click "Save Changes" button in the modal
|
|
26
|
+
And I wait 1 second
|
|
27
|
+
Then I should see "Settings saved successfully" in the modal
|
|
28
|
+
When I click "Close" in the modal dialog
|
|
29
|
+
And I wait 1 second
|
|
30
|
+
Then I should not see a modal
|
|
31
|
+
|
|
32
|
+
Scenario: Verify contact modal does not contain error message
|
|
33
|
+
When I click "#contact-form-btn" by attr
|
|
34
|
+
And I wait for modal to appear
|
|
35
|
+
Then I should see a modal
|
|
36
|
+
And I should not see "Payment failed" in the modal
|
|
37
|
+
And I should see "Enter payment details" in the modal dialog
|
|
38
|
+
When I dismiss the modal
|
|
39
|
+
And I wait 1 second
|
|
40
|
+
Then I should not see the modal dialog
|
|
41
|
+
|
|
42
|
+
Scenario: Form submission in contact modal
|
|
43
|
+
When I click "#contact-form-btn" by attr
|
|
44
|
+
And I wait for the modal dialog to appear
|
|
45
|
+
Then I should see the modal
|
|
46
|
+
When I fill in the following: by attr
|
|
47
|
+
| contact-name | Jane Smith |
|
|
48
|
+
| contact-email | jane@example.com |
|
|
49
|
+
| contact-message | This is a test message|
|
|
50
|
+
And I click "Submit" button in the modal
|
|
51
|
+
And I wait 1 second
|
|
52
|
+
Then I should see "Message sent successfully" in the modal
|
|
53
|
+
And I wait 3 seconds
|
|
54
|
+
Then I should not see the modal
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
Feature: Modal Dialog - Basic Interactions
|
|
2
|
+
As a user testing modal dialogs
|
|
3
|
+
I want to interact with modal windows
|
|
4
|
+
So that I can verify modal functionality works correctly
|
|
5
|
+
|
|
6
|
+
Background:
|
|
7
|
+
Given I am on "/test--modal-dialogs.html"
|
|
8
|
+
|
|
9
|
+
Scenario: Modal should not appear initially
|
|
10
|
+
Then I should not see a modal
|
|
11
|
+
|
|
12
|
+
Scenario: Open and verify modal visibility
|
|
13
|
+
When I click "show-modal" by attr
|
|
14
|
+
And I wait for the modal to appear
|
|
15
|
+
Then I should see a modal
|
|
16
|
+
And I should see "Welcome" in the modal
|
|
17
|
+
And I should see "This is a sample modal dialog" in the modal dialog
|
|
18
|
+
|
|
19
|
+
Scenario: Click confirm button in modal
|
|
20
|
+
When I click "trigger-modal" by attr
|
|
21
|
+
And I wait for the modal to appear
|
|
22
|
+
Then I should see a modal
|
|
23
|
+
When I click "Confirm" in the modal
|
|
24
|
+
And I wait 1 second
|
|
25
|
+
Then I should not see a modal
|
|
26
|
+
|
|
27
|
+
Scenario: Close modal using close button
|
|
28
|
+
When I click "#show-modal" by attr
|
|
29
|
+
And I wait for modal to appear
|
|
30
|
+
Then I should see the modal
|
|
31
|
+
When I close the modal
|
|
32
|
+
And I wait for the modal to disappear
|
|
33
|
+
Then I should not see the modal
|
|
34
|
+
|
|
35
|
+
Scenario: Verify specific modal by identifier
|
|
36
|
+
When I click "delete-btn" by attr
|
|
37
|
+
And I wait for modal to appear
|
|
38
|
+
Then I should see a "delete-confirmation-modal" modal
|
|
39
|
+
And I should see "Are you sure you want to delete this item?" in the modal
|
|
40
|
+
When I click "Cancel" button in the modal dialog
|
|
41
|
+
And I wait 1 second
|
|
42
|
+
Then I should not see the modal dialog
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
Feature: Modal Dialog - Error Handling and Edge Cases
|
|
2
|
+
As a test automation engineer
|
|
3
|
+
I want to verify modal error states and edge cases
|
|
4
|
+
So that I can ensure robust modal functionality
|
|
5
|
+
|
|
6
|
+
Background:
|
|
7
|
+
Given I am on the "/test--modal-dialogs.html" page
|
|
8
|
+
|
|
9
|
+
Scenario: Confirm deletion with modal
|
|
10
|
+
When I click "Delete" in the "Project Alpha" row
|
|
11
|
+
And I wait for the modal to appear
|
|
12
|
+
Then I should see a modal
|
|
13
|
+
And I should see "Are you sure you want to delete Project Alpha?" in the modal
|
|
14
|
+
When I click "Yes, Delete" button in the modal
|
|
15
|
+
And I wait for the modal to disappear
|
|
16
|
+
Then I should not see a modal
|
|
17
|
+
And I should see "Project deleted successfully"
|
|
18
|
+
|
|
19
|
+
Scenario: Cancel deletion action dismisses modal
|
|
20
|
+
When I click "Delete" in the "Project Beta" row
|
|
21
|
+
And I wait for modal to appear
|
|
22
|
+
Then I should see the modal dialog
|
|
23
|
+
And I should see "Are you sure you want to delete Project Beta?" in the modal
|
|
24
|
+
When I click "Cancel" in the modal
|
|
25
|
+
And I wait 1 second
|
|
26
|
+
Then I should not see the modal dialog
|
|
27
|
+
|
|
28
|
+
Scenario: Delete confirmation modal content verification
|
|
29
|
+
When I click "delete-btn" by attr
|
|
30
|
+
And I wait for modal to appear
|
|
31
|
+
Then I should see a "delete-confirmation-modal" modal
|
|
32
|
+
And I should see "Are you sure you want to delete this item?" in the modal
|
|
33
|
+
And I should see "This action cannot be undone" in the modal dialog
|
|
34
|
+
And I should not see "Item has been deleted" in the modal
|
|
35
|
+
When I click "Cancel" button in the modal
|
|
36
|
+
And I wait 1 second
|
|
37
|
+
Then I should not see a modal
|
|
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
|
|
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,37 @@
|
|
|
1
|
+
Feature: An example of selecting radio buttons
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to be able to select radio button options
|
|
4
|
+
|
|
5
|
+
Scenario: Implementing the ability to select radio buttons
|
|
6
|
+
Given I am on "/test--when--i-select-radio-button.html"
|
|
7
|
+
When I select radio button "Male"
|
|
8
|
+
And I press "Submit" by "value" attr
|
|
9
|
+
Then I should see "Selected: Male"
|
|
10
|
+
And the radio button "#gender-male" should be selected
|
|
11
|
+
And the radio button "#gender-female" should not be selected
|
|
12
|
+
When I select radio button "Female"
|
|
13
|
+
And I press "Submit" by "value" attr
|
|
14
|
+
Then I should see "Selected: Female"
|
|
15
|
+
And the "#gender-female" radio button is selected
|
|
16
|
+
And the "#gender-male" radio button is not selected
|
|
17
|
+
|
|
18
|
+
Scenario: Selecting radio buttons by value
|
|
19
|
+
Given I am on "/test--when--i-select-radio-button.html"
|
|
20
|
+
When I select radio button "red"
|
|
21
|
+
Then the radio button with value "red" should be selected
|
|
22
|
+
And the radio button with value "blue" should not be selected
|
|
23
|
+
When I select radio button "blue"
|
|
24
|
+
Then the radio button with value "blue" should be selected
|
|
25
|
+
And the radio button with value "red" should not be selected
|
|
26
|
+
|
|
27
|
+
Scenario: Selecting radio buttons by selector
|
|
28
|
+
Given I am on "/test--when--i-select-radio-button.html"
|
|
29
|
+
When I select radio button "#plan-basic"
|
|
30
|
+
And I press "Plan Submit" by "value" attr
|
|
31
|
+
Then I should see "Plan: Basic"
|
|
32
|
+
And the "#plan-basic" radio button is selected
|
|
33
|
+
When I select radio button "#plan-premium"
|
|
34
|
+
And I press "Plan Submit" by "value" attr
|
|
35
|
+
Then I should see "Plan: Premium"
|
|
36
|
+
And the "#plan-premium" radio button is selected
|
|
37
|
+
And the "#plan-basic" radio button is not selected
|
|
File without changes
|
|
File without changes
|