webship-js 1.0.9 → 1.0.10
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 +95 -0
- package/.eslintignore +3 -0
- package/.eslintrc.json +34 -0
- package/.github/workflows/github-actions.yml +28 -0
- package/.gitlab-ci.yml +51 -0
- package/.travis-ci.yml +27 -0
- package/bitbucket-pipelines.yml +34 -0
- package/nightwatch.conf.js +335 -0
- package/package.json +2 -5
- package/{bin/steplist.js → steplist.js} +4 -4
- package/tests/features/check-webshipco-site.feature +8 -0
- package/tests/reports/cucumber-report.html +48 -0
- package/tests/reports/cucumber-report.json +66 -0
- package/tests/step-definitions/webship.js +28 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"description": "As a tester\nI want to be able to test the webship.co site\nSo that I know it is working",
|
|
4
|
+
"elements": [
|
|
5
|
+
{
|
|
6
|
+
"description": "",
|
|
7
|
+
"id": "example-test-for-webship-js;check-the-webship.co-site",
|
|
8
|
+
"keyword": "Scenario",
|
|
9
|
+
"line": 6,
|
|
10
|
+
"name": "Check the webship.co site",
|
|
11
|
+
"steps": [
|
|
12
|
+
{
|
|
13
|
+
"keyword": "Before",
|
|
14
|
+
"hidden": true,
|
|
15
|
+
"result": {
|
|
16
|
+
"status": "passed",
|
|
17
|
+
"duration": 3380158803
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"arguments": [],
|
|
22
|
+
"keyword": "Given ",
|
|
23
|
+
"line": 7,
|
|
24
|
+
"name": "I go to \"https://webship.co\"",
|
|
25
|
+
"match": {
|
|
26
|
+
"location": "tests/step-definitions/webship.js:5"
|
|
27
|
+
},
|
|
28
|
+
"result": {
|
|
29
|
+
"status": "passed",
|
|
30
|
+
"duration": 716341770
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"arguments": [],
|
|
35
|
+
"keyword": "Then ",
|
|
36
|
+
"line": 8,
|
|
37
|
+
"name": "I should see \"Webship.co\"",
|
|
38
|
+
"match": {
|
|
39
|
+
"location": "tests/step-definitions/webship.js:9"
|
|
40
|
+
},
|
|
41
|
+
"result": {
|
|
42
|
+
"status": "passed",
|
|
43
|
+
"duration": 109572978
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"keyword": "After",
|
|
48
|
+
"hidden": true,
|
|
49
|
+
"result": {
|
|
50
|
+
"status": "passed",
|
|
51
|
+
"duration": 164629689
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"tags": [],
|
|
56
|
+
"type": "scenario"
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"id": "example-test-for-webship-js",
|
|
60
|
+
"line": 1,
|
|
61
|
+
"keyword": "Feature",
|
|
62
|
+
"name": "Example test for webship-js",
|
|
63
|
+
"tags": [],
|
|
64
|
+
"uri": "tests/features/check-webshipco-site.feature"
|
|
65
|
+
}
|
|
66
|
+
]
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const { Given } = require('@cucumber/cucumber');
|
|
2
|
+
const { When, Before } = require('@cucumber/cucumber');
|
|
3
|
+
const { Then } = require('@cucumber/cucumber');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Navigate to a url.
|
|
7
|
+
*
|
|
8
|
+
* Exmaple:
|
|
9
|
+
* - Given I go to "https://webship.co"
|
|
10
|
+
*/
|
|
11
|
+
Given(/^I go to "([^"]*)?"$/, function(url) {
|
|
12
|
+
return browser.url(url);
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Asserting a text in the page.
|
|
17
|
+
*
|
|
18
|
+
* Exmaple:
|
|
19
|
+
* - Then I should see "Welcome"
|
|
20
|
+
* - Then I should not see "Access denied"
|
|
21
|
+
*/
|
|
22
|
+
Then(/^I should( not)* see "([^"]*)?"$/, function(negativeCase, expectedText) {
|
|
23
|
+
if (negativeCase) {
|
|
24
|
+
return browser.assert.not.textContains('body', expectedText);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return browser.assert.textContains('body', expectedText);
|
|
28
|
+
});
|