[Gradle, JS] Consider custom launcher's base

^KT-41475 fixed
This commit is contained in:
Ilya Goncharov
2020-09-01 15:19:29 +03:00
parent 02b72e16ef
commit b9bc11d5e0
@@ -25,11 +25,7 @@ export function configureBrowsers(config) {
}
function isDebuggableBrowser(browserName, config) {
if ([
'ChromeHeadless',
'ChromeCanaryHeadless',
'ChromiumHeadless'
].includes(browserName)) {
if (isDebuggableBrowserName(browserName)) {
return true
}
@@ -43,6 +39,10 @@ function isDebuggableBrowser(browserName, config) {
return false;
}
if (isDebuggableBrowserName(customLauncher.base)) {
return true
}
const flags = customLauncher.flags;
if (!Array.isArray(flags)) {
return false;
@@ -63,6 +63,14 @@ function isDebuggableBrowser(browserName, config) {
return true;
}
function isDebuggableBrowserName(browserName) {
return [
'ChromeHeadless',
'ChromeCanaryHeadless',
'ChromiumHeadless'
].includes(browserName);
}
export function fixMochaTimeout(config) {
let client = config.client;
if (typeof client === 'undefined') {