mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
@@ -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);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user