webship-js 1.0.20 → 1.0.23
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 -7
- package/.github/workflows/github-actions.yml +7 -4
- package/.gitlab-ci.yml +23 -35
- package/CNAME +1 -0
- package/bitbucket-pipelines.yml +26 -0
- package/examples/example-api.json +28 -0
- package/examples/existing-page.html +11 -0
- package/examples/index.html +1 -1
- package/examples/test--then--i-should--not--see-text-in-element.html +1 -1
- package/examples/test--then--i-should--see-text-matching-pattern.html +31 -0
- package/examples/test--when--i-press-button.html +1 -1
- package/examples/test--when--i-reload-page.html +1 -1
- package/examples/test-acceptable-url-path.html +11 -0
- package/generate-reports.js +1 -1
- package/lib/custom-assertions/backToHomepage.js +15 -0
- package/lib/custom-assertions/{smartCheckboxChecked.js → checkboxChecked.js} +10 -10
- package/lib/custom-assertions/{smartElementContainsCss.js → elementContainsCss.js} +10 -10
- package/lib/custom-assertions/{smartElementContains.js → elementContainsText.js} +10 -10
- package/lib/custom-assertions/responseStatus.js +13 -0
- package/lib/custom-assertions/shouldVisible.js +8 -0
- package/lib/custom-assertions/textMatching.js +12 -0
- package/lib/custom-commands/{smartUploadFile.js → fileUpload.js} +0 -1
- package/lib/custom-commands/press.js +3 -0
- package/lib/custom-commands/{smartSelectOption.js → selectOption.js} +8 -8
- package/lib/custom-commands/wait.js +12 -0
- package/nightwatch.conf.js +2 -2
- package/package.json +5 -6
- package/tests/features/test--given--i-am-on-homepage.feature +11 -7
- package/tests/features/test--then--i-should--not--see-text-in-element.feature +12 -8
- package/tests/features/test--then--i-should--see-text-matching-pattern-in-element.feature +18 -0
- package/tests/features/test--then--i-should--see-text-matching-pattern.feature +18 -0
- package/tests/features/test--then--i-should-be-on-page.feature +7 -7
- package/tests/features/test--then--i-should-be-on-the-homepage.feature +5 -4
- package/tests/features/test--then--i-should-see-an-element.feature +4 -5
- package/tests/features/test--then--the-checkbox-is-checked.feature +18 -0
- package/tests/features/test--then--the-checkbox-should-be-checked.feature +16 -0
- package/tests/features/test--then--the-element-should_not-contain-cssproperty.feature +11 -8
- package/tests/features/test--then--the-field-should-contain-value.feature +3 -4
- package/tests/features/test--then--the-response-should-contain.feature +3 -3
- package/tests/features/test--then--the-response-status-code-should-be.feature +31 -0
- package/tests/features/test--then--the-url-should-match.feature +7 -0
- package/tests/features/test--when--i-attach-file-to-feild.feature +5 -5
- package/tests/features/test--when--i-check-checkbox.feature +4 -4
- package/tests/features/test--when--i-click-link.feature +6 -7
- package/tests/features/test--when--i-fill-in.feature +13 -18
- package/tests/features/test--when--i-move-forward-backward-one-page.feature +8 -7
- package/tests/features/test--when--i-press-button.feature +7 -9
- package/tests/features/test--when--i-reload-page.feature +5 -7
- package/tests/features/test--when--i-select-option-from-dropdownlist.feature +12 -0
- package/tests/features/test--when--i-uncheck-checkbox.feature +5 -7
- package/tests/features/test--when--i-wait-time.feature +2 -2
- package/tests/step-definitions/webship.js +180 -189
- package/bitbucket-pipelines-test.yml +0 -34
- package/lib/custom-commands/smartPressButton.js +0 -12
- package/tests/features/test--then--i-should-see-text-matching.feature +0 -8
- package/tests/features/test--then--the-checkbox-checked.feature +0 -16
- package/tests/features/test--when--i-select-option-from-selectbox.feature +0 -13
- /package/examples/{test--when--i-select-option-from-selectbox.html → test--when--i-select-option-from-dropdownlist.html} +0 -0
- /package/lib/custom-commands/{smartCheckItem.js → checkItem.js} +0 -0
- /package/lib/custom-commands/{smartClickLink.js → clickLink.js} +0 -0
- /package/lib/custom-commands/{smartFillTextInput.js → fillTextInput.js} +0 -0
- /package/lib/custom-commands/{smartUncheckItem.js → uncheckItem.js} +0 -0
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
Feature:
|
|
2
|
-
As
|
|
3
|
-
I want to be able to navigate to the homepage
|
|
4
|
-
So that I can check the welcome message at homepage
|
|
5
|
-
|
|
6
|
-
Scenario: Check the homepage
|
|
1
|
+
Feature: An example to test for being on the homepage
|
|
2
|
+
As an anonymous user
|
|
3
|
+
I want to be able to navigate to the homepage
|
|
4
|
+
So that I can check the welcome message at homepage
|
|
5
|
+
|
|
6
|
+
Scenario: Check to be on (the) homepage
|
|
7
7
|
Given I am on the homepage
|
|
8
8
|
Then I should see "Welcome to the homepage of the Webship-js Examples"
|
|
9
9
|
|
|
10
|
-
Scenario: Check
|
|
10
|
+
Scenario: Check to be on homepage
|
|
11
11
|
Given I am on homepage
|
|
12
12
|
Then I should see "Welcome to the homepage of the Webship-js Examples"
|
|
13
|
+
|
|
14
|
+
Scenario: Check to be on homepage (useing we)
|
|
15
|
+
Given we are on homepage
|
|
16
|
+
Then we should see "Welcome to the homepage of the Webship-js Examples"
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
Feature:
|
|
2
|
-
As a
|
|
3
|
-
I want to be able to check an element
|
|
1
|
+
Feature: An example to test whether an element contains a certain text or not
|
|
2
|
+
As a tester
|
|
3
|
+
I want to be able to check an element contains a certain text or not
|
|
4
4
|
|
|
5
|
-
Scenario: Check an element if it
|
|
6
|
-
Given I am on
|
|
7
|
-
When I go to "test--then--i-should--not--see-text-in-element.html"
|
|
5
|
+
Scenario: Check an element if it contains a specific text
|
|
6
|
+
Given I am on "/test--then--i-should--not--see-text-in-element.html"
|
|
8
7
|
And I fill in "Username" with "user1"
|
|
9
8
|
And I fill in "Password" with "1234"
|
|
10
9
|
Then I should see "user1" in the "Username" element
|
|
11
|
-
When I
|
|
12
|
-
And I fill in "
|
|
10
|
+
When I fill in "Username" with:
|
|
11
|
+
And I fill in "Password" with:
|
|
13
12
|
Then I should not see "user1" in the "Username" element
|
|
13
|
+
|
|
14
|
+
Scenario: Check an element if it does not contain a specific text
|
|
15
|
+
Given I am on "/test--then--i-should--not--see-text-in-element.html"
|
|
16
|
+
And I fill in "Username" with "user2"
|
|
17
|
+
Then I should not see "user1" in the "Username" element
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Feature: An example of testing match a pattern to text in a specific element
|
|
2
|
+
As a developer
|
|
3
|
+
I want to be able to check if I can see text matching the pattern I require in a specific element.
|
|
4
|
+
|
|
5
|
+
Scenario: Check if text exist in an element has a pattern match with 12-hour time format
|
|
6
|
+
Given I am on "/test--then--i-should--see-text-matching-pattern.html"
|
|
7
|
+
And I wait max of 3 seconds
|
|
8
|
+
Then I should see text matching "(((0[1-9])|(1[0-2])):([0-5])(0|5)\s(A|P|a|p)(M|m))" in the ".time" element
|
|
9
|
+
|
|
10
|
+
Scenario: Check if text exist in an element has a pattern not match with date YYYY-MM-DD
|
|
11
|
+
Given I am on "/test--then--i-should--see-text-matching-pattern.html"
|
|
12
|
+
And I wait max of 3 seconds
|
|
13
|
+
Then I should not see text matching "\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])" in the "#date" element
|
|
14
|
+
|
|
15
|
+
Scenario: Check if text exist in an element has a pattern match with date DD/MM/YYYY or DD-MM-YYYY
|
|
16
|
+
Given I am on "/test--then--i-should--see-text-matching-pattern.html"
|
|
17
|
+
And I wait max of 3 seconds
|
|
18
|
+
Then I should see text matching "(0?[1-9]|[12][0-9]|3[01])[\/\-](0?[1-9]|1[012])[\/\-]\d{4}" in the "#date" element
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Feature: An example of testing to match a pattern to text on a specific page
|
|
2
|
+
As a developer
|
|
3
|
+
I want to be able to check if I can see text matching the pattern I require.
|
|
4
|
+
|
|
5
|
+
Scenario: Check if exist a text has a pattern match with text start with "T"
|
|
6
|
+
Given I am on "/test--then--i-should--see-text-matching-pattern.html"
|
|
7
|
+
And I wait max of 3 seconds
|
|
8
|
+
Then I should see text matching "^T\w+"
|
|
9
|
+
|
|
10
|
+
Scenario: Check if not exist a text has a pattern match with text start with "O"
|
|
11
|
+
Given I am on "/test--then--i-should--see-text-matching-pattern.html"
|
|
12
|
+
And I wait max of 3 seconds
|
|
13
|
+
Then I should not see text matching "^O\w+"
|
|
14
|
+
|
|
15
|
+
Scenario: Check if exist a text has a pattern match with Email
|
|
16
|
+
Given I am on "/test--then--i-should--see-text-matching-pattern.html"
|
|
17
|
+
And I wait max of 3 seconds
|
|
18
|
+
Then I should see text matching "[a-z0-9]+@[a-z]+\.[a-z]{2,3}"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
Feature:
|
|
2
|
-
As
|
|
3
|
-
I want to be sure I am on
|
|
1
|
+
Feature: An example to test being on a specific page
|
|
2
|
+
As an anonymous user
|
|
3
|
+
I want to be sure I am on a specific page
|
|
4
4
|
|
|
5
|
-
Scenario: Check
|
|
5
|
+
Scenario: Check being on a specific page
|
|
6
6
|
Given I am on the homepage
|
|
7
|
-
When I go to "about-us.html"
|
|
8
|
-
Then I should be on "about-us.html"
|
|
7
|
+
When I go to "/about-us.html"
|
|
8
|
+
Then I should be on "/about-us.html"
|
|
9
9
|
When I move backward one page
|
|
10
|
-
Then I should be on
|
|
10
|
+
Then I should be on homepage
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
Feature:
|
|
2
|
-
As
|
|
1
|
+
Feature: An example to test being on the homepage
|
|
2
|
+
As an anonymous user
|
|
3
3
|
I want to be sure I am on the homepage
|
|
4
4
|
|
|
5
|
-
Scenario: Check
|
|
5
|
+
Scenario: Check being on the homepage
|
|
6
6
|
Given I am on the homepage
|
|
7
|
-
When I go to "about-us.html"
|
|
7
|
+
When I go to "/about-us.html"
|
|
8
8
|
And I move backward one page
|
|
9
|
+
And I wait max of 3 seconds
|
|
9
10
|
Then I should be on the homepage
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
Feature:
|
|
2
|
-
As a
|
|
1
|
+
Feature: An example to test seeing for a specific element on current page
|
|
2
|
+
As a user
|
|
3
3
|
I want to make sure that when I'm on a particular page, I should see a specific element
|
|
4
4
|
|
|
5
|
-
Scenario: Check
|
|
6
|
-
Given I am on
|
|
7
|
-
When I go to "about-us.html"
|
|
5
|
+
Scenario: Check to test seeing for a specific element
|
|
6
|
+
Given I am on "/about-us.html"
|
|
8
7
|
Then I should see a "body" element
|
|
9
8
|
And I should see a "#paragraphid" element
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Feature: An example of test for selecting a checkbox
|
|
2
|
+
As a tester
|
|
3
|
+
I want to be able to check that the checkbox is checked or not
|
|
4
|
+
|
|
5
|
+
Scenario: Check that the checkbox is checked
|
|
6
|
+
Given I am on "/test--then--the-checkbox-checked.html"
|
|
7
|
+
When I check "rememberMe"
|
|
8
|
+
And I check "PrivacyPolicy"
|
|
9
|
+
And I press "Register"
|
|
10
|
+
Then the checkbox "Remember me" is checked
|
|
11
|
+
And I should see "Registration Done Successfully"
|
|
12
|
+
|
|
13
|
+
Scenario: Check that the checkbox is not checked
|
|
14
|
+
Given I am on "/test--then--the-checkbox-checked.html"
|
|
15
|
+
When I check "PrivacyPolicy"
|
|
16
|
+
And I press "Register"
|
|
17
|
+
Then the checkbox "Remember me" is not checked
|
|
18
|
+
Then I should see "Registration Done Successfully"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Feature: An example of test assert for selecting a checkbox
|
|
2
|
+
As an anonymous user
|
|
3
|
+
I want to be sure that a specific checkbox should be checked before submitting a specific action.
|
|
4
|
+
|
|
5
|
+
Scenario: Check that the checkbox should be checked
|
|
6
|
+
Given I am on "/test--then--the-checkbox-checked.html"
|
|
7
|
+
When I check "PrivacyPolicy"
|
|
8
|
+
And I press "Register"
|
|
9
|
+
Then the checkbox "PrivacyPolicy" should be checked
|
|
10
|
+
And I should see "Registration Done Successfully"
|
|
11
|
+
|
|
12
|
+
Scenario: Check that the checkbox should not be checked
|
|
13
|
+
Given I am on "/test--then--the-checkbox-checked.html"
|
|
14
|
+
When I press "Register"
|
|
15
|
+
Then the "PrivacyPolicy" checkbox should not be checked
|
|
16
|
+
And I should see "Please check Agree to Privacy Policy"
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
Feature:
|
|
1
|
+
Feature: An example to test if the element contains a certain expected CSS property or not.
|
|
2
2
|
As a developer
|
|
3
|
-
I want to be able to test if element contains
|
|
3
|
+
I want to be able to test if the element contains a certain expected CSS property or not.
|
|
4
4
|
|
|
5
|
-
Scenario: Check element if contains
|
|
6
|
-
Given I am on
|
|
7
|
-
|
|
8
|
-
Then the "body" element should contain "background-color: lightcoral;"
|
|
9
|
-
And the "Username" element should contain "border: solid 5px red;"
|
|
5
|
+
Scenario: Check element if the element contains a certain expected CSS property
|
|
6
|
+
Given I am on "/test--then--the-element-should_not-contain-cssproperty.html"
|
|
7
|
+
Then I should see a "body" element
|
|
10
8
|
When I press "Submit"
|
|
11
9
|
Then the "body" element should contain "background-color: white;"
|
|
12
|
-
|
|
10
|
+
|
|
11
|
+
Scenario: Check element if the element not contains a certain CSS property
|
|
12
|
+
Given I am on "/test--then--the-element-should_not-contain-cssproperty.html"
|
|
13
|
+
Then I should see a "body" element
|
|
14
|
+
When I press "Submit"
|
|
15
|
+
Then the "Username" element should not contain "border: solid 5px red;"
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
Feature:
|
|
1
|
+
Feature: An example to test if the field contains certain value
|
|
2
2
|
As a tester
|
|
3
|
-
I want to be able to check field if has a
|
|
3
|
+
I want to be able to check field if has a certain value or not
|
|
4
4
|
|
|
5
5
|
Scenario: Check field if has a particular value or not
|
|
6
|
-
Given I am on
|
|
7
|
-
When I go to "test--then--i-should--not--see-text-in-element.html"
|
|
6
|
+
Given I am on "/test--then--i-should--not--see-text-in-element.html"
|
|
8
7
|
And I fill in "Username" with "user1"
|
|
9
8
|
Then the "Username" field should contain "user1"
|
|
10
9
|
When I press "Reset"
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
Feature:
|
|
1
|
+
Feature: An example to test response page if contain a text
|
|
2
2
|
As a tester,
|
|
3
3
|
I want to be able to navigate to a page
|
|
4
4
|
So that I can check if this page contains a specific text
|
|
5
5
|
|
|
6
|
-
Scenario: Check
|
|
6
|
+
Scenario: Check response page if contain a text
|
|
7
7
|
Given I am on the homepage
|
|
8
8
|
Then the response should contain "Welcome to the homepage"
|
|
9
9
|
|
|
10
|
-
Scenario: Check
|
|
10
|
+
Scenario: Check response page if not contain a text
|
|
11
11
|
Given I am on the homepage
|
|
12
12
|
Then the response should not contain "Access denied"
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
Feature: An example to test a page response status code
|
|
2
|
+
As a tester
|
|
3
|
+
I want to be able to test a page response status code
|
|
4
|
+
|
|
5
|
+
Scenario: Check the response status code for not existing page page
|
|
6
|
+
Given I am on the homepage
|
|
7
|
+
When I go to "/not-existing-page.html"
|
|
8
|
+
And I wait 2 seconds
|
|
9
|
+
Then the response status code should be 404
|
|
10
|
+
And the response status code should not be 200
|
|
11
|
+
|
|
12
|
+
Scenario: Check the response status code for existing page
|
|
13
|
+
Given I am on the homepage
|
|
14
|
+
When I go to "/existing-page.html"
|
|
15
|
+
And I wait 2 seconds
|
|
16
|
+
Then the response status code should not be 404
|
|
17
|
+
And the response status code should be 200
|
|
18
|
+
|
|
19
|
+
Scenario: Check the response status code for an API with JSON page format
|
|
20
|
+
Given I am on the homepage
|
|
21
|
+
When I go to "/example-api.json"
|
|
22
|
+
And I wait 2 seconds
|
|
23
|
+
Then the response status code should not be 404
|
|
24
|
+
And the response status code should be 200
|
|
25
|
+
|
|
26
|
+
Scenario: Check the response status code for a parameter of the API with JSON page format
|
|
27
|
+
Given I am on the homepage
|
|
28
|
+
When I go to "/example-api.json?include=author"
|
|
29
|
+
And I wait 2 seconds
|
|
30
|
+
Then the response status code should not be 404
|
|
31
|
+
And the response status code should be 200
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Feature: An example of testing for matching URLs for a particular expression
|
|
2
|
+
As a tester
|
|
3
|
+
I want to be able to be sure that current page PATH matches regular expression
|
|
4
|
+
|
|
5
|
+
Scenario: Check the current page path matchs URL expression with dashes between words
|
|
6
|
+
Given I am on "/test-acceptable-url-path.html"
|
|
7
|
+
Then the url should match "(https?:\/\/)?([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.[a-zA-Z]{2,}(:\d+)?(\/[^?#\s_]+)?(\?[^#\s_]+)?(#.*)?"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
Feature:
|
|
1
|
+
Feature: An example to test attach file to field
|
|
2
2
|
|
|
3
3
|
As a tester
|
|
4
|
-
I want to be able to attach file (images) to
|
|
4
|
+
I want to be able to attach file (images) to field
|
|
5
5
|
|
|
6
|
-
Scenario: Check
|
|
7
|
-
Given I am on "test--when--i-attach-file-to-feild.html"
|
|
8
|
-
When I attach the file "
|
|
6
|
+
Scenario: Check attach file to field
|
|
7
|
+
Given I am on "/test--when--i-attach-file-to-feild.html"
|
|
8
|
+
When I attach the file "webshipco.png" to "#fileUpload"
|
|
9
9
|
When I press "Submit"
|
|
10
10
|
Then I should see "webshipco.png"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
Feature:
|
|
1
|
+
Feature: An example to check the checkbox
|
|
2
2
|
|
|
3
3
|
As a tester
|
|
4
|
-
I want to be able to
|
|
4
|
+
I want to be able to check a checkbox
|
|
5
5
|
|
|
6
|
-
Scenario: Check the
|
|
7
|
-
Given I am on "test--when--i-check-uncheck-checkbox.html"
|
|
6
|
+
Scenario: Check the checkbox
|
|
7
|
+
Given I am on "/test--when--i-check-uncheck-checkbox.html"
|
|
8
8
|
When I check "vehicle1"
|
|
9
9
|
And I press "Submit"
|
|
10
10
|
Then I should see "You have a Bike"
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
Feature:
|
|
1
|
+
Feature: An example to click link
|
|
2
2
|
|
|
3
3
|
As a tester
|
|
4
|
-
I want to be able to
|
|
5
|
-
it will go to the link path page
|
|
4
|
+
I want to be able to click link
|
|
6
5
|
|
|
7
|
-
Scenario: Check
|
|
8
|
-
Given I am on "test--when--i-click-link.html"
|
|
6
|
+
Scenario: Check click link by link text
|
|
7
|
+
Given I am on "/test--when--i-click-link.html"
|
|
9
8
|
When I click "About us link"
|
|
10
9
|
And I wait max of 2 seconds
|
|
11
10
|
Then I should see "About Us"
|
|
12
11
|
|
|
13
|
-
Scenario: Check
|
|
14
|
-
Given I am on "test--when--i-click-link.html"
|
|
12
|
+
Scenario: Check click link by link css class
|
|
13
|
+
Given I am on "/test--when--i-click-link.html"
|
|
15
14
|
When I click "aboutUs"
|
|
16
15
|
And I wait max of 2 seconds
|
|
17
16
|
Then I should see "About Us"
|
|
@@ -1,36 +1,31 @@
|
|
|
1
|
-
Feature:
|
|
2
|
-
As a
|
|
3
|
-
I want to be able to
|
|
4
|
-
with empty value, value for text, and fill in table
|
|
1
|
+
Feature: An example of filling the input textbox with value
|
|
2
|
+
As a tester
|
|
3
|
+
I want to be able to fill input text with value
|
|
5
4
|
|
|
6
5
|
Scenario: Check fill in input field with value
|
|
7
|
-
Given I am on
|
|
8
|
-
When I
|
|
9
|
-
When I fill in "Username" with "webshipco"
|
|
6
|
+
Given I am on "/test--when--i-fill-in.html"
|
|
7
|
+
When I fill in "Username" with "John Smith"
|
|
10
8
|
When I fill in "Password" with "1234"
|
|
11
9
|
When I press "Login"
|
|
12
|
-
Then I should see "You enter Username:
|
|
10
|
+
Then I should see "You enter Username: John Smith and Password: 1234"
|
|
13
11
|
|
|
14
12
|
Scenario: Check fill in input field with empty value
|
|
15
|
-
Given I am on
|
|
16
|
-
When I go to "test--when--i-fill-in.html"
|
|
13
|
+
Given I am on "/test--when--i-fill-in.html"
|
|
17
14
|
When I fill in "Username" with:
|
|
18
15
|
When I press "Login"
|
|
19
16
|
Then I should see "You enter Username: "
|
|
20
17
|
|
|
21
18
|
Scenario: Check fill in value for input field
|
|
22
|
-
Given I am on
|
|
23
|
-
When I
|
|
24
|
-
When I fill in "webshipco" for "Username"
|
|
19
|
+
Given I am on "/test--when--i-fill-in.html"
|
|
20
|
+
When I fill in "John Smith" for "Username"
|
|
25
21
|
When I fill in "1234" for "Password"
|
|
26
22
|
When I press "Login"
|
|
27
|
-
Then I should see "You enter Username:
|
|
23
|
+
Then I should see "You enter Username: John Smith and Password: 1234"
|
|
28
24
|
|
|
29
25
|
Scenario: Check fill in table of input fields
|
|
30
|
-
Given I am on
|
|
31
|
-
When I go to "test--when--i-fill-in.html"
|
|
26
|
+
Given I am on "/test--when--i-fill-in.html"
|
|
32
27
|
When I fill in the following:
|
|
33
|
-
| username |
|
|
28
|
+
| username | John Smith |
|
|
34
29
|
| password | 1234 |
|
|
35
30
|
When I press "Login"
|
|
36
|
-
Then I should see "You enter Username:
|
|
31
|
+
Then I should see "You enter Username: John Smith and Password: 1234"
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
Feature:
|
|
1
|
+
Feature: An example to navigate forward and backward one page
|
|
2
2
|
|
|
3
3
|
As a tester
|
|
4
|
-
I want to be able to
|
|
5
|
-
So that I know it is working
|
|
4
|
+
I want to be able to navigate forward and backward one page
|
|
6
5
|
|
|
7
|
-
Scenario: Check
|
|
6
|
+
Scenario: Check to navigate forward and backward one page
|
|
8
7
|
Given I am on the homepage
|
|
9
|
-
When I go to "about-us.html"
|
|
10
|
-
When I move backward one page
|
|
11
|
-
When I move forward one page
|
|
8
|
+
When I go to "/about-us.html"
|
|
12
9
|
Then I should see "About Us"
|
|
13
10
|
When I move backward one page
|
|
11
|
+
And I wait max of 3 seconds
|
|
14
12
|
Then I should see "Welcome to the homepage of the Webship-js Examples"
|
|
13
|
+
When I move forward one page
|
|
14
|
+
And I wait max of 3 seconds
|
|
15
|
+
Then I should see "About Us"
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
Feature:
|
|
1
|
+
Feature: An example to press a button
|
|
2
2
|
|
|
3
|
-
As a tester
|
|
4
|
-
I want to be able to
|
|
5
|
-
So that I know it is working
|
|
3
|
+
As a tester
|
|
4
|
+
I want to be able to press a button
|
|
6
5
|
|
|
7
|
-
Scenario: Check
|
|
8
|
-
Given I am on
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Then I should see "Button Pressed Successfully"
|
|
6
|
+
Scenario: Check press a button
|
|
7
|
+
Given I am on "/test--when--i-press-button.html"
|
|
8
|
+
When I press "Submit"
|
|
9
|
+
Then I should see "Button Pressed Successfully"
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
Feature:
|
|
1
|
+
Feature: An example to reload the page
|
|
2
2
|
|
|
3
3
|
As a tester
|
|
4
|
-
I want to be able to
|
|
5
|
-
So that I know it is working
|
|
4
|
+
I want to be able to reload the page
|
|
6
5
|
|
|
7
|
-
Scenario: Check
|
|
8
|
-
Given I am on
|
|
9
|
-
When I
|
|
10
|
-
When I press "Click Button"
|
|
6
|
+
Scenario: Check to reload the page
|
|
7
|
+
Given I am on "/test--when--i-reload-page.html"
|
|
8
|
+
When I press "Submit"
|
|
11
9
|
Then I should see "Button Pressed Successfully"
|
|
12
10
|
When I reload the page
|
|
13
11
|
Then I should not see "Button Pressed Successfully"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Feature: An example to select option from drop down list
|
|
2
|
+
|
|
3
|
+
As a tester
|
|
4
|
+
I want to be able to test select option from drop down list
|
|
5
|
+
|
|
6
|
+
Scenario: Check of selecting option from drop down list
|
|
7
|
+
Given I am on "/test--when--i-select-option-from-dropdownlist.html"
|
|
8
|
+
When I select "saab" from "cars"
|
|
9
|
+
When I press "Check select"
|
|
10
|
+
Then I should see "Option ( Saab ) has been selected successfully"
|
|
11
|
+
|
|
12
|
+
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
Feature:
|
|
1
|
+
Feature: An example to uncheck the checkbox
|
|
2
2
|
|
|
3
3
|
As a tester
|
|
4
|
-
I want to be able to
|
|
4
|
+
I want to be able to uncheck a checkbox
|
|
5
5
|
|
|
6
|
-
Scenario:
|
|
7
|
-
Given I am on "test--when--i-check-uncheck-checkbox.html"
|
|
6
|
+
Scenario: Uncheck the checkbox
|
|
7
|
+
Given I am on "/test--when--i-check-uncheck-checkbox.html"
|
|
8
8
|
When I check "I have a bike"
|
|
9
|
-
And I
|
|
10
|
-
Then I should see "You have a Bike"
|
|
11
|
-
When I check "vehicle2"
|
|
9
|
+
And I check "vehicle2"
|
|
12
10
|
And I press "Submit"
|
|
13
11
|
Then I should see "You have a Bike Car"
|
|
14
12
|
When I uncheck "Bike"
|
|
@@ -4,12 +4,12 @@ Feature: Example test for Wait a Specific/Max number of seconds/minutes for page
|
|
|
4
4
|
|
|
5
5
|
Scenario: Check page content to load
|
|
6
6
|
Given I am on the homepage
|
|
7
|
-
When I go to "test--when-i-wait-specific-time.html"
|
|
7
|
+
When I go to "/test--when-i-wait-specific-time.html"
|
|
8
8
|
And I wait 6 seconds
|
|
9
9
|
Then I should see "Welcome with waiting full time"
|
|
10
10
|
|
|
11
11
|
Scenario: Check page content to load
|
|
12
12
|
Given I am on the homepage
|
|
13
|
-
When I go to "test--when-i-wait-max-of-time.html"
|
|
13
|
+
When I go to "/test--when-i-wait-max-of-time.html"
|
|
14
14
|
And I wait max of 6 seconds
|
|
15
15
|
Then I should see "Welcome with waiting until page load"
|