Files
superset2/superset-frontend/plugins/plugin-chart-country-map/test/plugin/transformProps.test.ts
Evan Rusackas 52dfc853d2 test(country-map): transformProps + buildQuery tests
transformProps tests cover the URL-derivation logic — the core piece
that maps form_data into the right build-pipeline output:

- Admin 0 + worldview → world choropleth URL
- Admin 1 + country → per-country file
- Region set + country → regional aggregation
- Composite overrides admin level + country
- Worldview defaults to 'ukr' when not specified
- Different worldviews reflected in URL
- Admin 1 without country → null URL (chart UI prompts)
- Pass-through of metricName/numberFormat/linearColorScheme
- Pass-through of query data + width/height

buildQuery tests cover that we're producing a valid chart/data
QueryContext with the expected shape (one query, form_data preserved,
orderby normalized as array).

These are the units most likely to break silently if someone refactors
the form_data → URL mapping or the query layer.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 17:01:25 -07:00

4.0 KiB