mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-19 00:10:39 +08:00
feat: enhance markdown preview for backlinks (#8956)
fix AF-1770 fix AF-1771 --- fix: doc link middlewares feat: markdown renderer feat: allow multiple backlink for a single doc feat: showing correct doc ref link feat: trim long para & ident lists feat: list indentition fix feat: database/latext handling feat: other block types handling fix: lint
This commit is contained in:
@@ -7,6 +7,7 @@ import { coreUrl, openHomePage } from '@affine-test/kit/utils/load-page';
|
||||
import {
|
||||
clickNewPageButton,
|
||||
createLinkedPage,
|
||||
getBlockSuiteEditorTitle,
|
||||
waitForEmptyEditor,
|
||||
} from '@affine-test/kit/utils/page-logic';
|
||||
import { expect, type Locator } from '@playwright/test';
|
||||
@@ -418,3 +419,31 @@ test('@ popover with click "select a specific date" should show a date picker',
|
||||
page.locator('affine-reference:has-text("' + date + '")')
|
||||
).toBeVisible();
|
||||
});
|
||||
|
||||
test('linked doc should show markdown preview in the backlink section', async ({
|
||||
page,
|
||||
}) => {
|
||||
await waitForEmptyEditor(page);
|
||||
await page.keyboard.type('source page');
|
||||
await page.keyboard.press('Enter');
|
||||
|
||||
await page.keyboard.type('some inline content');
|
||||
await page.keyboard.press('Enter');
|
||||
|
||||
await createLinkedPage(page, 'Test Page');
|
||||
await page.locator('affine-reference:has-text("Test Page")').click();
|
||||
|
||||
await expect(getBlockSuiteEditorTitle(page)).toHaveText('Test Page');
|
||||
await page
|
||||
.getByRole('button', {
|
||||
name: 'Show',
|
||||
})
|
||||
.click();
|
||||
|
||||
await page.getByRole('button', { name: 'source page' }).click();
|
||||
|
||||
await expect(page.locator('text-renderer')).toContainText(
|
||||
'some inline content'
|
||||
);
|
||||
await expect(page.locator('text-renderer')).toContainText('Test Page');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user