fix: page properties flaky tests (#5893)

This commit is contained in:
Peng Xiao
2024-02-23 14:14:41 +00:00
parent 9e7406e0a1
commit c16e4d4464
+10 -2
View File
@@ -5,7 +5,12 @@ import {
openHomePage, openHomePage,
openJournalsPage, openJournalsPage,
} from '@affine-test/kit/utils/load-page'; } 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 { import {
addCustomProperty, addCustomProperty,
changePropertyVisibility, changePropertyVisibility,
@@ -23,7 +28,8 @@ import { expect } from '@playwright/test';
test.beforeEach(async ({ page }) => { test.beforeEach(async ({ page }) => {
await openHomePage(page); await openHomePage(page);
await clickPageModeButton(page); await clickPageModeButton(page);
await waitForEditorLoad(page); await clickNewPageButton(page);
await waitForEmptyEditor(page);
}); });
test('allow create tag', async ({ 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 }) => { test('allow create tag on journals page', async ({ page }) => {
await openJournalsPage(page); await openJournalsPage(page);
await waitForEditorLoad(page);
await openTagsEditor(page); await openTagsEditor(page);
await searchAndCreateTag(page, 'Test1'); await searchAndCreateTag(page, 'Test1');
await searchAndCreateTag(page, 'Test2'); await searchAndCreateTag(page, 'Test2');