mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-24 04:27:27 +08:00
fix: page info styles (#5910)
fix inconsistent styles compared to the one defined in figma fix https://github.com/toeverything/AFFiNE/issues/5904 fix https://github.com/toeverything/AFFiNE/issues/5903
This commit is contained in:
@@ -16,6 +16,7 @@ import {
|
||||
changePropertyVisibility,
|
||||
clickPropertyValue,
|
||||
closeTagsEditor,
|
||||
ensurePagePropertiesVisible,
|
||||
expectTagsVisible,
|
||||
getPropertyValueLocator,
|
||||
openTagsEditor,
|
||||
@@ -30,6 +31,7 @@ test.beforeEach(async ({ page }) => {
|
||||
await clickPageModeButton(page);
|
||||
await clickNewPageButton(page);
|
||||
await waitForEmptyEditor(page);
|
||||
await ensurePagePropertiesVisible(page);
|
||||
});
|
||||
|
||||
test('allow create tag', async ({ page }) => {
|
||||
@@ -48,6 +50,7 @@ test('allow create tag', async ({ page }) => {
|
||||
test('allow create tag on journals page', async ({ page }) => {
|
||||
await openJournalsPage(page);
|
||||
await waitForEditorLoad(page);
|
||||
await ensurePagePropertiesVisible(page);
|
||||
|
||||
await openTagsEditor(page);
|
||||
await searchAndCreateTag(page, 'Test1');
|
||||
|
||||
@@ -126,6 +126,7 @@ export const createPageWithTag = async (
|
||||
await clickNewPageButton(page);
|
||||
await getBlockSuiteEditorTitle(page).click();
|
||||
await getBlockSuiteEditorTitle(page).fill('test page');
|
||||
await page.getByTestId('page-info-collapse').click();
|
||||
await page
|
||||
.locator('[data-testid="page-property-row"][data-property="tags"]')
|
||||
.click();
|
||||
|
||||
@@ -6,6 +6,19 @@ export const getPropertyValueLocator = (page: Page, property: string) => {
|
||||
);
|
||||
};
|
||||
|
||||
export const ensurePagePropertiesVisible = async (page: Page) => {
|
||||
if (
|
||||
await page
|
||||
.getByRole('button', {
|
||||
name: 'Add property',
|
||||
})
|
||||
.isVisible()
|
||||
) {
|
||||
return;
|
||||
}
|
||||
await page.getByTestId('page-info-collapse').click();
|
||||
};
|
||||
|
||||
export const clickPropertyValue = async (page: Page, property: string) => {
|
||||
await getPropertyValueLocator(page, property).click();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user