[Lens] Restore embeddable test coverage#204986
Conversation
|
Pinging @elastic/kibana-visualizations (Team:Visualizations) |
|
Dismissed the Data Discovery review because it looks like there are no longer changes in our area. |
x-pack/platform/plugins/shared/lens/public/react_embeddable/user_messages/api.test.ts
Outdated
Show resolved
Hide resolved
x-pack/platform/plugins/shared/lens/public/react_embeddable/user_messages/api.test.ts
Outdated
Show resolved
Hide resolved
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Async chunks
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
|
|
Starting backport for target branches: 8.x |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. 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
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
1 similar comment
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
# Backport This will backport the following commits from `main` to `8.x`: - [[Lens] Restore embeddable test coverage (#204986)](#204986) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Marco Liberati","email":"dej611@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-01-10T09:29:38Z","message":"[Lens] Restore embeddable test coverage (#204986)\n\n## Summary\r\n\r\nFixes #198754\r\n\r\nRestore previous removed tests when performing the refactor.\r\nThe new tests take advantage of the new architecture to be more modular\r\nand close to the logic modules.\r\n\r\nThe `data_loader` tests are not just covering the re-render logic but\r\nalso some `expression_params` logic, who in the past have proven to be\r\nthe source of some bugs: specifically the tests will check that the\r\nparams are correctly passed to the params logic and then stored\r\ncorrectly in the observable.\r\n\r\nNew mocks take advantage of the plain initializers to build some of the\r\nAPI, that will make it in sync with the actual implementation for future\r\nmaintenance.\r\n\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\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---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Marta Bondyra <4283304+mbondyra@users.noreply.github.com>","sha":"41950c22df7ae25dc8c342b50b29a7f79b956a53","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Visualizations","release_note:skip","Feature:Lens","backport missing","v9.0.0","backport:prev-minor"],"number":204986,"url":"https://github.com/elastic/kibana/pull/204986","mergeCommit":{"message":"[Lens] Restore embeddable test coverage (#204986)\n\n## Summary\r\n\r\nFixes #198754\r\n\r\nRestore previous removed tests when performing the refactor.\r\nThe new tests take advantage of the new architecture to be more modular\r\nand close to the logic modules.\r\n\r\nThe `data_loader` tests are not just covering the re-render logic but\r\nalso some `expression_params` logic, who in the past have proven to be\r\nthe source of some bugs: specifically the tests will check that the\r\nparams are correctly passed to the params logic and then stored\r\ncorrectly in the observable.\r\n\r\nNew mocks take advantage of the plain initializers to build some of the\r\nAPI, that will make it in sync with the actual implementation for future\r\nmaintenance.\r\n\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\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---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Marta Bondyra <4283304+mbondyra@users.noreply.github.com>","sha":"41950c22df7ae25dc8c342b50b29a7f79b956a53"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/204986","number":204986,"mergeCommit":{"message":"[Lens] Restore embeddable test coverage (#204986)\n\n## Summary\r\n\r\nFixes #198754\r\n\r\nRestore previous removed tests when performing the refactor.\r\nThe new tests take advantage of the new architecture to be more modular\r\nand close to the logic modules.\r\n\r\nThe `data_loader` tests are not just covering the re-render logic but\r\nalso some `expression_params` logic, who in the past have proven to be\r\nthe source of some bugs: specifically the tests will check that the\r\nparams are correctly passed to the params logic and then stored\r\ncorrectly in the observable.\r\n\r\nNew mocks take advantage of the plain initializers to build some of the\r\nAPI, that will make it in sync with the actual implementation for future\r\nmaintenance.\r\n\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\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---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Marta Bondyra <4283304+mbondyra@users.noreply.github.com>","sha":"41950c22df7ae25dc8c342b50b29a7f79b956a53"}}]}] BACKPORT-->
## 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>
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. 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)
Summary
Fixes #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_loadertests are not just covering the re-render logic but also someexpression_paramslogic, 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.