mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-18 18:46:19 +08:00
fix: dock to blocksuite latest API (#2219)
This commit is contained in:
@@ -92,9 +92,13 @@ beforeEach(async () => {
|
||||
const frameId = page.addBlock('affine:frame', {}, pageBlockId);
|
||||
page.addBlock('affine:paragraph', {}, frameId);
|
||||
};
|
||||
initPage(blockSuiteWorkspace.createPage('page0'));
|
||||
initPage(blockSuiteWorkspace.createPage('page1'));
|
||||
initPage(blockSuiteWorkspace.createPage('page2'));
|
||||
initPage(
|
||||
blockSuiteWorkspace.createPage({
|
||||
id: 'page0',
|
||||
})
|
||||
);
|
||||
initPage(blockSuiteWorkspace.createPage({ id: 'page1' }));
|
||||
initPage(blockSuiteWorkspace.createPage({ id: 'page2' }));
|
||||
});
|
||||
|
||||
describe('usePageMetas', async () => {
|
||||
|
||||
@@ -32,7 +32,7 @@ export function useAppHelper() {
|
||||
ws => ws.id === workspaceId
|
||||
) as LocalWorkspace;
|
||||
if (workspace && 'blockSuiteWorkspace' in workspace) {
|
||||
workspace.blockSuiteWorkspace.createPage(pageId);
|
||||
workspace.blockSuiteWorkspace.createPage({ id: pageId });
|
||||
} else {
|
||||
throw new Error('cannot create page. blockSuiteWorkspace not found');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user