mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-09 21:25:45 +08:00
chore(editor): fix imports in legacy tests (#10300)
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import type { Page } from '@playwright/test';
|
||||
|
||||
import { waitNextFrame } from './misc.js';
|
||||
|
||||
export async function updateBlockType(
|
||||
page: Page,
|
||||
flavour: string,
|
||||
type?: string
|
||||
) {
|
||||
await page.evaluate(
|
||||
([flavour, type]) => {
|
||||
window.host.std.command.exec(window.$blocksuite.blocks.updateBlockType, {
|
||||
flavour,
|
||||
props: {
|
||||
type,
|
||||
},
|
||||
});
|
||||
},
|
||||
[flavour, type] as [string, string?]
|
||||
);
|
||||
await waitNextFrame(page, 400);
|
||||
}
|
||||
Reference in New Issue
Block a user