rusackas opened a new pull request, #40821:
URL: https://github.com/apache/superset/pull/40821

   ### SUMMARY
   
   This is a **test-only PR** opened as a TDD-style validation of issue #28766.
   
   #28766 reports that a Gauge chart configured with interval bounds and 
interval colors (mapped to a categorical color scheme) **sometimes renders the 
wrong interval colors** when first loaded on a dashboard — refreshing the page 
fixes it.
   
   The gauge renders to a `<canvas>`, so this Playwright spec reads the 
rendered pixels back and asserts the configured color-scheme mapping is 
honored. With `color_scheme: supersetColors` and `interval_color_indices: 
'1,2'`, the gauge axis must paint the scheme's 1st (`#1FA8C9`) and 2nd 
(`#454E7C`) colors and must **not** paint the 3rd (`#5AC189`) — painting a 
shifted/fallback palette is exactly the reported symptom.
   
   1. **`Gauge renders configured interval colors on a dashboard (#28766)`** — 
loads the gauge on a dashboard and asserts the interval colors from the 
configured palette indices are present (and the unused index is absent).
   
   **Status:** on current `master` the gauge paints the configured colors on 
first load in this scenario (the test passes), so it validates the mapping and 
locks in a regression guard. Because the original report is intermittent 
("sometimes"), this deterministic pixel check is intentionally non-flaky: it 
asserts the *correct* mapping rather than trying to provoke the race, so it 
fails reliably if a regression shifts the palette.
   
   ### How to interpret CI
   
   - **CI green** → the gauge paints the configured interval colors; merging 
closes #28766 and guards against regressions.
   - **CI red** → the interval colors are wrong; the bug is live in 
`superset-frontend/plugins/plugin-chart-echarts/src/Gauge` (color-scheme 
resolution / interval-color mapping).
   
   ### TESTING INSTRUCTIONS
   
   ```bash
   cd superset-frontend
   npx playwright test playwright/tests/dashboard/gauge-interval-colors.spec.ts
   ```
   
   ### ADDITIONAL INFORMATION
   
   - [x] Has associated issue: closes #28766
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to