webship-js 1.0.43 → 1.0.45
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/CNAME +0 -0
- package/dist/nightwatch.conf.dev.js +93 -0
- package/examples/about-us.html +0 -0
- package/examples/contact-us.html +0 -0
- package/examples/index.html +0 -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--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-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-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/generate-reports.js +0 -0
- package/nightwatch.conf.js +1 -1
- package/package.json +1 -1
- package/tests/assets/webshipco.png +0 -0
- package/tests/features/api-step-definitions-individual.feature +185 -0
- package/tests/features/complete-api-testing-examples.feature +205 -0
- 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 +2 -2
- package/tests/features/test--then--i-should--see-text-matching-pattern.feature +2 -2
- 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--i-should-see-text-in-table-row.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 +2 -2
- package/tests/features/test--then--the-field-should-contain-value.feature +2 -2
- package/tests/features/test--then--the-response-should-contain.feature +2 -2
- package/tests/features/test--then--the-response-status-code-should-be.feature +2 -2
- package/tests/features/test--then--the-url-should-match.feature +2 -2
- package/tests/features/test--then-the-link-should-contain-by-attribute.feature +2 -2
- package/tests/features/test--then-the-link-should-contain.feature +2 -2
- package/tests/features/test--when--i-attach-file-to-feild.feature +2 -2
- package/tests/features/test--when--i-check-checkbox.feature +2 -2
- package/tests/features/test--when--i-click-link-by-attribute.feature +2 -2
- package/tests/features/test--when--i-click-link.feature +2 -2
- package/tests/features/test--when--i-click-text-in-table-row.feature +21 -21
- package/tests/features/test--when--i-fill-in-by-attr.feature +2 -2
- package/tests/features/test--when--i-fill-in-table-by-attr.feature +2 -2
- package/tests/features/test--when--i-fill-in.feature +2 -2
- package/tests/features/test--when--i-go-to-homepage.feature +3 -3
- package/tests/features/test--when--i-move-forward-backward-one-page.feature +2 -2
- package/tests/features/test--when--i-press-button-by-attribute.feature +2 -2
- package/tests/features/test--when--i-press-button.feature +2 -2
- package/tests/features/test--when--i-reload-page.feature +2 -2
- package/tests/features/test--when--i-scroll-left-right.feature +2 -2
- package/tests/features/test--when--i-scroll.feature +2 -2
- package/tests/features/test--when--i-select-option-from-dropdownlist.feature +2 -2
- package/tests/features/test--when--i-wait-page-is-loaded.feature +2 -2
- package/tests/features/test--when--i-wait-time.feature +2 -2
- package/tests/step-definitions/webship-api.js +547 -0
- package/tests/step-definitions/webship.js +71 -62
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Feature: An example to ensure visibility of a specific element on the current page by its attributes
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
As a user,
|
|
3
|
+
I want to make sure that when I'm on a particular page, I can see a specific element by its attributes
|
|
4
4
|
|
|
5
5
|
Scenario: Ensure visibility of a specific element by its attributes
|
|
6
6
|
Given I am on "/test--then--i-should--see-text-in-element.html"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Feature: An example to ensure that a specific element is visible on the current page by its label
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
As a user,
|
|
3
|
+
I want to ensure that when I'm on a particular page, I can see a specific element by its label
|
|
4
4
|
|
|
5
5
|
Scenario: Check to test seeing for a specific element by its label
|
|
6
6
|
Given I am on "/test--then--i-should--see-text-in-element.html"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Feature: Assert text visibility in table rows
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
As a test automation engineer
|
|
3
|
+
I want to verify text content within specific table rows
|
|
4
4
|
So that I can validate data accuracy and proper display in tables
|
|
5
5
|
|
|
6
6
|
Background:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Feature: An example of a test case for selecting a checkbox
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to be able to check that the checkbox is checked or not
|
|
4
4
|
|
|
5
5
|
Scenario: Verify that the checkbox is checked
|
|
6
6
|
Given I am on "/test--then--the-checkbox-checked.html"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Feature: An example to assert the selection of a checkbox
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
As an anonymous user,
|
|
3
|
+
I want to ensure that a specific checkbox is checked before submitting a particular action
|
|
4
4
|
|
|
5
5
|
Scenario: Ensure that the checkbox is checked
|
|
6
6
|
Given I am on "/test--then--the-checkbox-checked.html"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Feature: An example to verify whether the element contains a specific expected CSS property.
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
As a developer,
|
|
3
|
+
I want to verify whether the element contains a specific expected CSS property.
|
|
4
4
|
|
|
5
5
|
Scenario: Verify whether the element contains a specific expected CSS property
|
|
6
6
|
Given I am on "/test--then--the-element-should_not-contain-cssproperty.html"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Feature: An example to verify whether the element does not contain a specific expected CSS property.
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
As a developer,
|
|
3
|
+
I want to verify whether the element does not contain a specific expected CSS property.
|
|
4
4
|
|
|
5
5
|
Scenario: Verify whether the element does not contain a certain CSS property
|
|
6
6
|
Given I am on "/test--then--the-element-should_not-contain-cssproperty.html"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Feature: An example to verify whether the field contains a specific value identified by its element label
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to verify whether the field has a specific value based on its element label
|
|
4
4
|
|
|
5
5
|
Scenario: Verify that the field has a particular value based on its element label
|
|
6
6
|
Given I am on "/test--then--i-should--not--see-text-in-element.html"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Feature: An example to ensure that the response page contains specific text
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to navigate to a page to verify whether it contains specific text
|
|
4
4
|
|
|
5
5
|
Scenario: Ensure that the response page contains specific text
|
|
6
6
|
Given I am on the homepage
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Feature: An example to check the status code of a page response
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to be able to check the status code of a page response
|
|
4
4
|
|
|
5
5
|
Scenario: Check the response status code for a non-existing page
|
|
6
6
|
Given I am on the homepage
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Feature: An example of checking for matching URLs based on a specific pattern
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to ensure that the current page path matches a specific pattern
|
|
4
4
|
|
|
5
5
|
Scenario: Ensure that the current page path matches the URL pattern that uses dashes between words
|
|
6
6
|
Given I am on "/test-acceptable-url-path.html"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Feature: An example of checking the href attribute of a link element to see if it contains a specific URL, which is found by its attributes.
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to be able to check link href if contain a specific URL found by its attributes
|
|
4
4
|
|
|
5
5
|
Scenario: Verify that the link contains "about" by its direct id, class attribute
|
|
6
6
|
Given I am on "/test--then--the-link-should-contain.html"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Feature: An example of checking the href attribute of a link element to see if it contains a specific text.
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to be able to check link href if contain a specific text
|
|
4
4
|
|
|
5
5
|
Scenario: Verify that the link contains "about"
|
|
6
6
|
Given I am on "/test--then--the-link-should-contain.html"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Feature: An example of checking the attachment of a file to a field
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to be able to attach a file (e.g., images) to a field
|
|
4
4
|
|
|
5
5
|
Scenario: Checking the attachment of an image to a field
|
|
6
6
|
Given I am on "/test--when--i-attach-file-to-feild.html"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Feature: An example of checking and unchecking a checkbox
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to be able to check and uncheck a checkbox
|
|
4
4
|
|
|
5
5
|
Scenario: Implementing the ability to check and uncheck a checkbox
|
|
6
6
|
Given I am on "/test--when--i-check-uncheck-checkbox.html"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Feature: An example of clicking a link by its attribute
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to be able to click a link by its attribute
|
|
4
4
|
|
|
5
5
|
Scenario: Verify the action of clicking a link by targeting its ID attribute
|
|
6
6
|
Given I am on "/test--when--i-click-link.html"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Feature: An example of clicking a link by its text
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to be able to click a link based on its text
|
|
4
4
|
|
|
5
5
|
Scenario: Verify clicking a link by its text
|
|
6
6
|
Given I am on "/test--when--i-click-link.html"
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
Feature: Click specific text in table rows
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
As a test automation engineer
|
|
3
|
+
I want to be able to click on specific text within table rows
|
|
4
4
|
So that I can interact with table actions based on row content
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
Background:
|
|
7
|
+
Given I am on "/test--when--i-click-text-in-table-row.html"
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
Scenario: Click Edit button in John Smith row
|
|
10
|
+
When I click "Edit" in the "John Smith" row
|
|
11
|
+
Then I should see "Performed (edit) action on (John Smith)" in the "#action-message" element by attr
|
|
12
12
|
|
|
13
13
|
Scenario: Click View Details button in Jane Doe row
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
When I click "View Details" in the "Jane Doe" row
|
|
15
|
+
Then I should see "Performed (view) action on (Jane Doe)" in the "#action-message" element by attr
|
|
16
16
|
|
|
17
17
|
Scenario: Click Delete button in Bob Johnson row
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
When I click "Delete" in the "Bob Johnson" row
|
|
19
|
+
Then I should see "Performed (delete) action on (Bob Johnson)" in the "#action-message" element by attr
|
|
20
20
|
|
|
21
21
|
Scenario: Click Download link in Product A row
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
When I click "Download" in the "Product A" row
|
|
23
|
+
Then I should see "Performed (download) action on (Product A)" in the "#action-message" element by attr
|
|
24
24
|
|
|
25
25
|
Scenario: Click View Details in Order #12345 row
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
When I click "View Details" in the "Order #12345" row
|
|
27
|
+
Then I should see "Performed (view) action on (Order #12345)" in the "#action-message" element by attr
|
|
28
28
|
|
|
29
29
|
Scenario: Click Track in Order #67890 row
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
When I click "Track" in the "Order #67890" row
|
|
31
|
+
Then I should see "Performed (track) action on (Order #67890)" in the "#action-message" element by attr
|
|
32
32
|
|
|
33
33
|
Scenario: Multiple table interaction
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
When I click "Edit" in the "John Smith" row
|
|
35
|
+
And I wait 1 second
|
|
36
|
+
And I click "Download" in the "Product B" row
|
|
37
|
+
Then I should see "Performed (download) action on (Product B)" in the "#action-message" element by attr
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Feature: An example of filling an input textbox with a value using its attributes.
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to fill an input field with a value using its attributes.
|
|
4
4
|
|
|
5
5
|
Scenario: Fill in the input field using its ID and class attributes.
|
|
6
6
|
Given I am on "/test--when--i-fill-in.html"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Feature: An example of populating a table of input fields with values using their attributes.
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to be able to fill input text fields with values using their attributes.
|
|
4
4
|
|
|
5
5
|
Scenario: Check the filling of a table of input fields using different attributes.
|
|
6
6
|
Given I am on "/test--when--i-fill-in.html"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Feature: An example of filling an input textbox with a value using its label.
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to be able to fill input text fields with values using their labels.
|
|
4
4
|
|
|
5
5
|
Scenario: Check filling an input field with a value using its label.
|
|
6
6
|
Given I am on "/test--when--i-fill-in.html"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Feature: An example of testing whether the user is on any page and then navigating to the homepage.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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.
|
|
5
5
|
|
|
6
6
|
Scenario: Check if on the About Us page, then navigate to the homepage.
|
|
7
7
|
Given I am on "/about-us.html"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Feature: An example of navigating forward and backward by one page.
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to be able to navigate forward and backward by one page.
|
|
4
4
|
|
|
5
5
|
Scenario: Check to navigate forward and backward one page
|
|
6
6
|
Given I am on the homepage
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Feature: An example of pressing a button using its attributes.
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to be able to press a button using its attributes.
|
|
4
4
|
|
|
5
5
|
Scenario: Verify that you can click a button by specifying its ID with the '#' sign.
|
|
6
6
|
Given I am on "/test--when--i-press-button.html"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Feature: An example of pressing a button by its label.
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to be able to press a button using its label.
|
|
4
4
|
|
|
5
5
|
Scenario: Check pressing a button using its label.
|
|
6
6
|
Given I am on "/test--when--i-press-button.html"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Feature: Complete scrolling functionality test
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to test all scrolling step definitions to ensure they work correctly.
|
|
4
4
|
|
|
5
5
|
Scenario: Test basic scroll down functionality
|
|
6
6
|
Given I am on "/test--when--i-scroll-left-right-functionality.html"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Feature: Complete scrolling functionality test
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to test all scrolling step definitions to ensure they work correctly.
|
|
4
4
|
|
|
5
5
|
Scenario: Test basic scroll down functionality
|
|
6
6
|
Given I am on "/test--when--i-scroll-functionality.html"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Feature: An example of selecting an option from a dropdown list using its attributes.
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to be able to test selecting an option from a dropdown list using its attributes.
|
|
4
4
|
|
|
5
5
|
Scenario: Check selecting an option from a dropdown list using its attributes.
|
|
6
6
|
Given I am on "/test--when--i-select-option-from-dropdownlist.html"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Feature: An example test to wait until the page is loaded.
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
As a tester,
|
|
3
|
+
I want to make sure that I can wait until a page is loaded.
|
|
4
4
|
|
|
5
5
|
Scenario: Check waiting for the page to load.
|
|
6
6
|
Given I am on "/test--when-i-wait-page-until-is-loaded.html"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Feature: An example test to wait for a specific maximum number of seconds/minutes for the page to load.
|
|
2
|
-
|
|
3
|
-
|
|
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.
|
|
4
4
|
|
|
5
5
|
Scenario: Check waiting 6 seconds for the page content to load.
|
|
6
6
|
Given I am on the homepage
|