[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) { function isDebuggableBrowser(browserName, config) {
if ([ if (isDebuggableBrowserName(browserName)) {
'ChromeHeadless',
'ChromeCanaryHeadless',
'ChromiumHeadless'
].includes(browserName)) {
return true return true
} }
@@ -43,6 +39,10 @@ function isDebuggableBrowser(browserName, config) {
return false; return false;
} }
if (isDebuggableBrowserName(customLauncher.base)) {
return true
}
const flags = customLauncher.flags; const flags = customLauncher.flags;
if (!Array.isArray(flags)) { if (!Array.isArray(flags)) {
return false; return false;
@@ -63,6 +63,14 @@ function isDebuggableBrowser(browserName, config) {
return true; return true;
} }
function isDebuggableBrowserName(browserName) {
return [
'ChromeHeadless',
'ChromeCanaryHeadless',
'ChromiumHeadless'
].includes(browserName);
}
export function fixMochaTimeout(config) { export function fixMochaTimeout(config) {
let client = config.client; let client = config.client;
if (typeof client === 'undefined') { if (typeof client === 'undefined') {