diff --git a/test/functional/apps/dashboard/index.js b/test/functional/apps/dashboard/index.js index 8fa65369b021f..6927aea6adf74 100644 --- a/test/functional/apps/dashboard/index.js +++ b/test/functional/apps/dashboard/index.js @@ -54,7 +54,7 @@ export default function ({ getService, loadTestFile, getPageObjects }) { loadTestFile(require.resolve('./_dashboard_filter_bar')); // TODO: unskip when https://github.com/elastic/kibana/issues/20442 is fixed - //loadTestFile(require.resolve('./_dashboard_filtering')); + // loadTestFile(require.resolve('./_dashboard_filtering')); loadTestFile(require.resolve('./_panel_expand_toggle')); loadTestFile(require.resolve('./_dashboard_grid')); diff --git a/test/functional/services/failure_debugging.js b/test/functional/services/failure_debugging.js index 7bcac6e2ac1c5..2e55e050eb88c 100644 --- a/test/functional/services/failure_debugging.js +++ b/test/functional/services/failure_debugging.js @@ -48,6 +48,12 @@ export async function FailureDebuggingProvider({ getService }) { await writeFileAsync(htmlOutputFileName, pageSource); } + async function logBrowserConsole() { + const browserLogs = await remote.getLogsFor('browser'); + const browserOutput = browserLogs.reduce((acc, log) => acc += `${log.message.replace(/\\n/g, '\n')}\n`, ''); + log.info(`Browser output is: ${browserOutput}`); + } + async function onFailure(error, test) { // Replace characters in test names which can't be used in filenames, like * const name = test.fullTitle().replace(/([^ a-zA-Z0-9-]+)/g, '_'); @@ -55,11 +61,16 @@ export async function FailureDebuggingProvider({ getService }) { await Promise.all([ screenshots.takeForFailure(name), logCurrentUrl(), - savePageHtml(name) + savePageHtml(name), + logBrowserConsole(), ]); } lifecycle .on('testFailure', onFailure) .on('testHookFailure', onFailure); + + return { + logBrowserConsole + }; }