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 8c6913048..0ec80f1e9 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,9 +252,7 @@ describe('DocumentPreview', () => { ); // evidence PDF rendered - const elem = await screen.findByText('“Acceptance Tests” or “Acceptance Testing”', { - exact: false - }); + const elem = await screen.findByText('ART EFFECTS LIMITED'); expect(elem).toBeInTheDocument(); }, THIRTY_SECONDS diff --git a/packages/discovery-react-components/src/components/DocumentPreview/components/PdfViewer/PdfViewer.tsx b/packages/discovery-react-components/src/components/DocumentPreview/components/PdfViewer/PdfViewer.tsx index 361aa44f9..bfd729bb2 100644 --- a/packages/discovery-react-components/src/components/DocumentPreview/components/PdfViewer/PdfViewer.tsx +++ b/packages/discovery-react-components/src/components/DocumentPreview/components/PdfViewer/PdfViewer.tsx @@ -114,7 +114,7 @@ const PdfViewer = forwardRef( return promise; } catch (error) { setIsPdfRenderError?.(true); - console.error(`Failed to load pdf file: ${error}`, (error as Error).stack); + console.error(`Failed to load pdf file: ${error}`); return null; } }, [file, setIsPdfRenderError]) diff --git a/packages/discovery-react-components/src/components/DocumentPreview/components/PdfViewer/__tests__/PdfViewer.test.tsx b/packages/discovery-react-components/src/components/DocumentPreview/components/PdfViewer/__tests__/PdfViewer.test.tsx index 2411b3e2f..0599f170f 100644 --- a/packages/discovery-react-components/src/components/DocumentPreview/components/PdfViewer/__tests__/PdfViewer.test.tsx +++ b/packages/discovery-react-components/src/components/DocumentPreview/components/PdfViewer/__tests__/PdfViewer.test.tsx @@ -12,8 +12,5 @@ describe('PdfViewer', () => { await waitFor(() => expect(screen.getByText('ART EFFECTS LIMITED')).toBeVisible(), { timeout: 5000 }); - - const canvasList = document.querySelectorAll('canvas'); - expect(canvasList.length).toBe(1); - }, 30000); + }); });