diff --git a/x-pack/plugins/cloud_security_posture/public/pages/configurations/configurations.test.tsx b/x-pack/plugins/cloud_security_posture/public/pages/configurations/configurations.test.tsx index 221cb998d0654..5cc82042c4727 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/configurations/configurations.test.tsx +++ b/x-pack/plugins/cloud_security_posture/public/pages/configurations/configurations.test.tsx @@ -69,7 +69,7 @@ describe('', () => { // loading findings await waitFor(() => expect(screen.getByText(/loading results/i)).toBeInTheDocument()); - expect(screen.getByText(/2 findings/i)).toBeInTheDocument(); + await waitFor(() => expect(screen.getByText(/2 findings/i)).toBeInTheDocument()); expect(screen.getByText(finding1.resource.name)).toBeInTheDocument(); expect(screen.getByText(finding1.resource.id)).toBeInTheDocument();