Package Exports
- cucumber-nightwatch
Readme
cucumber-nightwatch 🥒 + 🦉
A small library to enable us to use nightwatch.js in cucumber.js
Installation
npm install @cucumber/cucumber nightwatch cucumber-nightwatchCucumber configuration
const{
Before,
After,
setWorldConstructor,
} = require('@cucumber/cucumber')
const { NightwatchWorld } = require('cucumber-nightwatch')
setWorldConstructor(NightwatchWorld)
// Launch the browser session
Before(async function () {
await this.initNightwatch()
})
// Close the browser session
After(async function () {
await this.endNightwatch()
})Nightwatch configuration
# Nightwatch variables
NIGHTWATCH_BROWSER=chrome
NIGHTWATCH_HEADLESS=true
NIGHTWATCH_CONFIG=./custom_dir/nightwatch.conf.js
NIGHTWATCH_SILENT=false
NIGHTWATCH_OUTPUT=trueVerbose Cucumber Nightwatch log
CN_DEBUG=true