🔥(frontend) remove custom DividerBlock

Blocknote now has a built-in divider block, so we
can remove our custom implementation.
This commit is contained in:
Anthony LC
2025-10-15 17:13:44 +02:00
parent 2003e41c22
commit aca334f81f
11 changed files with 8 additions and 153 deletions

View File

@@ -274,49 +274,6 @@ test.describe('Doc Export', () => {
expect(pdfData.text).toContain('Hello World'); // This is the pdf text
});
/**
* We cannot assert the line break is visible in the pdf, but we can assert the
* line break is visible in the editor and that the pdf is generated.
*/
test('it exports the doc with divider', async ({ page, browserName }) => {
const [randomDoc] = await createDoc(page, 'export-divider', browserName, 1);
const editor = page.locator('.ProseMirror');
await editor.click();
await editor.fill('Hello World');
// Trigger slash menu to show menu
await editor.locator('.bn-block-outer').last().fill('/');
await page.getByText('Add a horizontal line').click();
await expect(
editor.locator('.bn-block-content[data-content-type="divider"]'),
).toBeVisible();
await page
.getByRole('button', {
name: 'Export the document',
})
.click();
await expect(
page.getByTestId('doc-open-modal-download-button'),
).toBeVisible();
const downloadPromise = page.waitForEvent('download', (download) => {
return download.suggestedFilename().includes(`${randomDoc}.pdf`);
});
void page.getByTestId('doc-export-download-button').click();
const download = await downloadPromise;
expect(download.suggestedFilename()).toBe(`${randomDoc}.pdf`);
const pdfBuffer = await cs.toBuffer(await download.createReadStream());
const pdfData = await pdf(pdfBuffer);
expect(pdfData.text).toContain('Hello World');
});
test('it exports the doc with multi columns', async ({
page,
browserName,