You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2026/10/21 09:09:28 UTC
(superset) branch feat/color-picker-consolidation updated: test(pop-kpi): assert decrease path uses custom decreaseColor
This is an automated email from the ASF dual-hosted git repository.
rusackas pushed a commit to branch feat/color-picker-consolidation
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/feat/color-picker-consolidation by this push:
new f3006199000 test(pop-kpi): assert decrease path uses custom decreaseColor
f3006199000 is described below
commit f300619900006ef33bb7fa980099b04e9813b8ea
Author: Evan Rusackas <ev...@rusackas.com>
AuthorDate: Wed Oct 21 02:09:06 2026 -0700
test(pop-kpi): assert decrease path uses custom decreaseColor
Co-Authored-By: Evan Rusackas <ev...@preset.io>
Co-Authored-By: Claude Sonnet 5.5 <no...@anthropic.com>
---
.../BigNumber/BigNumberPeriodOverPeriod/PopKPI.test.tsx | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberPeriodOverPeriod/PopKPI.test.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberPeriodOverPeriod/PopKPI.test.tsx
index d4f65e2f82a..8ab47f8c972 100644
--- a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberPeriodOverPeriod/PopKPI.test.tsx
+++ b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberPeriodOverPeriod/PopKPI.test.tsx
@@ -104,6 +104,23 @@ test('a custom increaseColor hex wins over the legacy comparisonColorScheme', ()
);
});
+test('a decrease paints the arrow and delta pill with the custom decreaseColor', () => {
+ render(
+ <PopKPI
+ {...baseProps}
+ percentDifferenceNumber={-0.2}
+ valueDifference="-20"
+ increaseColor="#336699"
+ decreaseColor="#994422"
+ />,
+ );
+
+ expect(screen.getByText('↓')).toHaveStyleRule('color', '#994422');
+ const deltaPill = screen.getByText('△');
+ expect(deltaPill).toHaveStyleRule('color', '#994422');
+ expect(deltaPill).toHaveStyleRule('background-color', '#9944221A');
+});
+
test('falls back to neutral styling when comparisonColorEnabled is false', () => {
render(
<PopKPI