Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

test: enhance 0.8.3 migration test (#4251)

Alex Yanga766279867da
diff --git a/tests/affine-legacy/0.8.3/e2e/basic.spec.ts b/tests/affine-legacy/0.8.3/e2e/basic.spec.ts
index 3e90510f35..536d6e2761 100644
--- a/tests/affine-legacy/0.8.3/e2e/basic.spec.ts
+++ b/tests/affine-legacy/0.8.3/e2e/basic.spec.ts
@@ -9,7 +9,7 @@ import {
check8080Available,
setupProxyServer,
} from '@affine-test/kit/utils/proxy';
-import { test } from '@playwright/test';
+import { expect, test } from '@playwright/test';
const { switchToNext } = setupProxyServer(
test,
@@ -32,6 +32,21 @@ test('surface migration', async ({ page, context }) => {
await page.getByTestId('switch-edgeless-mode-button').click({
delay: 50,
});
+
+ await page
+ .locator('edgeless-toolbar edgeless-toolbar-button')
+ .filter({
+ hasText: 'Pen',
+ })
+ .click({
+ delay: 50,
+ });
+ await page.mouse.move(500, 500);
+ await page.mouse.down();
+ await page.mouse.move(500, 600, {
+ steps: 10,
+ });
+ await page.mouse.up();
const url = page.url();
await switchToNext();
@@ -41,5 +56,6 @@ test('surface migration', async ({ page, context }) => {
// check edgeless mode is correct
await clickEdgelessModeButton(page);
- await page.waitForTimeout(200);
+ await expect(page.locator('edgeless-toolbar')).toBeVisible();
+ await expect(page.locator('affine-edgeless-page')).toBeVisible();
});