diff --git a/projects/plugins/boost/_inc/overview/overview.test.tsx b/projects/plugins/boost/_inc/overview/overview.test.tsx index 8ae3ebecbdb6..b5b754c22ddf 100644 --- a/projects/plugins/boost/_inc/overview/overview.test.tsx +++ b/projects/plugins/boost/_inc/overview/overview.test.tsx @@ -448,7 +448,13 @@ test( 'retains loaded scores and Run speed test alongside a subsequent score err 'aria-busy', 'false' ); - expect( screen.getByRole( 'button', { name: 'Run speed test' } ) ).toBeEnabled(); + // The header re-enables in a later render than the notice, and a click on it while aria-disabled is ignored. + await waitFor( () => + expect( screen.getByRole( 'button', { name: 'Run speed test' } ) ).toHaveAttribute( + 'aria-disabled', + 'false' + ) + ); fireEvent.click( screen.getByRole( 'button', { name: 'Run speed test' } ) ); await waitFor( () => expect( screen.queryByText( 'Refresh failed' ) ).not.toBeInTheDocument() ); await expect( screen.findByText( '91' ) ).resolves.toBeTruthy(); diff --git a/projects/plugins/boost/changelog/fix-boost-overview-refresh-test b/projects/plugins/boost/changelog/fix-boost-overview-refresh-test new file mode 100644 index 000000000000..a3865da5a3af --- /dev/null +++ b/projects/plugins/boost/changelog/fix-boost-overview-refresh-test @@ -0,0 +1,4 @@ +Significance: patch +Type: changed +Comment: Fix a timing race in an Overview test. +