mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 20:38:52 +00:00
feat(core): set doc mode and primary doc mode separately (#8359)
https://github.com/user-attachments/assets/98c282f2-4c53-475f-bf10-936a626c2630
This commit is contained in:
@@ -93,11 +93,36 @@ export const clickAddPropertyButton = async (root: Locator | Page) => {
|
||||
.click();
|
||||
};
|
||||
|
||||
export const ensureAddPropertyButtonVisible = async (
|
||||
page: Page,
|
||||
root: Locator | Page
|
||||
) => {
|
||||
if (
|
||||
await root
|
||||
.getByRole('button', {
|
||||
name: 'Add property',
|
||||
})
|
||||
.isVisible()
|
||||
) {
|
||||
return;
|
||||
}
|
||||
await togglePropertyListVisibility(page);
|
||||
await page.waitForTimeout(500);
|
||||
await expect(
|
||||
root.getByRole('button', { name: 'Add property' })
|
||||
).toBeVisible();
|
||||
};
|
||||
|
||||
export const togglePropertyListVisibility = async (page: Page) => {
|
||||
await page.getByTestId('property-collapsible-button').click();
|
||||
};
|
||||
|
||||
export const addCustomProperty = async (
|
||||
page: Page,
|
||||
root: Locator | Page,
|
||||
type: string
|
||||
) => {
|
||||
ensureAddPropertyButtonVisible(page, root);
|
||||
await clickAddPropertyButton(root);
|
||||
await page
|
||||
.locator(
|
||||
|
||||
Reference in New Issue
Block a user