Skip to content

Commit

Permalink
[Functional test] Add retry for dashboard save (#70950) (#71424)
Browse files Browse the repository at this point in the history
  • Loading branch information
Maja Grubic authored Jul 13, 2020
1 parent 03d224d commit 08cb8eb
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions test/functional/page_objects/dashboard_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,14 +290,16 @@ export function DashboardPageProvider({ getService, getPageObjects }: FtrProvide
dashboardName: string,
saveOptions: SaveDashboardOptions = { waitDialogIsClosed: true }
) {
await this.enterDashboardTitleAndClickSave(dashboardName, saveOptions);
await retry.try(async () => {
await this.enterDashboardTitleAndClickSave(dashboardName, saveOptions);

if (saveOptions.needsConfirm) {
await this.clickSave();
}
if (saveOptions.needsConfirm) {
await this.clickSave();
}

// Confirm that the Dashboard has actually been saved
await testSubjects.existOrFail('saveDashboardSuccess');
// Confirm that the Dashboard has actually been saved
await testSubjects.existOrFail('saveDashboardSuccess');
});
const message = await PageObjects.common.closeToast();
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.common.waitForSaveModalToClose();
Expand Down

0 comments on commit 08cb8eb

Please sign in to comment.