From ac1cf7d19e519eee079d1133e17bb0f81d84114a Mon Sep 17 00:00:00 2001 From: Rashmi Kulkarni Date: Mon, 23 Nov 2020 14:21:47 -0800 Subject: [PATCH] Fix for x-pack maps functional test to remove the unloading of data (#83856) * fixes https://github.com/elastic/kibana/issues/74449 * fixing maps tests -small fix to remove unloading of data for the subsequent tests to pass * changes to how we load/unload data * modified index.js file again to fit the needs Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../functional/apps/maps/feature_controls/maps_security.ts | 7 ------- .../functional/apps/maps/feature_controls/maps_spaces.ts | 5 +---- x-pack/test/functional/apps/maps/index.js | 2 +- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/x-pack/test/functional/apps/maps/feature_controls/maps_security.ts b/x-pack/test/functional/apps/maps/feature_controls/maps_security.ts index b6b38b840677fa..1da696c30dfb7f 100644 --- a/x-pack/test/functional/apps/maps/feature_controls/maps_security.ts +++ b/x-pack/test/functional/apps/maps/feature_controls/maps_security.ts @@ -7,7 +7,6 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getPageObjects, getService }: FtrProviderContext) { - const esArchiver = getService('esArchiver'); const security = getService('security'); const PageObjects = getPageObjects(['common', 'error', 'maps', 'settings', 'security']); const appsMenu = getService('appsMenu'); @@ -17,13 +16,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const savedQueryManagementComponent = getService('savedQueryManagementComponent'); describe('maps security feature controls', () => { - before(async () => { - await esArchiver.loadIfNeeded('maps/data'); - await esArchiver.load('maps/kibana'); - }); - after(async () => { - await esArchiver.unload('maps/kibana'); // logout, so the other tests don't accidentally run as the custom users we're testing below await PageObjects.security.forceLogout(); }); diff --git a/x-pack/test/functional/apps/maps/feature_controls/maps_spaces.ts b/x-pack/test/functional/apps/maps/feature_controls/maps_spaces.ts index 11b87469e49934..98f91705f0c1e8 100644 --- a/x-pack/test/functional/apps/maps/feature_controls/maps_spaces.ts +++ b/x-pack/test/functional/apps/maps/feature_controls/maps_spaces.ts @@ -7,7 +7,6 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getPageObjects, getService }: FtrProviderContext) { - const esArchiver = getService('esArchiver'); const spacesService = getService('spaces'); const PageObjects = getPageObjects(['common', 'maps', 'security']); const appsMenu = getService('appsMenu'); @@ -15,13 +14,11 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { // FLAKY: https://github.com/elastic/kibana/issues/38414 describe.skip('spaces feature controls', () => { before(async () => { - await esArchiver.loadIfNeeded('maps/data'); - await esArchiver.load('maps/kibana'); PageObjects.maps.setBasePath('/s/custom_space'); }); after(async () => { - await esArchiver.unload('maps/kibana'); + await PageObjects.security.forceLogout(); PageObjects.maps.setBasePath(''); }); diff --git a/x-pack/test/functional/apps/maps/index.js b/x-pack/test/functional/apps/maps/index.js index 2d2d2f9d3cf9b8..a3cf85fd00d8e6 100644 --- a/x-pack/test/functional/apps/maps/index.js +++ b/x-pack/test/functional/apps/maps/index.js @@ -27,7 +27,7 @@ export default function ({ loadTestFile, getService }) { await esArchiver.unload('maps/kibana'); }); - describe('', function () { + describe('', async function () { this.tags('ciGroup9'); loadTestFile(require.resolve('./documents_source')); loadTestFile(require.resolve('./blended_vector_layer'));