webship-js 1.0.38 → 1.0.40
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/assets/config_templates/circleci-linux-chrome.conf.js +1 -0
- package/assets/config_templates/github-linux-chrome.conf.js +1 -0
- package/examples/test--when--i-scroll-functionality.html +176 -0
- package/nightwatch.conf.js +1 -0
- package/package.json +1 -1
- package/tests/features/test--given--i-am-on-homepage.feature +2 -2
- package/tests/features/test--then--i-should--not--see-text-in-element.feature +2 -2
- package/tests/features/test--then--i-should--see-text-in-element-by-attr.feature +2 -2
- package/tests/features/test--then--i-should--see-text-in-element.feature +2 -2
- package/tests/features/test--then--i-should--see-text-matching-pattern-in-element.feature +4 -4
- package/tests/features/test--then--i-should--see-text-matching-pattern.feature +5 -5
- package/tests/features/test--then--i-should-be-on-page.feature +2 -2
- package/tests/features/test--then--i-should-be-on-the-homepage.feature +2 -2
- package/tests/features/test--then--i-should-not-see-an-element-by-attr.feature +2 -2
- package/tests/features/test--then--i-should-not-see-an-element.feature +2 -2
- package/tests/features/test--then--i-should-see-an-element-by-attr.feature +2 -2
- package/tests/features/test--then--i-should-see-an-element.feature +2 -2
- package/tests/features/test--then--the-checkbox-is-checked.feature +2 -2
- package/tests/features/test--then--the-checkbox-should-be-checked.feature +2 -2
- package/tests/features/test--then--the-element-should-contain-cssproperty.feature +2 -2
- package/tests/features/test--then--the-element-should-not-contain-cssproperty.feature +3 -3
- package/tests/features/test--then--the-field-should-contain-value.feature +3 -3
- package/tests/features/test--then--the-response-should-contain.feature +3 -3
- package/tests/features/test--then--the-response-status-code-should-be.feature +2 -2
- package/tests/features/test--then--the-url-should-match.feature +4 -4
- package/tests/features/test--then-the-link-should-contain-by-attribute.feature +6 -7
- package/tests/features/test--then-the-link-should-contain.feature +3 -4
- package/tests/features/test--when--i-attach-file-to-feild.feature +2 -3
- package/tests/features/test--when--i-check-checkbox.feature +2 -3
- package/tests/features/test--when--i-click-link-by-attribute.feature +2 -3
- package/tests/features/test--when--i-click-link.feature +4 -5
- package/tests/features/test--when--i-fill-in-by-attr.feature +9 -9
- package/tests/features/test--when--i-fill-in-table-by-attr.feature +6 -6
- package/tests/features/test--when--i-fill-in.feature +5 -5
- package/tests/features/test--when--i-go-to-homepage.feature +3 -6
- package/tests/features/test--when--i-move-forward-backward-one-page.feature +2 -3
- package/tests/features/test--when--i-press-button-by-attribute.feature +8 -9
- package/tests/features/test--when--i-press-button.feature +7 -3
- package/tests/features/test--when--i-reload-page.feature +2 -3
- package/tests/features/test--when--i-scroll.feature +48 -0
- package/tests/features/test--when--i-select-option-from-dropdownlist.feature +17 -6
- package/tests/features/test--when--i-wait-page-is-loaded.feature +2 -3
- package/tests/features/test--when--i-wait-time.feature +12 -13
- package/tests/step-definitions/webship.js +395 -202
- package/tests/features/test--when--i-select-option-from-dropdownlist-by-attr.feature +0 -16
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
Feature: An example of testing whether the user is on any page and then navigating to the homepage.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
so that I can check the welcome message on the homepage.
|
|
2
|
+
As a user,
|
|
3
|
+
I want to be able to navigate to the homepage from another page.
|
|
4
|
+
So that I can check the welcome message on the homepage.
|
|
6
5
|
|
|
7
6
|
Scenario: Check if on the About Us page, then navigate to the homepage.
|
|
8
7
|
Given I am on "/about-us.html"
|
|
9
8
|
When I go to the homepage
|
|
10
9
|
Then I should see "Welcome to the homepage of the Webship-js Examples"
|
|
11
|
-
|
|
12
|
-
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
Feature: An example of navigating forward and backward by one page.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
I want to be able to navigate forward and backward by one page.
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to be able to navigate forward and backward by one page.
|
|
5
4
|
|
|
6
5
|
Scenario: Check to navigate forward and backward one page
|
|
7
6
|
Given I am on the homepage
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
Feature: An example of pressing a button using its attributes.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
I want to be able to press a button using its attributes.
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to be able to press a button using its attributes.
|
|
5
4
|
|
|
6
5
|
Scenario: Verify that you can click a button by specifying its ID with the '#' sign.
|
|
7
6
|
Given I am on "/test--when--i-press-button.html"
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
When I press "#btn-pressid" by attr
|
|
8
|
+
Then I should see "Button Pressed Successfully"
|
|
10
9
|
|
|
11
10
|
Scenario: Verify that you can click a button by specifying the 'ID' attribute without the '#' sign.
|
|
12
11
|
Given I am on "/test--when--i-press-button.html"
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
When I press "btn-pressid" by "id" attr
|
|
13
|
+
Then I should see "Button Pressed Successfully"
|
|
15
14
|
|
|
16
15
|
Scenario: Verify that you can click a button without specifying any attributes or signs, using only the value of one of its attributes.
|
|
17
16
|
Given I am on "/test--when--i-press-button.html"
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
When I press "btn-pressname" by attr
|
|
18
|
+
Then I should see "Button Pressed Successfully"
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
Feature: An example of pressing a button by its label.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
I want to be able to press a button using its label.
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to be able to press a button using its label.
|
|
5
4
|
|
|
6
5
|
Scenario: Check pressing a button using its label.
|
|
7
6
|
Given I am on "/test--when--i-press-button.html"
|
|
8
7
|
When I press "Submit"
|
|
9
8
|
Then I should see "Button Pressed Successfully"
|
|
9
|
+
|
|
10
|
+
Scenario: Check pressing a selected button with optional the and optional button.
|
|
11
|
+
Given I am on "/test--when--i-press-button.html"
|
|
12
|
+
When I press the "Submit" button
|
|
13
|
+
Then I should see "Button Pressed Successfully"
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
Feature: Complete scrolling functionality test
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to test all scrolling step definitions to ensure they work correctly.
|
|
4
|
+
|
|
5
|
+
Scenario: Test basic scroll down functionality
|
|
6
|
+
Given I am on "/test--when--i-scroll-functionality.html"
|
|
7
|
+
When I scroll down
|
|
8
|
+
Then I should see "Basic scroll down works"
|
|
9
|
+
|
|
10
|
+
Scenario: Test basic scroll up functionality
|
|
11
|
+
Given I am on "/test--when--i-scroll-functionality.html"
|
|
12
|
+
When I scroll to the bottom
|
|
13
|
+
And I scroll up
|
|
14
|
+
Then I should see "Basic scroll up works"
|
|
15
|
+
|
|
16
|
+
Scenario: Test scroll down with custom value
|
|
17
|
+
Given I am on "/test--when--i-scroll-functionality.html"
|
|
18
|
+
When I scroll down 500
|
|
19
|
+
Then I should see "Custom scroll down works"
|
|
20
|
+
|
|
21
|
+
Scenario: Test scroll up with custom value
|
|
22
|
+
Given I am on "/test--when--i-scroll-functionality.html"
|
|
23
|
+
When I scroll to the bottom
|
|
24
|
+
And I scroll up 300
|
|
25
|
+
Then I should see "Custom scroll up works"
|
|
26
|
+
|
|
27
|
+
Scenario: Test scroll to top functionality
|
|
28
|
+
Given I am on "/test--when--i-scroll-functionality.html"
|
|
29
|
+
When I scroll to the bottom
|
|
30
|
+
And I scroll to top
|
|
31
|
+
Then I should see "Scroll to top works"
|
|
32
|
+
|
|
33
|
+
Scenario: Test scroll to bottom functionality
|
|
34
|
+
Given I am on "/test--when--i-scroll-functionality.html"
|
|
35
|
+
When I scroll to the bottom
|
|
36
|
+
Then I should see "Scroll to bottom works"
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
Scenario: Test scroll to top of element
|
|
40
|
+
Given I am on "/test--when--i-scroll-functionality.html"
|
|
41
|
+
When I scroll to bottom of "#scrollable-container"
|
|
42
|
+
And I scroll to top of "#scrollable-container"
|
|
43
|
+
Then I should see "Element scroll to top works"
|
|
44
|
+
|
|
45
|
+
Scenario: Test scroll to bottom of element
|
|
46
|
+
Given I am on "/test--when--i-scroll-functionality.html"
|
|
47
|
+
When I scroll to bottom of "#scrollable-container"
|
|
48
|
+
Then I should see "Element scroll to bottom works"
|
|
@@ -1,10 +1,21 @@
|
|
|
1
|
-
Feature: An example of selecting an option
|
|
1
|
+
Feature: An example of selecting an option from a dropdown list using its attributes.
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to be able to test selecting an option from a dropdown list using its attributes.
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
+
Scenario: Check selecting an option from a dropdown list using its attributes.
|
|
6
|
+
Given I am on "/test--when--i-select-option-from-dropdownlist.html"
|
|
7
|
+
When I select "Saab" from "#cars"
|
|
8
|
+
When I press "Submit"
|
|
9
|
+
Then I should see "Option ( Saab ) has been selected successfully"
|
|
10
|
+
|
|
11
|
+
Scenario: Check selecting an option from a dropdown list.
|
|
12
|
+
Given I am on "/test--when--i-select-option-from-dropdownlist.html"
|
|
13
|
+
When I select "mercedes" from "cars"
|
|
14
|
+
When I press "Submit"
|
|
15
|
+
Then I should see "Option ( Mercedes ) has been selected successfully"
|
|
5
16
|
|
|
6
17
|
Scenario: Check selecting an option from a dropdown list by its text label.
|
|
7
18
|
Given I am on "/test--when--i-select-option-from-dropdownlist.html"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
19
|
+
When I select "Saab" from "Choose a car:"
|
|
20
|
+
When I press "Submit"
|
|
21
|
+
Then I should see "Option ( Saab ) has been selected successfully"
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
Feature: An example test to wait until the page is loaded.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
I want to make sure that I can wait until a page is loaded.
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to make sure that I can wait until a page is loaded.
|
|
5
4
|
|
|
6
5
|
Scenario: Check waiting for the page to load.
|
|
7
6
|
Given I am on "/test--when-i-wait-page-until-is-loaded.html"
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
Feature: An example test to wait for a specific maximum number of seconds/minutes for the page to load.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
I want to make sure that I can wait for a page to load and for an element to become visible.
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to make sure that I can wait for a page to load and for an element to become visible.
|
|
5
4
|
|
|
6
5
|
Scenario: Check waiting 6 seconds for the page content to load.
|
|
7
6
|
Given I am on the homepage
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
When I go to "/test--when-i-wait-specific-time.html"
|
|
8
|
+
And I wait 6 seconds
|
|
9
|
+
Then I should see "Welcome with waiting full time"
|
|
11
10
|
|
|
12
11
|
Scenario: Check waiting 3s for the page content to load.
|
|
13
12
|
Given I am on the homepage
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
When I go to "/test--when-i-wait-specific-time.html"
|
|
14
|
+
And I wait 3s
|
|
15
|
+
Then I should see "Welcome with waiting full time"
|
|
17
16
|
|
|
18
|
-
Scenario: Check waiting a maximum of 6 seconds for the page content to load.
|
|
17
|
+
Scenario: Check waiting a maximum of 6 seconds for the page content to load.
|
|
19
18
|
Given I am on the homepage
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
When I go to "/test--when-i-wait-max-of-time.html"
|
|
20
|
+
And I wait max of 6 seconds
|
|
21
|
+
Then I should see "Welcome with waiting until page load"
|