This is an automated email from the ASF dual-hosted git repository. enzomartellucci pushed a commit to branch enxdev/fix/chart-error-alerts in repository https://gitbox.apache.org/repos/asf/superset.git
commit 148c545724924049cc15e4fde5b4441fce99fe85 Author: Enzo Martellucci <[email protected]> AuthorDate: Mon Feb 16 15:21:26 2026 +0100 test(dashboard): add test verifying dashboard chart error banners are not dismissible --- .../components/gridComponents/Chart/Chart.test.tsx | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/superset-frontend/src/dashboard/components/gridComponents/Chart/Chart.test.tsx b/superset-frontend/src/dashboard/components/gridComponents/Chart/Chart.test.tsx index c4ba8646538..822fdf754c9 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/Chart/Chart.test.tsx +++ b/superset-frontend/src/dashboard/components/gridComponents/Chart/Chart.test.tsx @@ -370,6 +370,31 @@ test('should fallback to formData state when runtime state not available', () => expect(getByTestId('chart-container')).toBeInTheDocument(); }); +test('should not show a close button on chart error banners', () => { + const { queryByRole } = setup( + {}, + { + ...defaultState, + charts: { + ...defaultState.charts, + [queryId]: { + ...defaultState.charts[queryId], + chartStatus: 'failed', + chartAlert: 'Something went wrong', + queriesResponse: [ + { + message: 'Something went wrong', + errors: [], + }, + ], + }, + }, + }, + ); + + expect(queryByRole('button', { name: 'Close' })).not.toBeInTheDocument(); +}); + test('should handle chart state when no converter exists', () => { jest .spyOn(chartStateConverter, 'hasChartStateConverter')
