From d0aec88ca80dd0faf0a5bd453787ddc061e1c079 Mon Sep 17 00:00:00 2001 From: Ashley Harrison Date: Fri, 12 Dec 2025 15:56:57 +0000 Subject: [PATCH] "fix" PublicDashboardPageProxy tests --- .../dashboard/containers/PublicDashboardPageProxy.test.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/app/features/dashboard/containers/PublicDashboardPageProxy.test.tsx b/public/app/features/dashboard/containers/PublicDashboardPageProxy.test.tsx index 495532e5951..108b6c352d0 100644 --- a/public/app/features/dashboard/containers/PublicDashboardPageProxy.test.tsx +++ b/public/app/features/dashboard/containers/PublicDashboardPageProxy.test.tsx @@ -1,4 +1,4 @@ -import { screen, waitFor } from '@testing-library/react'; +import { act, screen, waitFor } from '@testing-library/react'; import { Routes, Route } from 'react-router-dom-v5-compat'; import { render } from 'test/test-utils'; @@ -62,7 +62,9 @@ describe('PublicDashboardPageProxy', () => { describe('when scene feature enabled', () => { it('should render PublicDashboardScenePage if publicDashboardsScene is enabled', async () => { config.featureToggles.publicDashboardsScene = true; - setup({}); + // TODO investigate why we need act + // see https://github.com/testing-library/react-testing-library/issues/1375 + await act(() => setup({})); await waitFor(() => { expect(screen.queryByTestId(PublicDashboardScene.page)).toBeInTheDocument();