diff --git a/packages/discovery-react-components/src/components/DocumentPreview/__tests__/DocumentPreview.test.tsx b/packages/discovery-react-components/src/components/DocumentPreview/__tests__/DocumentPreview.test.tsx index 231b3b8b..e1216403 100644 --- a/packages/discovery-react-components/src/components/DocumentPreview/__tests__/DocumentPreview.test.tsx +++ b/packages/discovery-react-components/src/components/DocumentPreview/__tests__/DocumentPreview.test.tsx @@ -252,7 +252,10 @@ describe('DocumentPreview', () => { ); // evidence PDF rendered - const elem = await screen.findByText('ART EFFECTS LIMITED', {}, { timeout: 5000 }); + let elem = await screen.findByText('ART EFFECTS LIMITED', {}, { timeout: 5000 }); + expect(elem).toBeInTheDocument(); + // check that 58 pages were found + elem = await screen.findByText('58 pages', { exact: false }); expect(elem).toBeInTheDocument(); }, THIRTY_SECONDS