Skip to content

[Lens] EditorFrame + EuiIcon test suite interaction #58068

@thompsongl

Description

@thompsongl

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

Metadata

Metadata

Assignees

Labels

Feature:LensTeam:VisualizationsTeam label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t//blocker

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions