nicholaswmin / nightwatch-js-disabled

A sample Nightwatch JS test harness for running UI tests with JS disabled (for a StackOverflow answer).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Run NightwatchJS tests with javascript disabled

Sample project for this S.O answer.

Install

Clone/Install

$ git clone https://github.com/nicholaswmin/nightwatch-js-disabled
$ cd nightwatch-js-disabled
$ npm install

Install NightwatchJS

$ npm install -g nightwatch

Run selenium server

$ java -jar selenium/selenium-server-standalone-3.9.1.jar

Run the tests

$ nightwatch test.js

The above will run the test file, test.js which basically visits https://stackoverflow.com with JS disabled and verifies that it shows the "JavaScript Disabled" warning.

The configuration that hints to WebDriver that it should start Chromium with JS disabled is in nightwatch.json in the root directory.

The tests only run on Chrome, but you can add other browsers/configuration if you want to by visiting NightwatchJS Getting Started.

License

MIT

About

A sample Nightwatch JS test harness for running UI tests with JS disabled (for a StackOverflow answer).

License:MIT License


Languages

Language:JavaScript 100.0%