test(mobile): basic e2e tests (#8031)

fix AF-1289

1. tested on 'webkit'
2. a few baseline test cases
This commit is contained in:
pengx17
2024-09-02 10:20:23 +00:00
parent 41d35fdafd
commit 61e37d8873
22 changed files with 320 additions and 16 deletions

24
tests/kit/mobile.ts Normal file
View File

@@ -0,0 +1,24 @@
import { expect } from '@playwright/test';
import { test as baseTest } from './playwright';
type CurrentDocCollection = {
meta: { id: string; flavour: string };
};
export const test = baseTest.extend<{
workspace: {
current: () => Promise<CurrentDocCollection>;
};
}>({
page: async ({ page }, use) => {
await page.goto('/');
await expect(
page.locator('.affine-page-viewport[data-mode="edgeless"]')
).toBeVisible({
timeout: 30 * 1000,
});
await page.goto('/');
await use(page);
},
});