refactor: move test utils to package (#3206)

This commit is contained in:
Alex Yang
2023-07-13 17:05:01 +08:00
committed by GitHub
parent 4f5ed30298
commit 0230cea16e
61 changed files with 199 additions and 551 deletions
@@ -0,0 +1,12 @@
import { test } from '@affine-test/kit/playwright';
import { expect } from '@playwright/test';
test('should have page0', async ({ page }) => {
await page.goto('http://localhost:8080/_debug/init-page.html');
await page.waitForSelector('v-line');
const pageId = await page.evaluate(async () => {
// @ts-expect-error
return globalThis.page.id;
});
expect(pageId).toBe('page0');
});