From 3ea72a641da4c9a828b7732e24041e14a8148998 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 17 Nov 2022 17:49:20 -0500 Subject: [PATCH] [8.6] basic smoke test for Fleet installation package (#145475) (#145634) # Backport This will backport the following commits from `main` to `8.6`: - [basic smoke test for Fleet installation package (#145475)](https://github.com/elastic/kibana/pull/145475) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Rashmi Kulkarni --- .../test/fleet_functional/apps/fleet/index.ts | 1 + .../apps/fleet/integration_smoke.ts | 30 +++++++++++++++++++ ...onfig.stack_functional_integration_base.js | 4 +++ 3 files changed, 35 insertions(+) create mode 100644 x-pack/test/fleet_functional/apps/fleet/integration_smoke.ts diff --git a/x-pack/test/fleet_functional/apps/fleet/index.ts b/x-pack/test/fleet_functional/apps/fleet/index.ts index 965d4c7776197..446d78d5e203a 100644 --- a/x-pack/test/fleet_functional/apps/fleet/index.ts +++ b/x-pack/test/fleet_functional/apps/fleet/index.ts @@ -12,5 +12,6 @@ export default function (providerContext: FtrProviderContext) { describe('endpoint', function () { loadTestFile(require.resolve('./agents_page')); + loadTestFile(require.resolve('./integration_smoke')); }); } diff --git a/x-pack/test/fleet_functional/apps/fleet/integration_smoke.ts b/x-pack/test/fleet_functional/apps/fleet/integration_smoke.ts new file mode 100644 index 0000000000000..f71234ea851b0 --- /dev/null +++ b/x-pack/test/fleet_functional/apps/fleet/integration_smoke.ts @@ -0,0 +1,30 @@ +/* + * 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'; + +export default function ({ getPageObjects, getService }: FtrProviderContext) { + const PageObjects = getPageObjects(['common']); + const testSubjects = getService('testSubjects'); + + describe('Elastic synthetics integration', function () { + this.tags(['smoke']); + before(async () => { + await PageObjects.common.navigateToUrl('management', 'integrations/installed', { + ensureCurrentUrl: false, + shouldLoginIfPrompted: false, + shouldUseHashForSubUrl: false, + }); + }); + + // This is a basic smoke test to cover Fleet package installed logic + // https://github.com/elastic/kibana/pull/144899 + it('should show the Elastic synthetics integration', async () => { + await testSubjects.exists('integration-card:epr:synthetics'); + }); + }); +} diff --git a/x-pack/test/stack_functional_integration/configs/config.stack_functional_integration_base.js b/x-pack/test/stack_functional_integration/configs/config.stack_functional_integration_base.js index cc87395ac27f1..9b2e2f087d081 100644 --- a/x-pack/test/stack_functional_integration/configs/config.stack_functional_integration_base.js +++ b/x-pack/test/stack_functional_integration/configs/config.stack_functional_integration_base.js @@ -34,6 +34,9 @@ export default async ({ readConfigFile }) => { const xpackFunctionalConfig = await readConfigFile( require.resolve('../../functional/config.ccs.ts') ); + const fleetFunctionalConfig = await readConfigFile( + require.resolve('../../fleet_functional/config.ts') + ); process.env.stack_functional_integration = true; logAll(log); @@ -42,6 +45,7 @@ export default async ({ readConfigFile }) => { pageObjects: { triggersActionsUI: TriggersActionsPageProvider, ...xpackFunctionalConfig.get('pageObjects'), + ...fleetFunctionalConfig.get('pageObjects'), }, apps: { ...xpackFunctionalConfig.get('apps'),