mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
fix: page info ui issue on journal page (#5887)
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
/* eslint-disable unicorn/prefer-dom-node-dataset */
|
||||
import { test } from '@affine-test/kit/playwright';
|
||||
import { clickPageModeButton } from '@affine-test/kit/utils/editor';
|
||||
import { openHomePage } from '@affine-test/kit/utils/load-page';
|
||||
import {
|
||||
openHomePage,
|
||||
openJournalsPage,
|
||||
} from '@affine-test/kit/utils/load-page';
|
||||
import { dragTo, waitForEditorLoad } from '@affine-test/kit/utils/page-logic';
|
||||
import {
|
||||
addCustomProperty,
|
||||
@@ -36,6 +39,20 @@ test('allow create tag', async ({ page }) => {
|
||||
await expectTagsVisible(page, ['Test2']);
|
||||
});
|
||||
|
||||
test('allow create tag on journals page', async ({ page }) => {
|
||||
await openJournalsPage(page);
|
||||
await openTagsEditor(page);
|
||||
await searchAndCreateTag(page, 'Test1');
|
||||
await searchAndCreateTag(page, 'Test2');
|
||||
await closeTagsEditor(page);
|
||||
await expectTagsVisible(page, ['Test1', 'Test2']);
|
||||
|
||||
await openTagsEditor(page);
|
||||
await removeSelectedTag(page, 'Test1');
|
||||
await closeTagsEditor(page);
|
||||
await expectTagsVisible(page, ['Test2']);
|
||||
});
|
||||
|
||||
test('add custom property', async ({ page }) => {
|
||||
await addCustomProperty(page, 'Text');
|
||||
await addCustomProperty(page, 'Number');
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Page } from '@playwright/test';
|
||||
import { expect, type Page } from '@playwright/test';
|
||||
|
||||
export const coreUrl = 'http://localhost:8080';
|
||||
|
||||
@@ -9,3 +9,10 @@ export async function openHomePage(page: Page) {
|
||||
export async function open404Page(page: Page) {
|
||||
await page.goto(`${coreUrl}/404`);
|
||||
}
|
||||
|
||||
export async function openJournalsPage(page: Page) {
|
||||
await page.getByTestId('slider-bar-journals-button').click();
|
||||
await expect(
|
||||
page.locator('.doc-title-container:has-text("Today")')
|
||||
).toBeVisible();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user