From 5f6dfb63284ca9298696d29a528fc8ed8b4f71f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20St=C3=BCrmer?= Date: Wed, 13 Dec 2023 13:28:35 +0100 Subject: [PATCH] [Logs Explorer] Fix discover tab time range test (#173198) --- .../observability_log_explorer/header_menu.ts | 30 +++++++++++++++---- .../observability_log_explorer/index.ts | 1 - 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/header_menu.ts b/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/header_menu.ts index 41a75282e22e9..4a71ac1fcb9bf 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/header_menu.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/header_menu.ts @@ -22,9 +22,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { 'svlCommonNavigation', ]); - // Failing: See https://github.com/elastic/kibana/issues/173165 - // Failing: See https://github.com/elastic/kibana/issues/173165 - describe.skip('Header menu', () => { + describe('Header menu', () => { before(async () => { await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover'); await esArchiver.load( @@ -52,7 +50,18 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('Discover fallback link', () => { before(async () => { - await PageObjects.observabilityLogExplorer.navigateTo(); + await PageObjects.observabilityLogExplorer.navigateTo({ + pageState: { + // avoid aligning with the test data, because that's what Discover + // does later in this test and we wouldn't be able to check the time + // range state transfer + time: { + from: '2023-08-03T00:00:00.000Z', + to: '2023-08-03T12:00:00.000Z', + mode: 'absolute', + }, + }, + }); await PageObjects.header.waitUntilLoadingHasFinished(); }); @@ -97,7 +106,18 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('Discover tabs', () => { before(async () => { - await PageObjects.observabilityLogExplorer.navigateTo(); + await PageObjects.observabilityLogExplorer.navigateTo({ + pageState: { + // avoid aligning with the test data, because that's what Discover + // does later in this test and we wouldn't be able to check the time + // range state transfer + time: { + from: '2023-08-03T00:00:00.000Z', + to: '2023-08-03T12:00:00.000Z', + mode: 'absolute', + }, + }, + }); await PageObjects.header.waitUntilLoadingHasFinished(); }); diff --git a/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/index.ts b/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/index.ts index 9f3d9b7e39c86..ad6f7b7278e48 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/index.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/index.ts @@ -16,7 +16,6 @@ export default function ({ loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./filter_controls')); loadTestFile(require.resolve('./flyout')); loadTestFile(require.resolve('./header_menu')); - loadTestFile(require.resolve('./header_menu')); loadTestFile(require.resolve('./flyout_highlights.ts')); }); }