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.
Files changed (45) hide show
  1. package/assets/config_templates/circleci-linux-chrome.conf.js +1 -0
  2. package/assets/config_templates/github-linux-chrome.conf.js +1 -0
  3. package/examples/test--when--i-scroll-functionality.html +176 -0
  4. package/nightwatch.conf.js +1 -0
  5. package/package.json +1 -1
  6. package/tests/features/test--given--i-am-on-homepage.feature +2 -2
  7. package/tests/features/test--then--i-should--not--see-text-in-element.feature +2 -2
  8. package/tests/features/test--then--i-should--see-text-in-element-by-attr.feature +2 -2
  9. package/tests/features/test--then--i-should--see-text-in-element.feature +2 -2
  10. package/tests/features/test--then--i-should--see-text-matching-pattern-in-element.feature +4 -4
  11. package/tests/features/test--then--i-should--see-text-matching-pattern.feature +5 -5
  12. package/tests/features/test--then--i-should-be-on-page.feature +2 -2
  13. package/tests/features/test--then--i-should-be-on-the-homepage.feature +2 -2
  14. package/tests/features/test--then--i-should-not-see-an-element-by-attr.feature +2 -2
  15. package/tests/features/test--then--i-should-not-see-an-element.feature +2 -2
  16. package/tests/features/test--then--i-should-see-an-element-by-attr.feature +2 -2
  17. package/tests/features/test--then--i-should-see-an-element.feature +2 -2
  18. package/tests/features/test--then--the-checkbox-is-checked.feature +2 -2
  19. package/tests/features/test--then--the-checkbox-should-be-checked.feature +2 -2
  20. package/tests/features/test--then--the-element-should-contain-cssproperty.feature +2 -2
  21. package/tests/features/test--then--the-element-should-not-contain-cssproperty.feature +3 -3
  22. package/tests/features/test--then--the-field-should-contain-value.feature +3 -3
  23. package/tests/features/test--then--the-response-should-contain.feature +3 -3
  24. package/tests/features/test--then--the-response-status-code-should-be.feature +2 -2
  25. package/tests/features/test--then--the-url-should-match.feature +4 -4
  26. package/tests/features/test--then-the-link-should-contain-by-attribute.feature +6 -7
  27. package/tests/features/test--then-the-link-should-contain.feature +3 -4
  28. package/tests/features/test--when--i-attach-file-to-feild.feature +2 -3
  29. package/tests/features/test--when--i-check-checkbox.feature +2 -3
  30. package/tests/features/test--when--i-click-link-by-attribute.feature +2 -3
  31. package/tests/features/test--when--i-click-link.feature +4 -5
  32. package/tests/features/test--when--i-fill-in-by-attr.feature +9 -9
  33. package/tests/features/test--when--i-fill-in-table-by-attr.feature +6 -6
  34. package/tests/features/test--when--i-fill-in.feature +5 -5
  35. package/tests/features/test--when--i-go-to-homepage.feature +3 -6
  36. package/tests/features/test--when--i-move-forward-backward-one-page.feature +2 -3
  37. package/tests/features/test--when--i-press-button-by-attribute.feature +8 -9
  38. package/tests/features/test--when--i-press-button.feature +7 -3
  39. package/tests/features/test--when--i-reload-page.feature +2 -3
  40. package/tests/features/test--when--i-scroll.feature +48 -0
  41. package/tests/features/test--when--i-select-option-from-dropdownlist.feature +17 -6
  42. package/tests/features/test--when--i-wait-page-is-loaded.feature +2 -3
  43. package/tests/features/test--when--i-wait-time.feature +12 -13
  44. package/tests/step-definitions/webship.js +395 -202
  45. 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
- As an anonymous user,
4
- I want to be able to navigate to the homepage from another page,
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
- As a tester,
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
- As a tester,
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
- When I press "#btn-pressid" by attr
9
- Then I should see "Button Pressed Successfully"
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
- When I press "btn-pressid" by "id" attr
14
- Then I should see "Button Pressed Successfully"
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
- When I press "btn-pressname" by attr
19
- Then I should see "Button Pressed Successfully"
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
- As a tester,
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"
@@ -1,7 +1,6 @@
1
1
  Feature: An example of reloading the page.
2
-
3
- As a tester,
4
- I want to be able to reload the page.
2
+ As a tester,
3
+ I want to be able to reload the page.
5
4
 
6
5
  Scenario: Check reloading the page.
7
6
  Given I am on "/test--when--i-reload-page.html"
@@ -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 in the dropdown list by its text label.
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
- As a tester,
4
- I want to be able to test selecting an option from a dropdown list by its text label.
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
- When I select "Saab" from "Choose a car:"
9
- When I press "Submit" by attr
10
- Then I should see "Option ( Saab ) has been selected successfully"
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
- As a tester,
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
- As a tester,
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
- When I go to "/test--when-i-wait-specific-time.html"
9
- And I wait 6 seconds
10
- Then I should see "Welcome with waiting full time"
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
- When I go to "/test--when-i-wait-specific-time.html"
15
- And I wait 3s
16
- Then I should see "Welcome with waiting full time"
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
- When I go to "/test--when-i-wait-max-of-time.html"
21
- And I wait max of 6 seconds
22
- Then I should see "Welcome with waiting until page load"
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"