From 62302ce935f61bea0eea5f0900a5636685f05c6c Mon Sep 17 00:00:00 2001 From: Julia Rechkunova Date: Wed, 4 Jan 2023 14:40:31 +0100 Subject: [PATCH] [UnifiedFieldList] Update tests --- test/functional/apps/discover/group1/_sidebar.ts | 1 + test/functional/page_objects/discover_page.ts | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/test/functional/apps/discover/group1/_sidebar.ts b/test/functional/apps/discover/group1/_sidebar.ts index 09190a0a39702..84e3841b66ea7 100644 --- a/test/functional/apps/discover/group1/_sidebar.ts +++ b/test/functional/apps/discover/group1/_sidebar.ts @@ -46,6 +46,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover'); await kibanaServer.savedObjects.cleanStandardList(); await kibanaServer.uiSettings.replace({}); + await PageObjects.discover.cleanSidebarLocalStorage(); }); describe('field filtering', function () { diff --git a/test/functional/page_objects/discover_page.ts b/test/functional/page_objects/discover_page.ts index b9be3c673448d..7db95f8063c12 100644 --- a/test/functional/page_objects/discover_page.ts +++ b/test/functional/page_objects/discover_page.ts @@ -463,6 +463,10 @@ export class DiscoverPageObject extends FtrService { ).getAttribute('innerText'); } + public async cleanSidebarLocalStorage(): Promise { + await this.browser.setLocalStorageItem('discover.unifiedFieldList.initiallyOpenSections', '{}'); + } + public async waitUntilSidebarHasLoaded() { await this.retry.waitFor('sidebar is loaded', async () => { return (await this.getSidebarAriaDescription()).length > 0;