mirror of
https://github.com/google/blockly.git
synced 2026-01-04 23:50:12 +01:00
chore: miscellaneous fixes to docs, style, and tests (#6705)
* docs(icon): Better description for Icon.prototype.setVisible Also tweak description of getBlock. * docs(blocks): Fix typo in description of BlockDefinition * chore(tests): Factor out common goog:chromeOptions * chore(build): Minor style fixes
This commit is contained in:
committed by
GitHub
parent
fccf8e436e
commit
3be3d4a6ff
@@ -21,27 +21,25 @@ async function runMochaTestsInBrowser() {
|
||||
const options = {
|
||||
capabilities: {
|
||||
browserName: 'chrome',
|
||||
'goog:chromeOptions': {
|
||||
args: ['--allow-file-access-from-files'],
|
||||
},
|
||||
},
|
||||
services: [
|
||||
['selenium-standalone'],
|
||||
],
|
||||
logLevel: 'warn',
|
||||
};
|
||||
|
||||
// Run in headless mode on Github Actions.
|
||||
if (process.env.CI) {
|
||||
options.capabilities['goog:chromeOptions'] = {
|
||||
args: [
|
||||
'--headless', '--no-sandbox', '--disable-dev-shm-usage',
|
||||
'--allow-file-access-from-files',
|
||||
],
|
||||
};
|
||||
options.capabilities['goog:chromeOptions'].args.push(
|
||||
'--headless', '--no-sandbox', '--disable-dev-shm-usage',);
|
||||
} else {
|
||||
// --disable-gpu is needed to prevent Chrome from hanging on Linux with
|
||||
// NVIDIA drivers older than v295.20. See
|
||||
// https://github.com/google/blockly/issues/5345 for details.
|
||||
options.capabilities['goog:chromeOptions'] = {
|
||||
args: ['--allow-file-access-from-files', '--disable-gpu'],
|
||||
};
|
||||
options.capabilities['goog:chromeOptions'].args.push('--disable-gpu');
|
||||
}
|
||||
|
||||
const url = 'file://' + posixPath(__dirname) + '/index.html';
|
||||
|
||||
Reference in New Issue
Block a user