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:
Peng Xiao
2024-02-26 14:11:24 +00:00
parent 6ccc4f1501
commit 2295685590
10 changed files with 194 additions and 53 deletions

View File

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

View File

@@ -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();
};