From ae966b57e6f678ef7e0edb8c156427e8c7ad7d89 Mon Sep 17 00:00:00 2001 From: Lee Drengenberg Date: Wed, 25 Jul 2018 18:45:09 -0500 Subject: [PATCH] Add method to wait for loading to complete in Add Panel table (#21109) (#21246) * Add method to wait for loading to complete in Add Panel table * remove extra retry loop --- test/functional/services/dashboard/add_panel.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/functional/services/dashboard/add_panel.js b/test/functional/services/dashboard/add_panel.js index c0f571125d6e..4d11f805edf2 100644 --- a/test/functional/services/dashboard/add_panel.js +++ b/test/functional/services/dashboard/add_panel.js @@ -93,6 +93,11 @@ export function DashboardAddPanelProvider({ getService, getPageObjects }) { } } + async waitForEuiTableLoading() { + const addPanel = await testSubjects.find('dashboardAddPanel'); + await addPanel.waitForDeletedByClassName('euiBasicTable-loading'); + } + async closeAddPanel() { log.debug('DashboardAddPanel.closeAddPanel'); const isOpen = await this.isAddPanelOpen(); @@ -172,6 +177,8 @@ export function DashboardAddPanelProvider({ getService, getPageObjects }) { } async filterEmbeddableNames(name) { + // The search input field may be disabled while the table is loading so wait for it + await this.waitForEuiTableLoading(); await testSubjects.setValue('savedObjectFinderSearchInput', name); await PageObjects.header.waitUntilLoadingHasFinished(); }