Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Dashboard] Fix flaky
sync_colors.tsx
test (#172633)
## Summary It is possible for the `noDataPopover` to take more than the `100ms` timeout from `ensureHiddenNoDataPopover` (pictured below) to appear - in these cases, any tests that make use of the Lens page object's `goToTimeRange` method will fail due to clicking the wrong element (the tour step rather than the time picker). ![image](https://github.com/elastic/kibana/assets/8698078/35de1215-6f9f-4a72-a0ab-e1a60f5bb80a) While my initial thought was to simply increase the timeout for the `noDataPopover` check, this isn't ideal - **a lot** of tests use the `goToTimeRange` method and, by doing this, we would be slowing down **every single one of them** even when the test wouldn't have failed to begin with! Instead, I've chosen to surround the important parts of the code in `goToTimeRange` with a `retry` - that way, if the `noDataPopover` never shows up or it shows up comfortably within the `100ms` timeout, the impact to the speed of a given test will be **minimal**; however, if the no data popover shows up **outside** of this timeout, the retry will save the test from outright failure. ### [Flaky Test Runner](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4192) ![image](https://github.com/elastic/kibana/assets/8698078/1ac033d7-6cc1-4789-9a2b-6c7b8c34f67c) ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- Loading branch information