From 334aa1a67216037fcda501f5c814abe8ae0658d3 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Sat, 12 Apr 2025 14:04:41 -0700 Subject: [PATCH] fix a unit test --- .../plugin-chart-table/test/TableChart.test.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/superset-frontend/plugins/plugin-chart-table/test/TableChart.test.tsx b/superset-frontend/plugins/plugin-chart-table/test/TableChart.test.tsx index f3a24d24f63..30caeb811cf 100644 --- a/superset-frontend/plugins/plugin-chart-table/test/TableChart.test.tsx +++ b/superset-frontend/plugins/plugin-chart-table/test/TableChart.test.tsx @@ -447,7 +447,9 @@ describe('plugin-chart-table', () => { expect(getComputedStyle(screen.getByTitle('2467063')).background).toBe( 'rgba(172, 225, 196, 1)', ); - expect(getComputedStyle(screen.getByTitle('2467')).background).toBe(''); + expect(getComputedStyle(screen.getByTitle('2467')).background).toBe( + 'rgb(255, 255, 255)', + ); }); it('render cell without color', () => { @@ -487,9 +489,11 @@ describe('plugin-chart-table', () => { 'rgba(172, 225, 196, 0.812)', ); expect(getComputedStyle(screen.getByTitle('2467063')).background).toBe( - '', + 'rgb(255, 255, 255)', + ); + expect(getComputedStyle(screen.getByText('N/A')).background).toBe( + 'rgb(255, 255, 255)', ); - expect(getComputedStyle(screen.getByText('N/A')).background).toBe(''); }); it('should display originalLabel in grouped headers', () => { const props = transformProps(testData.comparison);