mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
fix(component): updated at in page meta (#2277)
This commit is contained in:
@@ -81,6 +81,9 @@ export const PageDetailEditor: React.FC<PageDetailEditorProps> = ({
|
|||||||
startTransition(() => {
|
startTransition(() => {
|
||||||
setEditor(editor);
|
setEditor(editor);
|
||||||
});
|
});
|
||||||
|
page.workspace.setPageMeta(page.id, {
|
||||||
|
updatedDate: Date.now(),
|
||||||
|
});
|
||||||
onLoad?.(page, editor);
|
onLoad?.(page, editor);
|
||||||
},
|
},
|
||||||
[onLoad, setEditor]
|
[onLoad, setEditor]
|
||||||
|
|||||||
@@ -169,6 +169,7 @@ export const PageList: React.FC<PageListProps> = ({
|
|||||||
<TitleCell
|
<TitleCell
|
||||||
icon={icon}
|
icon={icon}
|
||||||
text={title || t['Untitled']()}
|
text={title || t['Untitled']()}
|
||||||
|
data-testid="title"
|
||||||
suffix={
|
suffix={
|
||||||
<FavoriteTag
|
<FavoriteTag
|
||||||
className={favorite ? '' : 'favorite-button'}
|
className={favorite ? '' : 'favorite-button'}
|
||||||
@@ -178,10 +179,18 @@ export const PageList: React.FC<PageListProps> = ({
|
|||||||
}
|
}
|
||||||
onClick={onClickPage}
|
onClick={onClickPage}
|
||||||
/>
|
/>
|
||||||
<TableCell ellipsis={true} onClick={onClickPage}>
|
<TableCell
|
||||||
|
data-testid="created-date"
|
||||||
|
ellipsis={true}
|
||||||
|
onClick={onClickPage}
|
||||||
|
>
|
||||||
{createDate}
|
{createDate}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell ellipsis={true} onClick={onClickPage}>
|
<TableCell
|
||||||
|
data-testid="updated-date"
|
||||||
|
ellipsis={true}
|
||||||
|
onClick={onClickPage}
|
||||||
|
>
|
||||||
{updatedDate ?? createDate}
|
{updatedDate ?? createDate}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
{!isPublicWorkspace && (
|
{!isPublicWorkspace && (
|
||||||
|
|||||||
11
tests/parallels/all-page.spec.ts
Normal file
11
tests/parallels/all-page.spec.ts
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
import { test } from '@playwright/test';
|
||||||
|
|
||||||
|
import { openHomePage } from '../libs/load-page';
|
||||||
|
import { waitMarkdownImported } from '../libs/page-logic';
|
||||||
|
import { clickSideBarAllPageButton } from '../libs/sidebar';
|
||||||
|
|
||||||
|
test('all page', async ({ page }) => {
|
||||||
|
await openHomePage(page);
|
||||||
|
await waitMarkdownImported(page);
|
||||||
|
await clickSideBarAllPageButton(page);
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user