Fix flaky dashboard view count test (#225021)

## Summary

Fix https://github.com/elastic/kibana/issues/223562
This commit is contained in:
Anton Dosov 2025-06-24 15:56:35 +02:00 committed by GitHub
parent 7dd72b0a3d
commit 787f02ba66
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -269,8 +269,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
return Number(viewsStr);
}
const views1 = await getViewsCount();
expect(views1).to.be(1);
// it might take a bit for the view to be counted
await retry.try(async () => {
const views1 = await getViewsCount();
expect(views1).to.be(1);
});
await listingTable.clickItemLink('dashboard', DASHBOARD_NAME);
await dashboard.waitForRenderComplete();