webship-js 1.0.23 → 1.0.24
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/.github/workflows/github-actions.yml +25 -9
- package/README.md +4 -7
- package/assets/config_templates/circleci-linux-chrome.conf.js +8 -3
- package/bitbucket-pipelines.yml +1 -1
- package/examples/test--then--i-should--see-text-in-element.html +48 -0
- package/examples/test--when--i-check-uncheck-checkbox.html +5 -3
- package/lib/custom-assertions/checkboxChecked.js +33 -0
- package/lib/custom-assertions/elementContainsCss.js +32 -0
- package/lib/custom-assertions/elementContainsText.js +32 -0
- package/lib/custom-assertions/responseStatus.js +1 -1
- package/lib/custom-assertions/shouldVisible.js +1 -1
- package/lib/custom-assertions/textMatching.js +32 -0
- package/lib/custom-commands/checkItem.js +21 -16
- package/lib/custom-commands/uncheckItem.js +21 -16
- package/nightwatch.conf.js +5 -1
- package/package.json +14 -14
- package/tests/features/test--then--i-should--not--see-text-in-element.feature +8 -8
- package/tests/features/test--then--i-should--see-text-matching-pattern-in-element.feature +0 -5
- package/tests/features/test--then--the-checkbox-is-checked.feature +9 -9
- package/tests/features/test--then--the-checkbox-should-be-checked.feature +3 -3
- 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 +4 -4
- package/tests/features/test--then--the-response-status-code-should-be.feature +4 -4
- package/tests/features/test--when--i-attach-file-to-feild.feature +5 -5
- package/tests/features/test--when--i-check-checkbox.feature +13 -9
- package/tests/features/test--when--i-click-link.feature +2 -2
- package/tests/features/test--when--i-fill-in.feature +8 -8
- package/tests/features/test--when--i-go-to-homepage.feature +10 -0
- package/tests/features/test--when--i-move-forward-backward-one-page.feature +2 -2
- package/tests/features/test--when--i-select-option-from-dropdownlist.feature +1 -1
- package/tests/step-definitions/webship.js +381 -102
- package/lib/custom-assertions/backToHomepage.js +0 -15
- package/tests/features/test--when--i-uncheck-checkbox.feature +0 -18
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
module.exports.assertion = function (negativeCase) {
|
|
3
|
-
|
|
4
|
-
browser.getCurrentUrl(function(result) {
|
|
5
|
-
var homepageUrl = browser.launch_url;
|
|
6
|
-
if(endsWith(result.value, "/")){
|
|
7
|
-
homepageUrl += "/";
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
if (negativeCase) {
|
|
11
|
-
return browser.assert.not.urlEquals(homepageUrl).end();
|
|
12
|
-
}
|
|
13
|
-
return browser.assert.urlEquals(homepageUrl).end();
|
|
14
|
-
});
|
|
15
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
Feature: An example to uncheck the checkbox
|
|
2
|
-
|
|
3
|
-
As a tester
|
|
4
|
-
I want to be able to uncheck a checkbox
|
|
5
|
-
|
|
6
|
-
Scenario: Uncheck the checkbox
|
|
7
|
-
Given I am on "/test--when--i-check-uncheck-checkbox.html"
|
|
8
|
-
When I check "I have a bike"
|
|
9
|
-
And I check "vehicle2"
|
|
10
|
-
And I press "Submit"
|
|
11
|
-
Then I should see "You have a Bike Car"
|
|
12
|
-
When I uncheck "Bike"
|
|
13
|
-
And I press "Submit"
|
|
14
|
-
Then I should see "You have a Car"
|
|
15
|
-
When I uncheck "Car"
|
|
16
|
-
And I press "Submit"
|
|
17
|
-
Then I should see "You have a"
|
|
18
|
-
|