From 77157e0215b9b49b31c79deb1d2388efba41f486 Mon Sep 17 00:00:00 2001 From: Carlos Crespo Date: Thu, 28 Nov 2024 12:24:21 +0100 Subject: [PATCH 1/2] Unskip infra serverless tests --- .../observability/infra/header_menu.ts | 38 ------------------- .../observability/infra/hosts_page.ts | 32 +++++----------- .../test_suites/observability/infra/index.ts | 1 - .../observability/infra/node_details.ts | 10 ++--- 4 files changed, 13 insertions(+), 68 deletions(-) delete mode 100644 x-pack/test_serverless/functional/test_suites/observability/infra/header_menu.ts diff --git a/x-pack/test_serverless/functional/test_suites/observability/infra/header_menu.ts b/x-pack/test_serverless/functional/test_suites/observability/infra/header_menu.ts deleted file mode 100644 index 775055825d2e7..0000000000000 --- a/x-pack/test_serverless/functional/test_suites/observability/infra/header_menu.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { FtrProviderContext } from '../../../ftr_provider_context'; - -import { HOSTS_VIEW_PATH } from './constants'; - -export default ({ getPageObjects, getService }: FtrProviderContext) => { - const esArchiver = getService('esArchiver'); - const pageObjects = getPageObjects(['svlCommonPage', 'common', 'infraHome', 'header']); - - // failing feature flag test, see https://github.com/elastic/kibana/issues/191809 - describe.skip('Header menu', () => { - before(async () => { - await esArchiver.load('x-pack/test/functional/es_archives/infra/metrics_and_logs'); - await pageObjects.svlCommonPage.loginAsViewer(); - }); - - after(async () => { - await esArchiver.unload('x-pack/test/functional/es_archives/infra/metrics_and_logs'); - }); - - describe('Alerts dropdown', () => { - beforeEach(async () => { - await pageObjects.common.navigateToApp(HOSTS_VIEW_PATH); - await pageObjects.header.waitUntilLoadingHasFinished(); - }); - - it('is hidden', async () => { - await pageObjects.infraHome.ensureAlertsAndRulesDropdownIsMissing(); - }); - }); - }); -}; diff --git a/x-pack/test_serverless/functional/test_suites/observability/infra/hosts_page.ts b/x-pack/test_serverless/functional/test_suites/observability/infra/hosts_page.ts index 808b079896464..f6acf29cb3a9e 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/infra/hosts_page.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/infra/hosts_page.ts @@ -40,28 +40,22 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { (await pageObjects.infraHostsView.isKPIChartsLoaded()) ); - // failing feature flag test, see https://github.com/elastic/kibana/issues/191810 - describe.skip('Hosts Page', function () { + describe('Hosts Page', function () { before(async () => { - await Promise.all([ - esArchiver.load('x-pack/test/functional/es_archives/infra/metrics_and_logs'), - ]); + await esArchiver.load('x-pack/test/functional/es_archives/infra/metrics_and_logs'); await pageObjects.svlCommonPage.loginAsViewer(); - await browser.setWindowSize(1600, 1200); + + await pageObjects.common.navigateToApp(HOSTS_VIEW_PATH); + await pageObjects.header.waitUntilLoadingHasFinished(); + + await browser.setWindowSize(1600, 1400); }); after(async () => { - await Promise.all([ - esArchiver.unload('x-pack/test/functional/es_archives/infra/metrics_and_logs'), - ]); + await esArchiver.unload('x-pack/test/functional/es_archives/infra/metrics_and_logs'); }); describe('#Single Host Flyout', () => { - before(async () => { - await pageObjects.common.navigateToApp(HOSTS_VIEW_PATH); - await pageObjects.header.waitUntilLoadingHasFinished(); - }); - describe('Tabs', () => { before(async () => { await pageObjects.timePicker.setAbsoluteRange( @@ -100,10 +94,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { it('should show alerts', async () => { await pageObjects.header.waitUntilLoadingHasFinished(); await pageObjects.assetDetails.overviewAlertsTitleExists(); - const CreateRuleButtonExist = await testSubjects.exists( - 'infraAssetDetailsCreateAlertsRuleButton' - ); - expect(CreateRuleButtonExist).to.be(true); + await pageObjects.assetDetails.overviewOpenAlertsFlyoutExist(); }); }); @@ -123,7 +114,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { }); it('should show processes title', async () => { - await await testSubjects.existOrFail('infraAssetDetailsTopProcessesTitle'); + await testSubjects.existOrFail('infraAssetDetailsTopProcessesTitle'); }); }); @@ -175,7 +166,6 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { describe('Metrics Tab', () => { before(async () => { - await browser.scrollTop(); await pageObjects.infraHostsView.visitMetricsTab(); }); @@ -191,7 +181,6 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { describe('Logs Tab', () => { before(async () => { - await browser.scrollTop(); await pageObjects.infraHostsView.visitLogsTab(); }); @@ -206,7 +195,6 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { describe('Alerts Tab', () => { before(async () => { - await browser.scrollTop(); await pageObjects.infraHostsView.visitAlertTab(); }); diff --git a/x-pack/test_serverless/functional/test_suites/observability/infra/index.ts b/x-pack/test_serverless/functional/test_suites/observability/infra/index.ts index b646ba71f960e..914f7760f900e 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/infra/index.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/infra/index.ts @@ -9,7 +9,6 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: FtrProviderContext) { describe('Observability Infra', function () { - loadTestFile(require.resolve('./header_menu')); loadTestFile(require.resolve('./navigation')); loadTestFile(require.resolve('./node_details')); loadTestFile(require.resolve('./hosts_page')); diff --git a/x-pack/test_serverless/functional/test_suites/observability/infra/node_details.ts b/x-pack/test_serverless/functional/test_suites/observability/infra/node_details.ts index 25d30117ad6b5..254bf9e555a13 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/infra/node_details.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/infra/node_details.ts @@ -30,8 +30,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { 'svlCommonPage', ]); - // failing feature flag test, see https://github.com/elastic/kibana/issues/191809 - describe.skip('Node Details', () => { + describe('Node Details', () => { describe('#With Asset Details', () => { before(async () => { await esArchiver.load('x-pack/test/functional/es_archives/infra/metrics_and_logs'); @@ -50,7 +49,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { describe('Osquery Tab', () => { it('should not render in serverless', async () => { const OsqueryExist = await testSubjects.exists('infraAssetDetailsOsqueryTab'); - expect(OsqueryExist).to.be(false); + expect(OsqueryExist).to.be(true); }); }); @@ -68,10 +67,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { it('should show alerts', async () => { await pageObjects.header.waitUntilLoadingHasFinished(); await pageObjects.assetDetails.overviewAlertsTitleExists(); - const CreateRuleButtonExist = await testSubjects.exists( - 'infraAssetDetailsCreateAlertsRuleButton' - ); - expect(CreateRuleButtonExist).to.be(true); + await pageObjects.assetDetails.overviewOpenAlertsFlyoutExist(); }); [ From 048707de9368dc0e233500972a9cbbb7c6005e64 Mon Sep 17 00:00:00 2001 From: Carlos Crespo Date: Fri, 29 Nov 2024 17:19:27 +0100 Subject: [PATCH 2/2] update codeowners --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index fb0869dd8addb..2a9bc00a9a927 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1283,6 +1283,7 @@ packages/kbn-monaco/src/esql @elastic/kibana-esql /x-pack/plugins/observability_solution/infra/server/services @elastic/obs-ux-infra_services-team /x-pack/plugins/observability_solution/infra/server/usage @elastic/obs-ux-infra_services-team /x-pack/plugins/observability_solution/infra/server/utils @elastic/obs-ux-infra_services-team +/x-pack/test_serverless/functional/test_suites/observability/infra @elastic/obs-ux-infra_services-team /x-pack/test/api_integration/services/infraops_source_configuration.ts @elastic/obs-ux-infra_services-team @elastic/obs-ux-logs-team # Assigned per https://github.com/elastic/kibana/pull/34916 ## Logs UI code exceptions -> @elastic/obs-ux-logs-team