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.

fix: page properties flaky tests (#5893)

Peng Xiaoc16e4d4464e1
diff --git a/tests/affine-local/e2e/page-properties.spec.ts b/tests/affine-local/e2e/page-properties.spec.ts
index 9f5c278a3b..bbbd4eb8b3 100644
--- a/tests/affine-local/e2e/page-properties.spec.ts
+++ b/tests/affine-local/e2e/page-properties.spec.ts
@@ -5,7 +5,12 @@ import {
openHomePage,
openJournalsPage,
} from '@affine-test/kit/utils/load-page';
-import { dragTo, waitForEditorLoad } from '@affine-test/kit/utils/page-logic';
+import {
+ clickNewPageButton,
+ dragTo,
+ waitForEditorLoad,
+ waitForEmptyEditor,
+} from '@affine-test/kit/utils/page-logic';
import {
addCustomProperty,
changePropertyVisibility,
@@ -23,7 +28,8 @@ import { expect } from '@playwright/test';
test.beforeEach(async ({ page }) => {
await openHomePage(page);
await clickPageModeButton(page);
- await waitForEditorLoad(page);
+ await clickNewPageButton(page);
+ await waitForEmptyEditor(page);
});
test('allow create tag', async ({ page }) => {
@@ -41,6 +47,8 @@ test('allow create tag', async ({ page }) => {
test('allow create tag on journals page', async ({ page }) => {
await openJournalsPage(page);
+ await waitForEditorLoad(page);
+
await openTagsEditor(page);
await searchAndCreateTag(page, 'Test1');
await searchAndCreateTag(page, 'Test2');