fix wrong order of col settings computations #28783
GitHub Actions / JUnit Test Report be-tests-mongo-5-0-ee
succeeded
Jun 18, 2024 in 1s
5120 passed, 1 failed and 0 skipped
Annotations
Check failure on line 0 in target/junit/metabase.pulse.render.body_test.xml
github-actions / JUnit Test Report be-tests-mongo-5-0-ee
metabase.pulse.render.body-test ► render-pie-chart-test
Failed test found in:
target/junit/metabase.pulse.render.body_test.xml
Error:
body_test.clj:577
Raw output
body_test.clj:577
[PRO TIP] If this test fails, you may need to rebuild the bundle with `yarn build-static-viz`
The static-viz pie chart renders correctly.
using test-data dataset
with temporary :model/Card with attributes
{:creator_id 1,
:database_id 1,
:dataset_query
{:database 1,
:type :query,
:query {:source-table 7, :aggregation [[:count]], :breakout [[:field 47 {:base-type :type/Text}]]}},
:display :pie,
:name "not-a-crumble",
:visualization_settings
{:pie.colors {:Doohickey "honeydew", :Gadget "slategray", :Gizmo "goldenrod", :Widget "hotpink"}},
:created_at #t "2024-06-18T20:09:40.989622Z[UTC]",
:updated_at #t "2024-06-18T20:09:40.989623Z[UTC]"}
with temporary :model/Card with attributes
{:creator_id 1,
:database_id 1,
:dataset_query
{:database 1,
:type :query,
:query {:source-table 7, :aggregation [[:count]], :breakout [[:field 47 {:base-type :type/Text}]]}},
:display :pie,
:name "maybe-a-donut",
:visualization_settings
{:pie.show_legend false,
:pie.show_total false,
:pie.colors {:Doohickey "honeydew", :Gadget "slategray", :Gizmo "goldenrod", :Widget "hotpink"}},
:created_at #t "2024-06-18T20:09:41.015293Z[UTC]",
:updated_at #t "2024-06-18T20:09:41.015294Z[UTC]"}
Renders with legend and 'total'.
expected: (=
expectations
{:legend-els-colours legend-elements, :slice-els-colours slice-elements, :total-els-text total-elements})
actual: (not
(=
{:legend-els-colours ["honeydew" "slategray" "goldenrod" "hotpink"],
:slice-els-colours ["honeydew" "slategray" "goldenrod" "hotpink"],
:total-els-text ["TOTAL"]}
{:legend-els-colours ("honeydew" "goldenrod" "slategray" "hotpink"),
:slice-els-colours ("honeydew" "slategray" "goldenrod" "hotpink"),
:total-els-text ("TOTAL")}))
Loading