Skip to content

Commit

Permalink
fix flaky test - counts dashboard views (#197381)
Browse files Browse the repository at this point in the history
## Summary

fix #192564

It might take a bit of time for the view count to update. So in the test
we will try to open the flyout again
  • Loading branch information
Dosant authored Oct 24, 2024
1 parent 7fa1e18 commit 3684ded
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/functional/apps/dashboard/group4/dashboard_listing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const listingTable = getService('listingTable');
const dashboardAddPanel = getService('dashboardAddPanel');
const testSubjects = getService('testSubjects');
const retry = getService('retry');

// Failing: See https://github.com/elastic/kibana/issues/192564
describe.skip('dashboard listing page', function describeIndexTests() {
Expand Down Expand Up @@ -272,8 +273,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await listingTable.clickItemLink('dashboard', DASHBOARD_NAME);
await dashboard.waitForRenderComplete();
await dashboard.gotoDashboardLandingPage();
const views2 = await getViewsCount();
expect(views2).to.be(2);

// it might take a bit for the view to be counted
await retry.try(async () => {
const views2 = await getViewsCount();
expect(views2).to.be(2);
});
});
});
});
Expand Down

0 comments on commit 3684ded

Please sign in to comment.