mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
refactor: move test utils to package (#3206)
This commit is contained in:
12
tests/kit/utils/editor.ts
Normal file
12
tests/kit/utils/editor.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import type { Page } from '@playwright/test';
|
||||
import { expect } from '@playwright/test';
|
||||
|
||||
export async function checkBlockHub(page: Page) {
|
||||
const box = await page.locator('affine-block-hub').boundingBox();
|
||||
if (!box) throw new Error('block-hub not found');
|
||||
await page.getByTestId('block-hub').click();
|
||||
await page.waitForTimeout(500);
|
||||
const box2 = await page.locator('affine-block-hub').boundingBox();
|
||||
if (!box2) throw new Error('block-hub not found');
|
||||
expect(box2.height).toBeGreaterThan(box.height);
|
||||
}
|
||||
Reference in New Issue
Block a user