mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-30 00:29:46 +08:00
feat(core): doc database properties (#8520)
fix AF-1454
1. move inline tags editor to components
2. add progress component
3. adjust doc properties styles for desktop
4. subscribe bs database links and display in doc info
5. move update/create dates to doc info
6. a trivial e2e test
<div class='graphite__hidden'>
<div>🎥 Video uploaded on Graphite:</div>
<a href="https://app.graphite.dev/media/video/T2klNLEk0wxLh4NRDzhk/eed266c1-fdac-4f0e-baa9-4aa00d14a2e8.mp4">
<img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/T2klNLEk0wxLh4NRDzhk/eed266c1-fdac-4f0e-baa9-4aa00d14a2e8.mp4">
</a>
</div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/eed266c1-fdac-4f0e-baa9-4aa00d14a2e8.mp4">10月23日.mp4</video>
This commit is contained in:
@@ -134,3 +134,27 @@ export const focusInlineEditor = async (page: Page) => {
|
||||
.locator('.inline-editor')
|
||||
.focus();
|
||||
};
|
||||
|
||||
export const addDatabase = async (page: Page, title?: string) => {
|
||||
await page.keyboard.press('/');
|
||||
await expect(page.locator('affine-slash-menu .slash-menu')).toBeVisible();
|
||||
await page.keyboard.type('database');
|
||||
await page.getByTestId('Table View').click();
|
||||
|
||||
if (title) {
|
||||
await page.locator('affine-database-title').click();
|
||||
await page
|
||||
.locator('affine-database-title rich-text [contenteditable]')
|
||||
.fill(title);
|
||||
await page
|
||||
.locator('affine-database-title rich-text [contenteditable]')
|
||||
.blur();
|
||||
}
|
||||
};
|
||||
|
||||
export const addDatabaseRow = async (page: Page, databaseTitle: string) => {
|
||||
const db = page.locator(`affine-database-table`, {
|
||||
has: page.locator(`affine-database-title:has-text("${databaseTitle}")`),
|
||||
});
|
||||
await db.locator('.data-view-table-group-add-row-button').click();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user