mirror of
https://github.com/suitenumerique/docs.git
synced 2026-04-26 01:25:05 +02:00
✅(export) add PDF regression tests
To avoid regression issues in PDF export functionality, this commit introduces end-to-end tests that compare exported PDFs against known good reference files. We compare the PDF on most of the blocks that the editor supports. If during a Blocknote release or pull request there are intentional changes, the reference files would need to be updated accordingly. It can be done by uncommenting the line in the test that saves the newly generated PDF to the assets folder.
This commit is contained in:
@@ -42,8 +42,8 @@ test.describe('Doc Version', () => {
|
||||
// Write more
|
||||
await writeInEditor({ page, text: 'It will create a version' });
|
||||
|
||||
await openSuggestionMenu({ page });
|
||||
await page.getByText('Add a callout block').click();
|
||||
const { suggestionMenu } = await openSuggestionMenu({ page });
|
||||
await suggestionMenu.getByText('Add a callout block').click();
|
||||
|
||||
const calloutBlock = page
|
||||
.locator('div[data-content-type="callout"]')
|
||||
|
||||
Reference in New Issue
Block a user