-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Tests after webpack 5 migration
Adjusting tests to new webpack and update test dependencies
- Loading branch information
1 parent
47185f8
commit 9865f2c
Showing
39 changed files
with
2,307 additions
and
1,866 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ | |
/dist/ | ||
/*.js | ||
/test/unit/coverage/ | ||
/test/integration/mockups | ||
/src/ors-js/node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,215 @@ | ||
// Autogenerated by Nightwatch | ||
// Refer to the online docs for more details: https://nightwatchjs.org/gettingstarted/configuration/ | ||
const config = require("./config") | ||
const Services = {}; loadServices(); | ||
|
||
module.exports = { | ||
// An array of folders (excluding sub-folders) 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: ['tests/e2e/specs/directions.spec.js'], | ||
output_folder: 'tests/e2e/reports', | ||
|
||
// See https://nightwatchjs.org/guide/working-with-page-objects/ | ||
page_objects_path: '', | ||
|
||
// See https://nightwatchjs.org/guide/extending-nightwatch/#writing-custom-commands | ||
custom_commands_path: 'tests/e2e/commands', | ||
|
||
// See https://nightwatchjs.org/guide/extending-nightwatch/#writing-custom-assertions | ||
custom_assertions_path: 'tests/e2e/custom-assertions', | ||
|
||
// See https://nightwatchjs.org/guide/#external-globals | ||
globals_path : '', | ||
|
||
webdriver: {}, | ||
|
||
test_settings: { | ||
default: { | ||
disable_error_log: false, | ||
baseUrl: 'http://localhost:' + (process.env.PORT || config.dev.port), | ||
|
||
screenshots: { | ||
enabled: false, | ||
path: 'screens', | ||
on_failure: true | ||
}, | ||
|
||
desiredCapabilities : { | ||
browserName : 'chrome', | ||
'goog:chromeOptions' : { | ||
args: [ | ||
'--no-sandbox', | ||
'--ignore-certificate-errors', | ||
'--allow-insecure-localhost', | ||
'--headless', | ||
'--disable-gpu', | ||
], | ||
prefs:{ | ||
download:{ | ||
prompt_for_download: false, | ||
default_directory:require('path').resolve(__dirname + 'tests/e2e/downloads') | ||
} | ||
} | ||
} | ||
}, | ||
|
||
webdriver: { | ||
start_process: true, | ||
server_path: (Services.chromedriver ? Services.chromedriver.path : '') | ||
} | ||
}, | ||
|
||
// safari: { | ||
// desiredCapabilities : { | ||
// browserName : 'safari', | ||
// alwaysMatch: { | ||
// acceptInsecureCerts: false | ||
// } | ||
// }, | ||
// webdriver: { | ||
// port: 4445, | ||
// start_process: true, | ||
// server_path: '/usr/bin/safaridriver' | ||
// } | ||
// }, | ||
|
||
firefox: { | ||
desiredCapabilities : { | ||
browserName : 'firefox', | ||
alwaysMatch: { | ||
acceptInsecureCerts: true, | ||
'moz:firefoxOptions': { | ||
"args": [ | ||
'-headless', | ||
'-verbose' | ||
], | ||
prefs:{ | ||
download:{ | ||
prompt_for_download: false, | ||
default_directory:require('path').resolve(__dirname + 'tests/e2e/downloads') | ||
} | ||
} | ||
} | ||
} | ||
|
||
}, | ||
webdriver: { | ||
start_process: true, | ||
port: 4444, | ||
server_path: (Services.geckodriver ? Services.geckodriver.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/ | ||
// | ||
// This tells Chromedriver to run using the legacy JSONWire protocol (not required in Chrome 78) | ||
w3c: false, | ||
args: [ | ||
'--no-sandbox', | ||
'--ignore-certificate-errors', | ||
'--allow-insecure-localhost', | ||
'--headless', | ||
// '--disable-gpu', | ||
], | ||
prefs:{ | ||
download:{ | ||
prompt_for_download: false, | ||
default_directory:require('path').resolve(__dirname + 'tests/e2e/downloads') | ||
} | ||
} | ||
} | ||
}, | ||
|
||
webdriver: { | ||
start_process: true, | ||
port: 4445, | ||
server_path: (Services.chromedriver ? Services.chromedriver.path : ''), | ||
cli_args: [ | ||
// --verbose | ||
] | ||
} | ||
}, | ||
|
||
edge: { | ||
desiredCapabilities : { | ||
browserName : 'MicrosoftEdge', | ||
'ms:edgeOptions' : { | ||
w3c: false, | ||
// More info on EdgeDriver: https://docs.microsoft.com/en-us/microsoft-edge/webdriver-chromium/capabilities-edge-options | ||
args: [ | ||
//'--headless' | ||
] | ||
} | ||
}, | ||
|
||
webdriver: { | ||
start_process: true, | ||
// Download msedgedriver from https://docs.microsoft.com/en-us/microsoft-edge/webdriver-chromium/ | ||
// and set the location below: | ||
server_path: '', | ||
cli_args: [ | ||
// --verbose | ||
] | ||
} | ||
}, | ||
// | ||
// ////////////////////////////////////////////////////////////////////////////////// | ||
// // Configuration for when using the Selenium service, either locally or remote, | | ||
// // like Selenium Grid | | ||
// ////////////////////////////////////////////////////////////////////////////////// | ||
// selenium_server: { | ||
// // Selenium Server is running locally and is managed by Nightwatch | ||
// selenium: { | ||
// start_process: true, | ||
// port: 4444, | ||
// server_path: (Services.seleniumServer ? Services.seleniumServer.path : ''), | ||
// cli_args: { | ||
// 'webdriver.gecko.driver': (Services.geckodriver ? Services.geckodriver.path : ''), | ||
// 'webdriver.chrome.driver': (Services.chromedriver ? Services.chromedriver.path : '') | ||
// } | ||
// } | ||
// }, | ||
// | ||
// 'selenium.chrome': { | ||
// extends: 'selenium_server', | ||
// desiredCapabilities: { | ||
// browserName: 'chrome', | ||
// chromeOptions : { | ||
// w3c: false | ||
// } | ||
// } | ||
// }, | ||
// | ||
// 'selenium.firefox': { | ||
// extends: 'selenium_server', | ||
// desiredCapabilities: { | ||
// browserName: 'firefox', | ||
// 'moz:firefoxOptions': { | ||
// args: [ | ||
// // '-headless', | ||
// // '-verbose' | ||
// ] | ||
// } | ||
// } | ||
// } | ||
} | ||
}; | ||
|
||
function loadServices() { | ||
|
||
try { | ||
Services.chromedriver = require('chromedriver'); | ||
} catch (err) {} | ||
|
||
try { | ||
Services.geckodriver = require('geckodriver'); | ||
} catch (err) {} | ||
} |
Oops, something went wrong.