Skip to content

Commit

Permalink
test: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jhpedemonte committed Jul 23, 2024
1 parent cd3a6bd commit 23edf34
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const PdfViewer = forwardRef<any, PdfViewerProps>(
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])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});

0 comments on commit 23edf34

Please sign in to comment.