Add method to wait for loading to complete in Add Panel table (#21109) (#21247)

* Add method to wait for loading to complete in Add Panel table

* remove extra retry loop
This commit is contained in:
Lee Drengenberg 2018-07-25 18:45:39 -05:00 committed by GitHub
parent 2eee0ce56f
commit b62d01925a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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();
}