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
No known key found for this signature in database
GPG Key ID: 23F23D9E8B3971ED

View File

@ -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');