From 635b7a6a4d4ef2267cb3377abdac161a6a51ebea Mon Sep 17 00:00:00 2001 From: Elizabeth Thompson Date: Fri, 3 Oct 2025 16:51:56 -0700 Subject: [PATCH] fix(loading): improve loading screen theming for dark mode support (#35129) Co-authored-by: Claude --- .../chart/components/SuperChartCore.test.tsx | 8 ++++++- .../FiltersConfigModal.test.tsx | 6 ++--- superset/templates/superset/spa.html | 22 ++++++++++++++----- 3 files changed, 26 insertions(+), 10 deletions(-) diff --git a/superset-frontend/packages/superset-ui-core/test/chart/components/SuperChartCore.test.tsx b/superset-frontend/packages/superset-ui-core/test/chart/components/SuperChartCore.test.tsx index 454319dc301..c026099d13a 100644 --- a/superset-frontend/packages/superset-ui-core/test/chart/components/SuperChartCore.test.tsx +++ b/superset-frontend/packages/superset-ui-core/test/chart/components/SuperChartCore.test.tsx @@ -203,7 +203,13 @@ describe('SuperChartCore', () => { ); await waitFor(() => { - expect(container).toBeEmptyDOMElement(); + // Should not render any chart content, only the antd App wrapper + expect( + container.querySelector('.test-component'), + ).not.toBeInTheDocument(); + expect( + container.querySelector('[data-test="chart-container"]'), + ).not.toBeInTheDocument(); }); }); }); diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.test.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.test.tsx index 6995a0747d9..01c50755fff 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.test.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.test.tsx @@ -346,9 +346,9 @@ test('validates the pre-filter value', async () => { jest.runOnlyPendingTimers(); jest.useRealTimers(); - await waitFor(() => { - expect(screen.getByText(PRE_FILTER_REQUIRED_REGEX)).toBeInTheDocument(); - }); + expect( + await screen.findByText(PRE_FILTER_REQUIRED_REGEX), + ).toBeInTheDocument(); }, 50000); // Slow-running test, increase timeout to 50 seconds. // eslint-disable-next-line jest/no-disabled-tests diff --git a/superset/templates/superset/spa.html b/superset/templates/superset/spa.html index 5352b16efae..787ed882561 100644 --- a/superset/templates/superset/spa.html +++ b/superset/templates/superset/spa.html @@ -30,6 +30,20 @@ {% block head_meta %}{% endblock %} + + {% block head_css %} {% for favicon in favicons %} Loading... - {% else %} - -
- Loading... -
{% endif %} {% endblock %}