Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flaky test in alert details page #64572

Merged
merged 1 commit into from
Apr 28, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,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 @@ -463,12 +469,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