Skip to content

Commit

Permalink
[8.x] fix flaky test - counts dashboard views (elastic#197381) (elast…
Browse files Browse the repository at this point in the history
…ic#197643)

# Backport

This will backport the following commits from `main` to `8.x`:
- [fix flaky test - counts dashboard views
(elastic#197381)](elastic#197381)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Anton
Dosov","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-24T13:27:04Z","message":"fix
flaky test - counts dashboard views (elastic#197381)\n\n## Summary\r\n\r\nfix
https://github.com/elastic/kibana/issues/192564\r\n\r\nIt might take a
bit of time for the view count to update. So in the test\r\nwe will try
to open the flyout
again","sha":"3684dedecb001291f857a1649e721c1e4e6b22e7","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:SharedUX","v8.16.0","backport:version","v8.17.0"],"title":"fix
flaky test - counts dashboard
views","number":197381,"url":"https://github.com/elastic/kibana/pull/197381","mergeCommit":{"message":"fix
flaky test - counts dashboard views (elastic#197381)\n\n## Summary\r\n\r\nfix
https://github.com/elastic/kibana/issues/192564\r\n\r\nIt might take a
bit of time for the view count to update. So in the test\r\nwe will try
to open the flyout
again","sha":"3684dedecb001291f857a1649e721c1e4e6b22e7"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197381","number":197381,"mergeCommit":{"message":"fix
flaky test - counts dashboard views (elastic#197381)\n\n## Summary\r\n\r\nfix
https://github.com/elastic/kibana/issues/192564\r\n\r\nIt might take a
bit of time for the view count to update. So in the test\r\nwe will try
to open the flyout
again","sha":"3684dedecb001291f857a1649e721c1e4e6b22e7"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Anton Dosov <[email protected]>
  • Loading branch information
kibanamachine and Dosant authored Oct 24, 2024
1 parent 33db487 commit 75933e1
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 75933e1

Please sign in to comment.