When expression renderers have started moving out from Canvas and VisEditors to the separate plugins, it has raised the need for such a way of testing components, as it is organized at Canvas.
Proposition
What do you think about adding the common way of testing plugins with storybook snapshots, located at src/plugins/expression_* and src/plugins/chart_expressions/* in the way it is organized at Canvas (possibly, add the mechanism of including additional plugins in the configuration)?
Introduction
Right now, Canvas has its own way of testing components, using storybooks. It is taking a story and comparing it to the snapshot. This way is not requiring writing jest tests. You can see the example of the configuration here: https://github.com/elastic/kibana/blob/4c07aba4a200f6a057758e17e8cc2483a3b60637/x-pack/plugins/canvas/storybook/storyshots.test.tsx#L100.
When expression renderers have started moving out from Canvas and VisEditors to the separate plugins, it has raised the need for such a way of testing components, as it is organized at Canvas.
Proposition
What do you think about adding the common way of testing plugins with storybook snapshots, located at
src/plugins/expression_*
andsrc/plugins/chart_expressions/*
in the way it is organized at Canvas (possibly, add the mechanism of including additional plugins in the configuration)?