gpalweb/nightwatch.conf.js
lightings c414f150b6 ...
2023-01-16 10:52:07 +08:00

119 lines
3.0 KiB
JavaScript

// Refer to the online docs for more details:
// https://nightwatchjs.org/gettingstarted/configuration/
//
// _ _ _ _ _ _ _
// | \ | |(_) | | | | | | | |
// | \| | _ __ _ | |__ | |_ __ __ __ _ | |_ ___ | |__
// | . ` || | / _` || '_ \ | __|\ \ /\ / / / _` || __| / __|| '_ \
// | |\ || || (_| || | | || |_ \ V V / | (_| || |_ | (__ | | | |
// \_| \_/|_| \__, ||_| |_| \__| \_/\_/ \__,_| \__| \___||_| |_|
// __/ |
// |___/
module.exports = {
// An array of folders (excluding subfolders) where your tests are located;
// if this is not specified, the test source must be passed as the second argument to the test runner.
src_folders: ['test','nightwatch/examples'],
// See https://nightwatchjs.org/guide/concepts/page-object-model.html
page_objects_path: ['nightwatch/page-objects'],
// See https://nightwatchjs.org/guide/extending-nightwatch/adding-custom-commands.html
custom_commands_path: ['nightwatch/custom-commands'],
// See https://nightwatchjs.org/guide/extending-nightwatch/adding-custom-assertions.html
custom_assertions_path: ['nightwatch/custom-assertions'],
// See https://nightwatchjs.org/guide/extending-nightwatch/adding-plugins.html
plugins: ['@nightwatch/vue'],
// See https://nightwatchjs.org/guide/concepts/test-globals.html
globals_path: '',
vite_dev_server: {
start_vite: true,
port: 5173
},
webdriver: {},
test_workers: {
enabled: true
},
test_settings: {
default: {
disable_error_log: false,
launch_url: 'http://localhost:5173',
screenshots: {
enabled: false,
path: 'screens',
on_failure: true
},
desiredCapabilities: {
browserName: 'chrome'
},
webdriver: {
start_process: true,
server_path: ''
},
},
firefox: {
desiredCapabilities: {
browserName: 'firefox',
alwaysMatch: {
acceptInsecureCerts: true,
'moz:firefoxOptions': {
args: [
// '-headless',
// '-verbose'
]
}
}
},
webdriver: {
start_process: true,
server_path: '',
cli_args: [
// very verbose geckodriver logs
// '-vv'
]
}
},
chrome: {
desiredCapabilities: {
browserName: 'chrome',
'goog:chromeOptions': {
// More info on Chromedriver: https://sites.google.com/a/chromium.org/chromedriver/
//
// w3c:false tells Chromedriver to run using the legacy JSONWire protocol (not required in Chrome 78)
w3c: true,
args: [
//'--no-sandbox',
//'--ignore-certificate-errors',
//'--allow-insecure-localhost',
//'--headless'
]
}
},
webdriver: {
start_process: true,
server_path: '',
cli_args: [
// --verbose
]
}
},
},
};