Kibana will soon be using a build of EUI for Jest environments that mocks certain components (e.g., EuiIcon). This work is starting in #55877 and has revealed a case where the Lens EditorFrame test suite was inadvertently relying on EuiIcon lifecycle events to flush pending hook effects and keep the test runner alive.
Failures: https://github.com/elastic/kibana/pull/55877/checks?check_run_id=455869586
The waitForPromises test utility used to wait for component initialization may not allow enough time for rerenders without EuiIcon's Promise resolution occurring.
For instance, simply increasing the timeout period will allow failing tests to pass:
// await waitForPromises();
await new Promise(resolve => {
setTimeout(resolve, 4000)
})
cc: @chandlerprall, who did the bulk of the investigation
Kibana will soon be using a build of EUI for Jest environments that mocks certain components (e.g.,
EuiIcon). This work is starting in #55877 and has revealed a case where the LensEditorFrametest suite was inadvertently relying onEuiIconlifecycle events to flush pending hook effects and keep the test runner alive.Failures: https://github.com/elastic/kibana/pull/55877/checks?check_run_id=455869586
The
waitForPromisestest utility used to wait for component initialization may not allow enough time for rerenders withoutEuiIcon's Promise resolution occurring.For instance, simply increasing the timeout period will allow failing tests to pass:
cc: @chandlerprall, who did the bulk of the investigation