Fix flaky vega screenshot test #33187
Labels
failed-test
A test failure on a tracked branch, potentially flaky-test
Feature:Vega
Vega visualizations
Feature:Visualizations
Generic visualization features (in case no more specific feature label is available)
skipped-test
Team:Visualizations
Visualization editors, elastic-charts and infrastructure
test_ui_functional
test
#32749 introduced a screenshot-based functional test for validating the output of vega visualizations. this test was subsequently skipped in #33074 due to flakyness.
most other functional tests for visualizations rely on tabular data from the inspector to assert that the right data are being displayed, but since vega doesn't have inspector, this isn't an option.
the other place we are are using screenshot tests is in the dashboard, where we have the option of using full screen mode to maintain focus on the visualization without worrying about things like the nav evolving over time. unfortunately, full screen isn't an option within the visualize editor.
what we've tried:
canvas.toDataUrl()
and compare the base64-encoded output. in initial testing, this proved problematic as it seemed rendering the vis with the same filters didn't always reproduce the exact same encoded output... though might be worth revisiting to test further.The text was updated successfully, but these errors were encountered: