kibana/test
Kibana Machine 385f33e9d4
[8.11] [Dashboard] Fix flaky sync_colors.tsx test (#172633) (#172692)
# Backport

This will backport the following commits from `main` to `8.11`:
- [[Dashboard] Fix flaky `sync_colors.tsx` test
(#172633)](https://github.com/elastic/kibana/pull/172633)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Hannah
Mudge","email":"Heenawter@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-12-06T14:55:13Z","message":"[Dashboard]
Fix flaky `sync_colors.tsx` test (#172633)\n\n## Summary\r\n\r\nIt is
possible for the `noDataPopover` to take more than the
`100ms`\r\ntimeout from `ensureHiddenNoDataPopover` (pictured below) to
appear - in\r\nthese cases, any tests that make use of the Lens page
object's\r\n`goToTimeRange` method will fail due to clicking the wrong
element (the\r\ntour step rather than the time
picker).\r\n\r\n\r\n![image](35de1215-6f9f-4a72-a0ab-e1a60f5bb80a)\r\n\r\n\r\nWhile
my initial thought was to simply increase the timeout for
the\r\n`noDataPopover` check, this isn't ideal - **a lot** of tests use
the\r\n`goToTimeRange` method and, by doing this, we would be slowing
down\r\n**every single one of them** even when the test wouldn't have
failed to\r\nbegin with! Instead, I've chosen to surround the important
parts of the\r\ncode in `goToTimeRange` with a `retry` - that way, if
the\r\n`noDataPopover` never shows up or it shows up comfortably within
the\r\n`100ms` timeout, the impact to the speed of a given test will
be\r\n**minimal**; however, if the no data popover shows up **outside**
of\r\nthis timeout, the retry will save the test from outright
failure.\r\n\r\n### [Flaky
Test\r\nRunner](1ac033d7-6cc1-4789-9a2b-6c7b8c34f67c)\r\n\r\n\r\n###
Checklist\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n\r\n### For
maintainers\r\n\r\n- [ ] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"d9e2d06512196ff6800a8441fc4605c258f206dd","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Presentation","loe:small","release_note:skip","impact:critical","backport:prev-minor","v8.12.0","v8.13.0"],"number":172633,"url":"https://github.com/elastic/kibana/pull/172633","mergeCommit":{"message":"[Dashboard]
Fix flaky `sync_colors.tsx` test (#172633)\n\n## Summary\r\n\r\nIt is
possible for the `noDataPopover` to take more than the
`100ms`\r\ntimeout from `ensureHiddenNoDataPopover` (pictured below) to
appear - in\r\nthese cases, any tests that make use of the Lens page
object's\r\n`goToTimeRange` method will fail due to clicking the wrong
element (the\r\ntour step rather than the time
picker).\r\n\r\n\r\n![image](35de1215-6f9f-4a72-a0ab-e1a60f5bb80a)\r\n\r\n\r\nWhile
my initial thought was to simply increase the timeout for
the\r\n`noDataPopover` check, this isn't ideal - **a lot** of tests use
the\r\n`goToTimeRange` method and, by doing this, we would be slowing
down\r\n**every single one of them** even when the test wouldn't have
failed to\r\nbegin with! Instead, I've chosen to surround the important
parts of the\r\ncode in `goToTimeRange` with a `retry` - that way, if
the\r\n`noDataPopover` never shows up or it shows up comfortably within
the\r\n`100ms` timeout, the impact to the speed of a given test will
be\r\n**minimal**; however, if the no data popover shows up **outside**
of\r\nthis timeout, the retry will save the test from outright
failure.\r\n\r\n### [Flaky
Test\r\nRunner](1ac033d7-6cc1-4789-9a2b-6c7b8c34f67c)\r\n\r\n\r\n###
Checklist\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n\r\n### For
maintainers\r\n\r\n- [ ] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"d9e2d06512196ff6800a8441fc4605c258f206dd"}},"sourceBranch":"main","suggestedTargetBranches":["8.13"],"targetPullRequestStates":[{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/172633","number":172633,"mergeCommit":{"message":"[Dashboard]
Fix flaky `sync_colors.tsx` test (#172633)\n\n## Summary\r\n\r\nIt is
possible for the `noDataPopover` to take more than the
`100ms`\r\ntimeout from `ensureHiddenNoDataPopover` (pictured below) to
appear - in\r\nthese cases, any tests that make use of the Lens page
object's\r\n`goToTimeRange` method will fail due to clicking the wrong
element (the\r\ntour step rather than the time
picker).\r\n\r\n\r\n![image](35de1215-6f9f-4a72-a0ab-e1a60f5bb80a)\r\n\r\n\r\nWhile
my initial thought was to simply increase the timeout for
the\r\n`noDataPopover` check, this isn't ideal - **a lot** of tests use
the\r\n`goToTimeRange` method and, by doing this, we would be slowing
down\r\n**every single one of them** even when the test wouldn't have
failed to\r\nbegin with! Instead, I've chosen to surround the important
parts of the\r\ncode in `goToTimeRange` with a `retry` - that way, if
the\r\n`noDataPopover` never shows up or it shows up comfortably within
the\r\n`100ms` timeout, the impact to the speed of a given test will
be\r\n**minimal**; however, if the no data popover shows up **outside**
of\r\nthis timeout, the retry will save the test from outright
failure.\r\n\r\n### [Flaky
Test\r\nRunner](1ac033d7-6cc1-4789-9a2b-6c7b8c34f67c)\r\n\r\n\r\n###
Checklist\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n\r\n### For
maintainers\r\n\r\n- [ ] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"d9e2d06512196ff6800a8441fc4605c258f206dd"}},{"branch":"8.13","label":"v8.13.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Hannah Mudge <Heenawter@users.noreply.github.com>
2023-12-06 09:05:10 -07:00
..
accessibility Unskip a11y skipped tests in console & discover (#162903) 2023-08-02 08:15:08 -04:00
analytics [FTR] Implement browser network condition utils (#163633) 2023-08-11 14:24:06 +02:00
api_integration [Enterprise Search] Update connector tiles (#167656) 2023-10-03 14:33:13 +02:00
common [ftr] fix test users for serverless (#161280) 2023-07-10 10:09:07 +02:00
examples [8.11] Re-word partial data message (#168883) (#168896) 2023-10-13 15:50:38 -07:00
functional [8.11] [Dashboard] Fix flaky sync_colors.tsx test (#172633) (#172692) 2023-12-06 09:05:10 -07:00
harden Add test to ensure security related eslint rules are applied (#151434) 2023-02-24 16:48:11 +01:00
health_gateway Change the health gateway to use the status API (#160125) 2023-06-26 02:34:00 -07:00
interactive_setup_api_integration [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
interactive_setup_functional Unskip interactive setup functional tests (#157863) 2023-05-16 09:20:00 -04:00
interpreter_functional [Lens] Color mapping for categorical dimensions (#162389) 2023-09-28 14:14:58 +02:00
node_roles_functional [Migrations] Add migrator node role (#151978) 2023-02-27 06:49:31 -07:00
package Adds base implementation of the Kibana Health Gateway. (#141172) 2022-11-07 09:14:42 -07:00
plugin_functional [8.11] FullStory: use debounce before updating Page Vars (#171450) (#171636) 2023-11-21 08:27:51 -07:00
scripts Upgrading cypress to 12.17.4 (#165869) 2023-09-19 10:15:53 -07:00
server_integration [Flaky test #131192] HTTP SSL Redirects (#163726) 2023-08-14 09:48:45 -07:00
ui_capabilities/newsfeed_err [ftr] automatically determine config run order (#130983) 2022-05-04 17:05:58 -05:00
tsconfig.json [Dashboard Navigation] Make links panel available under technical preview (#166896) 2023-09-29 08:25:51 -06:00