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:
JimmFly
2024-10-17 13:48:45 +00:00
parent 7dae5c5dd5
commit bfb8d582ed
15 changed files with 192 additions and 90 deletions

View File

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