Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[React@18 failing test] Navigate to dataset details should navigate t…
…o details page from a main page. (#196384) ## Summary Hi team, we're working on upgrading Kibana to React@18 in legacy mode elastic/kibana-team#1016 (comment) and addressing remaining functional tests when running with React@18 in Legacy Mode. One failure we've found is happening on the dataset quality page: navigate to dataset details should navigate to details page from a main page. [Failure](https://buildkite.com/elastic/kibana-pull-request/builds/236562#019222ec-e95e-44aa-a754-fd9f736accce). I tracked it down to infinite re-render of `DegradedDocs` component. Looks like there is an infinite useEffect loop that is also happening with react@17, but the results of it are not so severe so the tests are still passing and the page is still functioning with react@17, wheres with react@18 it becomes completely unresponsive. This effect causes the inifite loop because `breakdown` is new object with each render: https://github.com/elastic/kibana/blob/0d19367fdfad5526b5220dfdf18b4991fe6b3abd/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/document_trends/degraded_docs/index.tsx#L85-L91 To reproduce the loop, I used the setup from the following functional tests suite: x-pack/test/functional/apps/dataset_quality/dataset_quality_details.ts
- Loading branch information