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

Commit

Permalink
Merge pull request #66 from mobify/release-2.0.0
Browse files Browse the repository at this point in the history
Release 2.0.0
  • Loading branch information
ellenmobify authored Oct 24, 2016
2 parents 3f7b7c6 + 8783752 commit ae49d2a
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 181 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2.0.0
- Use [selenium-download](https://github.com/groupon/selenium-download) to manage downloading of Selenium server and Chromedriver.
- BREAKING CHANGES
- This requires node 4+ and Chrome 54 or higher.
1.7.0
- Introduces 'waitForContextsReady' command.
1.6.3
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ A set of Mobify specific custom commands for Nightwatch.js
To begin, clone this repository. `cd` into your chosen folder, and run the following:
`npm install`

Selenium server and Chromedriver will also be downloaded into `/selenium`.

### Linting
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.

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

```
this.demoTest = function (browser) {
browser.trigger('.myLink', click);
browser.trigger('.myLink', 'click');
};
```

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

```
this.demoTest = function (browser) {
browser.triggerTouch('.myLink', click);
browser.triggerTouch('.myLink', 'click');
};
```

Expand Down
4 changes: 4 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
machine:
node:
version: 4.4.3

dependencies:
override:
- npm install
Expand Down
24 changes: 11 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nightwatch-commands",
"version": "1.7.0",
"version": "2.0.0",
"description": "A set of Mobify specific custom commands for Nightwatch.js",
"repository": {
"type": "git",
Expand All @@ -11,24 +11,22 @@
"url": "https://github.com/mobify/nightwatch-commands/issues"
},
"devDependencies": {
"nightwatch": "0.9.1",
"nodeunit": "~0.8.4",
"nightwatch": "0.9.8",
"nodeunit": "0.8.4",
"grunt": "0.4.5",
"grunt-cli": "~0.1.13",
"grunt-eslint": "^17.0.0",
"mobify-code-style": "^2.3.6"
"grunt-cli": "0.1.13",
"grunt-eslint": "17.0.0",
"mobify-code-style": "2.6.0"
},
"scripts": {
"install": "node selenium/installation/install.js",
"install": "node selenium/install.js",
"test": "./node_modules/.bin/grunt lint; ./node_modules/.bin/grunt test"
},
"homepage": "https://github.com/mobify/nightwatch-commands",
"dependencies": {
"mkdirp": "^0.5.1",
"async": "^0.2.10",
"chalk": "^0.4.0",
"mkdirp": "^0.5.0",
"unzip": "^0.1.9",
"rimraf": "^2.2.8"
"async": "0.2.10",
"chalk": "0.4.0",
"mkdirp": "0.5.1",
"selenium-download": "2.0.6"
}
}
29 changes: 29 additions & 0 deletions selenium/install.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
const fs = require('fs')
const mkdirp = require('mkdirp')
const path = require('path')
const selenium = require('selenium-download')

// Download Selenium server and Chromedriver
selenium.ensure(__dirname, error => {
if (error) {
console.error(error.stack)
} else {
// Rename so that we don't need to update paths in project configs
const oldSeleniumPath = path.join(__dirname, 'selenium.jar')
const newSeleniumPath = path.join(__dirname, 'selenium-server.jar')

fs.rename(oldSeleniumPath, newSeleniumPath, error => {
if (error) console.log(error)
return
})

mkdirp(path.join(__dirname, 'drivers'))
const oldChromedriverPath = path.join(__dirname, 'chromedriver')
const newChromedriverPath = path.join(__dirname, 'drivers', 'chromedriver')

fs.rename(oldChromedriverPath, newChromedriverPath, error => {
if (error) console.log(error)
return
})
}
})
18 changes: 0 additions & 18 deletions selenium/installation/conf.js

This file was deleted.

148 changes: 0 additions & 148 deletions selenium/installation/install.js

This file was deleted.

0 comments on commit ae49d2a

Please sign in to comment.