Skip to content

Commit

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

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

* remove extra retry loop
  • Loading branch information
Lee Drengenberg authored Jul 25, 2018
1 parent 8f3692e commit ae966b5
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 ae966b5

Please sign in to comment.