From 4d97e10c87ac990e946c3ce4bcae86511a87eeab Mon Sep 17 00:00:00 2001 From: Tre' Seymour Date: Mon, 30 Aug 2021 10:22:48 +0100 Subject: [PATCH] [Archive Migration][Partial] discover apps-home Comes from https://github.com/elastic/kibana/pull/102827 Helps with https://github.com/elastic/kibana/pull/108503 Unload shakespeare data, set default index. Only include the changes under the test/functional/apps/home folder. --- test/functional/apps/getting_started/_shakespeare.ts | 2 ++ test/functional/apps/home/_navigation.ts | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/test/functional/apps/getting_started/_shakespeare.ts b/test/functional/apps/getting_started/_shakespeare.ts index ae6841b85c98d..98eeed7bcf53e 100644 --- a/test/functional/apps/getting_started/_shakespeare.ts +++ b/test/functional/apps/getting_started/_shakespeare.ts @@ -65,6 +65,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { after(async () => { await security.testUser.restoreDefaults(); + await esArchiver.unload('test/functional/fixtures/es_archiver/getting_started/shakespeare'); + await kibanaServer.uiSettings.replace({}); }); it('should create shakespeare index pattern', async function () { diff --git a/test/functional/apps/home/_navigation.ts b/test/functional/apps/home/_navigation.ts index a57ce0596abac..53a87729207d7 100644 --- a/test/functional/apps/home/_navigation.ts +++ b/test/functional/apps/home/_navigation.ts @@ -14,11 +14,17 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const PageObjects = getPageObjects(['common', 'header', 'home', 'timePicker']); const appsMenu = getService('appsMenu'); const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); describe('Kibana browser back navigation should work', function describeIndexTests() { before(async () => { - await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/discover'); await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); + await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover'); + await kibanaServer.uiSettings.replace({ defaultIndex: 'logstash-*' }); + }); + + after(async () => { + await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover'); }); it('detect navigate back issues', async () => {