webship-js 1.0.0 → 1.0.3

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.
@@ -0,0 +1,28 @@
1
+ name: Webship-js CI
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ build:
7
+
8
+ runs-on: ubuntu-latest
9
+
10
+ env:
11
+ TEST_BASE_URL: https://webship.co
12
+ SELENIUM_HOST: http://selenium:4444/wd/hub
13
+
14
+ services:
15
+ selenium:
16
+ image: selenium/standalone-chrome
17
+ # options: --health-cmd "curl http://selenium:4444" --health-interval=5s
18
+ ports:
19
+ - 4444:4444
20
+
21
+ steps:
22
+ - uses: actions/checkout@v3
23
+ - name: Use Node.js
24
+ uses: actions/setup-node@v3
25
+ with:
26
+ node-version: '16.x'
27
+ - run: yarn install
28
+ - run: yarn test
package/.gitlab-ci.yml ADDED
@@ -0,0 +1,28 @@
1
+ image: node:8.10
2
+ stages:
3
+ - deploy
4
+ - confidence-check
5
+ deploy_terraform:
6
+ stage: deploy
7
+ script:
8
+ # Your Review App deployment scripts - for a working example please check https://gitlab.com/Flockademic/Flockademic/blob/5a45f1c2412e93810fab50e2dab8949e2d0633c7/.gitlab-ci.yml#L315
9
+ - echo
10
+ e2e:firefox:
11
+ stage: confidence-check
12
+ services:
13
+ - selenium/standalone-firefox
14
+ script:
15
+ - npm run confidence-check --host=selenium__standalone-firefox
16
+ e2e:chrome:
17
+ stage: confidence-check
18
+ services:
19
+ - selenium/standalone-chrome
20
+ script:
21
+ - npm run confidence-check --host=selenium__standalone-chrome
22
+
23
+ test:
24
+ stage: test
25
+ dependencies:
26
+ - npm
27
+ script:
28
+ - npm test
package/README.md CHANGED
@@ -1,7 +1,10 @@
1
1
  # Webship JS
2
2
 
3
+ [![Webship-js CI](https://github.com/webship/webship-js/actions/workflows/github-actions.yml/badge.svg?branch=1.0.x)](https://github.com/webship/webship-js/actions)
4
+
5
+
3
6
  Webship JS has a ready step definitions for automated functional testing.
4
7
 
5
8
  ### Using:
6
- Nightwatch.js
7
- Cucumber-js
9
+ * Nightwatch.js
10
+ * Cucumber-js
@@ -39,26 +39,47 @@ module.exports = {
39
39
  },
40
40
 
41
41
  test_settings: {
42
- default: {
43
- disable_error_log: false,
44
- launch_url: 'https://nightwatchjs.org',
45
-
46
- screenshots: {
47
- enabled: false,
48
- path: 'screens',
49
- on_failure: true
50
- },
51
-
52
- desiredCapabilities: {
53
- browserName: 'firefox'
42
+ default: {
43
+ launch_url: "http://webshipjs.test",
44
+ selenium_port: 4444,
45
+ selenium_host: "127.0.0.1",
46
+ silent: true,
47
+ screenshots: {
48
+ enabled: true,
49
+ path: "./reports/screenshots"
50
+ },
51
+
52
+ desiredCapabilities: {
53
+ browserName: 'chrome',
54
+ 'goog:chromeOptions': {
55
+ // More info on Chromedriver: https://sites.google.com/a/chromium.org/chromedriver/
56
+ //
57
+ // w3c:false tells Chromedriver to run using the legacy JSONWire protocol (not required in Chrome 78)
58
+ w3c: false,
59
+ args: [
60
+ '--start-maximized',
61
+ '--disable-gpu',
62
+ '--window-size=1600,1200',
63
+ '--no-sandbox',
64
+ '--disable-dev-shm-usage',
65
+ '--disable-setuid-sandbox',
66
+ '--disable-web-security',
67
+ '--DNS-prefetch-disable',
68
+ '--disable-translate',
69
+ '--ignore-certificate-errors',
70
+ '--test-type',
71
+ '--disable-extensions',
72
+ '--incognito',
73
+ '--disable-infobars',
74
+ '--remote-debugging-port=9222',
75
+ '--allowed-ips=159.89.4.58',
76
+ '--whitelisted-ips=159.89.4.58',
77
+ '--allow-insecure-localhost'
78
+ ]
79
+ }
80
+ }
54
81
  },
55
82
 
56
- webdriver: {
57
- start_process: true,
58
- server_path: ''
59
- }
60
- },
61
-
62
83
  safari: {
63
84
  desiredCapabilities: {
64
85
  browserName: 'safari',
package/package.json CHANGED
@@ -1,29 +1,31 @@
1
1
  {
2
2
  "name": "webship-js",
3
- "version": "1.0.0",
3
+ "version": "1.0.3",
4
4
  "description": "Webship JS automated functional testing.",
5
5
  "main": "index.js",
6
6
  "directories": {
7
7
  "test": "test"
8
8
  },
9
9
  "scripts": {
10
- "test": "nightwatch"
10
+ "test": "nightwatch --format @cucumber/pretty-formatter --format json:./tests/reports/cucumber-report-$( date '+%Y-%m-%d_%H-%M' ).json --format html:./tests/reports/cucumber-report-$( date '+%Y-%m-%d_%H-%M' ).html"
11
11
  },
12
12
  "repository": {
13
13
  "type": "git",
14
14
  "url": "git+https://github.com/webship/webship-js.git"
15
15
  },
16
- "author": "Ravi Sawlani",
16
+ "author": "Webship.org",
17
17
  "license": "MIT",
18
18
  "bugs": {
19
19
  "url": "https://github.com/webship/webship-js/issues"
20
20
  },
21
21
  "homepage": "https://github.com/webship/webship-js",
22
22
  "dependencies": {
23
- "nightwatch": "~2",
24
23
  "@cucumber/cucumber": "*",
25
24
  "chromedriver": "*",
26
- "cucumber-pretty": "*",
27
- "geckodriver": "*"
25
+ "@cucumber/pretty-formatter": "^1.0.0-alpha.2",
26
+ "eslint": "^7.32.0",
27
+ "mocha": "^9.1.3",
28
+ "geckodriver": "*",
29
+ "nightwatch": "^2.1.7"
28
30
  }
29
31
  }