mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-17 22:37:04 +08:00
test(editor): move blocksuite test to tests folder (#10917)
This commit is contained in:
25
tests/blocksuite/e2e/utils/actions/block.ts
Normal file
25
tests/blocksuite/e2e/utils/actions/block.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
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.note.updateBlockType,
|
||||
{
|
||||
flavour,
|
||||
props: {
|
||||
type,
|
||||
},
|
||||
}
|
||||
);
|
||||
},
|
||||
[flavour, type] as [string, string?]
|
||||
);
|
||||
await waitNextFrame(page, 400);
|
||||
}
|
||||
Reference in New Issue
Block a user