Skip to content

[8.x] [Lens] Restore embeddable test coverage (#204986)#206602

Merged
dej611 merged 2 commits intoelastic:8.xfrom
dej611:backport/8.x/pr-204986
Jan 16, 2025
Merged

[8.x] [Lens] Restore embeddable test coverage (#204986)#206602
dej611 merged 2 commits intoelastic:8.xfrom
dej611:backport/8.x/pr-204986

Conversation

@dej611
Copy link
Copy Markdown
Contributor

@dej611 dej611 commented Jan 14, 2025

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

## Summary

Fixes elastic#198754

Restore previous removed tests when performing the refactor.
The new tests take advantage of the new architecture to be more modular
and close to the logic modules.

The `data_loader` tests are not just covering the re-render logic but
also some `expression_params` logic, who in the past have proven to be
the source of some bugs: specifically the tests will check that the
params are correctly passed to the params logic and then stored
correctly in the observable.

New mocks take advantage of the plain initializers to build some of the
API, that will make it in sync with the actual implementation for future
maintenance.

### Checklist

Check the PR satisfies following conditions.

- [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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marta Bondyra <4283304+mbondyra@users.noreply.github.com>
(cherry picked from commit 41950c2)

# Conflicts:
#	x-pack/platform/plugins/shared/lens/public/react_embeddable/mocks/index.tsx
@dej611 dej611 requested a review from kibanamachine as a code owner January 14, 2025 15:07
@dej611 dej611 added the backport This PR is a backport of another PR label Jan 14, 2025
@dej611 dej611 enabled auto-merge (squash) January 14, 2025 15:07
@elasticmachine
Copy link
Copy Markdown
Contributor

elasticmachine commented Jan 14, 2025

💔 Build Failed

Failed CI Steps

History

@dej611 dej611 merged commit a5d54bf into elastic:8.x Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants