Skip to content

Commit

Permalink
New nightwatch-cucumber version removed config options for cucumberAr…
Browse files Browse the repository at this point in the history
…gs . Change config for this requirement and also update package
  • Loading branch information
christine.zierold committed Mar 16, 2017
1 parent 138701e commit f922bc9
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 44 deletions.
83 changes: 47 additions & 36 deletions nightwatch.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,30 @@ const seleniumServer = require('selenium-server');
const chromedriver = require('chromedriver');
const phantomjs = require('phantomjs-prebuilt');
const dockerSeleniumHub = 'seleniumhub';
const argv = require('yargs').argv;


if (argv.cucumber) {
require('nightwatch-cucumber')({
cucumberArgs: ['--require', 'timeout.js', '--require', 'features/step_definitions', '--format', 'pretty', '--format', 'json:features/reports/cucumber.json', 'features']
});
}
module.exports = {
selenium : {
start_process : true,
server_path : seleniumServer.path,
log_path : '' ,
host : '127.0.0.1',
port : 4444,
selenium_host : '127.0.0.1',
selenium_port : 4444,
cli_args : {
'webdriver.chrome.driver' : chromedriver.path,
'webdriver.ie.driver' :'' ,
'webdriver.firefox.profile':''
}
},

test_settings : {
default : {
launch_url : 'http://localhost',
selenium_host : '127.0.0.1',
selenium_port : 4444,
silent : true,
disable_colors: false,
screenshots: {
Expand All @@ -31,44 +35,51 @@ module.exports = {
path: 'screenshoots/' // relativ to src directory
},
desiredCapabilities : {
browserName : 'firefox',
browserName : 'chrome',
javascriptEnabled : true,
acceptSslCerts : true,
'phantomjs.binary.path': phantomjs.path
},
},
chrome: {
desiredCapabilities: {
browserName: 'chrome',
javascriptEnabled: true,
acceptSslCerts: true
}
},

chrome: {
desiredCapabilities: {
browserName: 'chrome',
javascriptEnabled: true,
acceptSslCerts: true
}
},

firefox: {
desiredCapabilities: {
browserName: 'firefox',
javascriptEnabled: true,
acceptSslCerts: true
}
},
phantomjs: {
desiredCapabilities: {
browserName: 'phantomjs',
javascriptEnabled: true,
acceptSslCerts: true,
'phantomjs.binary.path': phantomjs.path
}
},
local_docker:{
selenium_host: dockerSeleniumHub,
selenium_port: 4444,
start_process : false,
desiredCapabilities: {
browserName: 'firefox'
firefox: {
desiredCapabilities: {
browserName: 'firefox',
javascriptEnabled: true,
acceptSslCerts: true
}
},
phantomjs: {
desiredCapabilities: {
browserName: 'phantomjs',
javascriptEnabled: true,
acceptSslCerts: true,
'phantomjs.binary.path': phantomjs.path
}
},
local_docker:{
selenium_host: dockerSeleniumHub,
selenium_port: 4444,
start_process : false,
desiredCapabilities: {
browserName: 'firefox'
}
},
mocha: {
test_runner: {
type: 'mocha',
options: {
ui: 'bdd',
reporter: 'list'
}
}

}
}
};
Expand Down
18 changes: 10 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
{
"name": "nightwatch-Boilerplate",
"description": "nightwatch boilerplate with selenium testing",
"version": "0.1.0",
"description": "nightwatch boilerplate for End-to-End test with either nightwatch plain oder nightwatch-cucumber",
"version": "1.0.0",
"license": "MIT",
"author": {
"name": "Christine Zierold"
},
"repository": {
"repository": {
"type": "git",
"url": "[email protected]/christinezierold27/nightwatch-boilerplate.git"
},
"scripts": {
"start": "cd tests/ && nightwatch ./src && cd ../",
"start:cucumber": "cd features/ && nightwatch --group group && cd ../",
"start:cucumber": "nightwatch --cucumber",
"lint": "eslint ./tests --max-warnings 0"
},
"dependencies": {
Expand All @@ -21,14 +22,15 @@
"nightwatch": "^0.9.5",
"nightwatch-html-reporter": "^1.0.6",
"phantomjs-prebuilt": "^2.1.7",
"selenium-server": "^2.53.1"
"selenium-server": "^3.3.1",
"yargs": "^7.0.2"
},
"devDependencies": {
"chai": "^3.5.0",
"cucumber": "^1.2.0",
"cucumber": "^2.0.0-rc.8",
"eslint": "^3.13.1",
"mocha": "^2.5.3",
"nightwatch-cucumber": "^4.0.0"
"mocha": "^3.2.0",
"nightwatch-cucumber": "^7.0.0"
},
"bin": {
"nightwatch": "./node_modules/nightwatch/bin/nightwatch"
Expand Down

0 comments on commit f922bc9

Please sign in to comment.