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;