feat: add support for exporting pdf and png (#2588)

This closes #2583.
This commit is contained in:
fourdim
2023-05-30 14:04:35 +08:00
committed by GitHub
parent 4175f5391e
commit fa089de40d
12 changed files with 257 additions and 2 deletions

View File

@@ -126,3 +126,16 @@ export async function getMetas(page: Page): Promise<PageMeta[]> {
() => globalThis.currentWorkspace.blockSuiteWorkspace.meta.pageMetas ?? []
);
}
export async function waitForLogMessage(
page: Page,
log: string
): Promise<boolean> {
return new Promise(resolve => {
page.on('console', msg => {
if (msg.type() === 'log' && msg.text() === log) {
resolve(true);
}
});
});
}