There was an issue in tests where events fired in Hds::FlyOut and Hds::Modal were not being dispatched. These close events were depended on by test waiters to know when the element was removed. In recent versions of chrome, when ran headless and on macos, these events were not firing. This meant the tests waited indefinitely on developers local machines, until the tests timed out. This issue was seen across multiple macbooks and even on the hds repo. This issue was *only* experienced in headless chrome on recent macos. It was **not** happening in: * macos chrome headed locally * linux chrome headless in CI This made the issue only impact people running tests locally, getting obscure timeouts. This issue is fixed by the addition of this flag: --disable-backgrounding-occluded-windows The other flags added in this commit are not required for the fix but should help keep a browser "active", which was loosely what researching this bug hinted at the cause of finding the issue fix.
35 lines
997 B
JavaScript
35 lines
997 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
module.exports = {
|
|
test_page: 'tests/index.html?hidepassed',
|
|
disable_watching: true,
|
|
launch_in_ci: ['Chrome'],
|
|
launch_in_dev: ['Chrome'],
|
|
browser_start_timeout: 120,
|
|
browser_args: {
|
|
Chrome: {
|
|
ci: [
|
|
// --no-sandbox is needed when running Chrome inside a container
|
|
process.env.CI ? '--no-sandbox' : null,
|
|
'--headless',
|
|
// Disable backgrounding renders for occluded windows
|
|
'--disable-backgrounding-occluded-windows',
|
|
// Disable renderer process backgrounding
|
|
'--disable-renderer-backgrounding',
|
|
// Disable task throttling of timer tasks from background pages
|
|
'--disable-background-timer-throttling',
|
|
'--disable-dev-shm-usage',
|
|
'--disable-software-rasterizer',
|
|
'--mute-audio',
|
|
'--remote-debugging-port=0',
|
|
'--window-size=1440,900',
|
|
].filter(Boolean),
|
|
},
|
|
},
|
|
};
|