Skip to content

Commit

Permalink
Add method to wait for loading to complete in Add Panel table (elasti…
Browse files Browse the repository at this point in the history
…c#21109)

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

* remove extra retry loop
  • Loading branch information
Lee Drengenberg committed Jul 25, 2018
1 parent af1bbe7 commit fb9b797
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/functional/services/dashboard/add_panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit fb9b797

Please sign in to comment.