Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial unit tests for embedded_visualize_handler #31324

Merged

Conversation

lukeelmers
Copy link
Member

Fixes #30422

This is a first pass at unit tests for the embedded_visualize_handler. For now I prioritized public methods & interfaces, and have also tried to cover some of the issues we've seen come up recently with the work on the new pipeline (e.g. #30405, #30830) -- but I'm open to suggestion on any other pieces we feel are particularly error-prone that would be worth spending time on now.

Public stuff that hasn't been tested yet is focused around rendering, because that's where the two paths diverge (pipeline/visualize data loaders). Also for the legacy visualizationLoader, it is very tricky to get things working as you have to try mocking the Vis object, especially without the help of the usual ngMock.module and ngMock.inject setup.

Since we are looking to move toward the expression pipeline as soon as things are stable, I hesitate to invest the time in getting tests working with visualizationLoader -- I think that time is better spent focusing on tests for the pipeline/interpreter.

Ran this suite both with and without the pipeline; everything should pass in both cases.

@lukeelmers lukeelmers added Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.0.0 v7.2.0 app-stabilizing labels Feb 15, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app

@elasticmachine

This comment has been minimized.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Member

@ppisljar ppisljar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lukeelmers lukeelmers merged commit e9c40ce into elastic:master Mar 7, 2019
@lukeelmers lukeelmers deleted the fix/embedded-visualize-handler-tests branch March 7, 2019 06:36
lukeelmers added a commit to lukeelmers/kibana that referenced this pull request Mar 7, 2019
lukeelmers added a commit to lukeelmers/kibana that referenced this pull request Mar 7, 2019
spalger pushed a commit that referenced this pull request Mar 7, 2019
spalger pushed a commit that referenced this pull request Mar 7, 2019
@spalger
Copy link
Contributor

spalger commented Mar 7, 2019

This PR started causing master to fail, so I reverted it in #32615

PhilippBaranovskiy pushed a commit to PhilippBaranovskiy/kibana that referenced this pull request Mar 7, 2019
PhilippBaranovskiy pushed a commit to PhilippBaranovskiy/kibana that referenced this pull request Mar 7, 2019
@lukeelmers
Copy link
Member Author

This was my bad, the last green CI build was awhile ago, and I should've re-run it as a precautionary measure.

Opened #32657 with the same PR rebased on master. Will merge & backport that one instead once a green build comes back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) review Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.0.0 v7.2.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants