Skip to content

Commit

Permalink
Added --debug cli flag and default http retries for connection errors
Browse files Browse the repository at this point in the history
  • Loading branch information
beatfactor committed Jan 23, 2022
1 parent fdfc2e6 commit 7e51dc5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
7 changes: 6 additions & 1 deletion lib/runner/cli/argv-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,12 @@ module.exports = new (function () {

// $ nightwatch --devtools
this.option('devtools', {
description: 'Automatically open devtools when launching the browser (Chrome or Edge)'
description: 'Automatically open devtools when launching the browser (Chrome or Edge).'
});

// $ nightwatch --debug
this.option('debug', {
description: 'When --devtools is on, this flag can be used to automatically pause the test execution.'
});

// $ nightwatch --verbose
Expand Down
6 changes: 3 additions & 3 deletions lib/settings/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ module.exports = {
// leave empty to use the test suite name when writing the webdriver server logs
log_file_name: '',


// Time to wait (in ms) before starting to check the Webdriver server is up and running
check_process_delay: 100,

Expand All @@ -193,13 +192,14 @@ module.exports = {

// The entire time (in ms) to wait for the Node.js process to be created and running (default is 2 min), including spawning the child process and checking the status
process_create_timeout: 120000,

host: undefined,
port: undefined,
ssl: undefined,
proxy: undefined,
timeout_options: {
timeout: undefined,
retry_attempts: undefined
timeout: 90000,
retry_attempts: 2
},
default_path_prefix: undefined,
username: undefined,
Expand Down
6 changes: 5 additions & 1 deletion test/src/cli/testCliRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,13 @@ describe('Test CLI Runner', function() {
tag: 'danger',
filter: 'test-filename-filter',
skipgroup: 'test-skip-group',
timeout: 11
timeout: 11,
devtools: true,
debug: true
}).setup();

assert.strictEqual(runner.argv.devtools, true);
assert.strictEqual(runner.argv.debug, true);
assert.strictEqual(runner.test_settings.silent, false);
assert.strictEqual(runner.test_settings.tag_filter, 'danger');
assert.strictEqual(runner.test_settings.skiptags, 'home,arctic');
Expand Down

0 comments on commit 7e51dc5

Please sign in to comment.