mirror of
https://github.com/google/blockly.git
synced 2026-01-07 17:10:11 +01:00
Use selenium-standalone-service to automatically start and stop Selenium when running the test suite.
This commit is contained in:
@@ -40,14 +40,18 @@ async function runLangGeneratorInBrowser(browser, filename, codegenFn) {
|
||||
async function runGeneratorsInBrowser() {
|
||||
var options = {
|
||||
capabilities: {
|
||||
browserName: 'firefox'
|
||||
browserName: 'chrome',
|
||||
},
|
||||
path: '/wd/hub'
|
||||
services: ['selenium-standalone']
|
||||
};
|
||||
// Run in headless mode on Github Actions.
|
||||
if (process.env.CI) {
|
||||
options.capabilities['moz:firefoxOptions'] = {
|
||||
args: ['-headless']
|
||||
options.capabilities['goog:chromeOptions'] = {
|
||||
args: ['--headless', '--no-sandbox', '--disable-dev-shm-usage', '--allow-file-access-from-files']
|
||||
};
|
||||
} else {
|
||||
options.capabilities['goog:chromeOptions'] = {
|
||||
args: ['--allow-file-access-from-files']
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user