Skip to content
This repository was archived by the owner on Aug 5, 2020. It is now read-only.

Commit ae49d2a

Browse files
authored
Merge pull request #66 from mobify/release-2.0.0
Release 2.0.0
2 parents 3f7b7c6 + 8783752 commit ae49d2a

File tree

7 files changed

+52
-181
lines changed

7 files changed

+52
-181
lines changed

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2.0.0
2+
- Use [selenium-download](https://github.com/groupon/selenium-download) to manage downloading of Selenium server and Chromedriver.
3+
- BREAKING CHANGES
4+
- This requires node 4+ and Chrome 54 or higher.
15
1.7.0
26
- Introduces 'waitForContextsReady' command.
37
1.6.3

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ A set of Mobify specific custom commands for Nightwatch.js
99
To begin, clone this repository. `cd` into your chosen folder, and run the following:
1010
`npm install`
1111

12+
Selenium server and Chromedriver will also be downloaded into `/selenium`.
13+
1214
### Linting
1315
JavaScript in this tool is linted with [ESLint](http://eslint.org/) according to our code [syntax and style standards](https://github.com/mobify/mobify-code-style) here at Mobify.
1416

@@ -257,7 +259,7 @@ callback | Function | _optional_ A function to call after the curren
257259

258260
```
259261
this.demoTest = function (browser) {
260-
browser.trigger('.myLink', click);
262+
browser.trigger('.myLink', 'click');
261263
};
262264
```
263265

@@ -273,7 +275,7 @@ callback | Function | _optional_ A function to call after the curren
273275

274276
```
275277
this.demoTest = function (browser) {
276-
browser.triggerTouch('.myLink', click);
278+
browser.triggerTouch('.myLink', 'click');
277279
};
278280
```
279281

circle.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
machine:
2+
node:
3+
version: 4.4.3
4+
15
dependencies:
26
override:
37
- npm install

package.json

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nightwatch-commands",
3-
"version": "1.7.0",
3+
"version": "2.0.0",
44
"description": "A set of Mobify specific custom commands for Nightwatch.js",
55
"repository": {
66
"type": "git",
@@ -11,24 +11,22 @@
1111
"url": "https://github.com/mobify/nightwatch-commands/issues"
1212
},
1313
"devDependencies": {
14-
"nightwatch": "0.9.1",
15-
"nodeunit": "~0.8.4",
14+
"nightwatch": "0.9.8",
15+
"nodeunit": "0.8.4",
1616
"grunt": "0.4.5",
17-
"grunt-cli": "~0.1.13",
18-
"grunt-eslint": "^17.0.0",
19-
"mobify-code-style": "^2.3.6"
17+
"grunt-cli": "0.1.13",
18+
"grunt-eslint": "17.0.0",
19+
"mobify-code-style": "2.6.0"
2020
},
2121
"scripts": {
22-
"install": "node selenium/installation/install.js",
22+
"install": "node selenium/install.js",
2323
"test": "./node_modules/.bin/grunt lint; ./node_modules/.bin/grunt test"
2424
},
2525
"homepage": "https://github.com/mobify/nightwatch-commands",
2626
"dependencies": {
27-
"mkdirp": "^0.5.1",
28-
"async": "^0.2.10",
29-
"chalk": "^0.4.0",
30-
"mkdirp": "^0.5.0",
31-
"unzip": "^0.1.9",
32-
"rimraf": "^2.2.8"
27+
"async": "0.2.10",
28+
"chalk": "0.4.0",
29+
"mkdirp": "0.5.1",
30+
"selenium-download": "2.0.6"
3331
}
3432
}

selenium/install.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
const fs = require('fs')
2+
const mkdirp = require('mkdirp')
3+
const path = require('path')
4+
const selenium = require('selenium-download')
5+
6+
// Download Selenium server and Chromedriver
7+
selenium.ensure(__dirname, error => {
8+
if (error) {
9+
console.error(error.stack)
10+
} else {
11+
// Rename so that we don't need to update paths in project configs
12+
const oldSeleniumPath = path.join(__dirname, 'selenium.jar')
13+
const newSeleniumPath = path.join(__dirname, 'selenium-server.jar')
14+
15+
fs.rename(oldSeleniumPath, newSeleniumPath, error => {
16+
if (error) console.log(error)
17+
return
18+
})
19+
20+
mkdirp(path.join(__dirname, 'drivers'))
21+
const oldChromedriverPath = path.join(__dirname, 'chromedriver')
22+
const newChromedriverPath = path.join(__dirname, 'drivers', 'chromedriver')
23+
24+
fs.rename(oldChromedriverPath, newChromedriverPath, error => {
25+
if (error) console.log(error)
26+
return
27+
})
28+
}
29+
})

selenium/installation/conf.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

selenium/installation/install.js

Lines changed: 0 additions & 148 deletions
This file was deleted.

0 commit comments

Comments
 (0)