Skip to content

Commit

Permalink
Fix flaky test in alert details page (#64572) (#64649)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecote authored Apr 28, 2020
1 parent bee297c commit 9c969e7
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,12 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
}
);

// await first run to complete so we have an initial state
await retry.try(async () => {
const { alertInstances } = await alerting.alerts.getAlertState(alert.id);
expect(Object.keys(alertInstances).length).to.eql(instances.length);
});

// refresh to see alert
await browser.refresh();

Expand All @@ -514,12 +520,6 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {

// click on first alert
await pageObjects.triggersActionsUI.clickOnAlertInAlertsList(alert.name);

// await first run to complete so we have an initial state
await retry.try(async () => {
const { alertInstances } = await alerting.alerts.getAlertState(alert.id);
expect(Object.keys(alertInstances).length).to.eql(instances.length);
});
});

const PAGE_SIZE = 10;
Expand Down

0 comments on commit 9c969e7

Please sign in to comment.