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:
Christopher Allen
2022-12-14 23:48:12 +00:00
committed by GitHub
parent fccf8e436e
commit 3be3d4a6ff
5 changed files with 21 additions and 22 deletions

View File

@@ -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';