refactor(core): doc property (#8465)
doc property upgraded to use orm. The visibility of the property are simplified to three types: `always show`, `always hide`, `hide when empty`, and the default is `always show`.  Added a sidebar view to manage properties  new property ui in workspace settings  Property lists can be collapsed 
This commit is contained in:
@@ -44,8 +44,6 @@ test('New a page and open it ,then open info modal in the title bar', async ({
|
||||
|
||||
const infoModal = page.getByTestId('info-modal');
|
||||
await expect(infoModal).toBeVisible();
|
||||
const tagRow = page.getByTestId('info-modal-tags-row');
|
||||
await expect(tagRow).toBeVisible();
|
||||
const title = page.getByTestId('info-modal-title');
|
||||
await expect(title).toHaveText('this is a new page');
|
||||
});
|
||||
@@ -58,8 +56,6 @@ test('New a page and open it ,then open info modal in the title bar more action
|
||||
|
||||
const infoModal = page.getByTestId('info-modal');
|
||||
await expect(infoModal).toBeVisible();
|
||||
const tagRow = page.getByTestId('info-modal-tags-row');
|
||||
await expect(tagRow).toBeVisible();
|
||||
const title = page.getByTestId('info-modal-title');
|
||||
await expect(title).toHaveText('this is a new page');
|
||||
});
|
||||
@@ -75,8 +71,6 @@ test('New a page, then open info modal from all doc', async ({ page }) => {
|
||||
|
||||
const infoModal = page.getByTestId('info-modal');
|
||||
await expect(infoModal).toBeVisible();
|
||||
const tagRow = page.getByTestId('info-modal-tags-row');
|
||||
await expect(tagRow).toBeVisible();
|
||||
const title = page.getByTestId('info-modal-title');
|
||||
await expect(title).toHaveText('this is a new page');
|
||||
});
|
||||
@@ -105,8 +99,6 @@ test('New a page and add to favourites, then open info modal from sidebar', asyn
|
||||
|
||||
const infoModal = page.getByTestId('info-modal');
|
||||
await expect(infoModal).toBeVisible();
|
||||
const tagRow = page.getByTestId('info-modal-tags-row');
|
||||
await expect(tagRow).toBeVisible();
|
||||
const title = page.getByTestId('info-modal-title');
|
||||
await expect(title).toHaveText('this is a new page');
|
||||
});
|
||||
@@ -116,16 +108,16 @@ test('allow create tag', async ({ page }) => {
|
||||
|
||||
const infoModal = page.getByTestId('info-modal');
|
||||
await expect(infoModal).toBeVisible();
|
||||
await page.getByTestId('info-modal-tags-value').click();
|
||||
await infoModal.getByTestId('property-tags-value').click();
|
||||
await searchAndCreateTag(page, 'Test1');
|
||||
await searchAndCreateTag(page, 'Test2');
|
||||
await closeTagsEditor(page);
|
||||
await expectTagsVisible(page, ['Test1', 'Test2']);
|
||||
await expectTagsVisible(infoModal, ['Test1', 'Test2']);
|
||||
|
||||
await page.getByTestId('info-modal-tags-value').click();
|
||||
await infoModal.getByTestId('property-tags-value').click();
|
||||
await removeSelectedTag(page, 'Test1');
|
||||
await closeTagsEditor(page);
|
||||
await expectTagsVisible(page, ['Test2']);
|
||||
await expectTagsVisible(infoModal, ['Test2']);
|
||||
});
|
||||
|
||||
test('add custom property', async ({ page }) => {
|
||||
@@ -133,10 +125,10 @@ test('add custom property', async ({ page }) => {
|
||||
|
||||
const infoModal = page.getByTestId('info-modal');
|
||||
await expect(infoModal).toBeVisible();
|
||||
await addCustomProperty(page, 'Text');
|
||||
await addCustomProperty(page, 'Number');
|
||||
await addCustomProperty(page, 'Date');
|
||||
await addCustomProperty(page, 'Checkbox');
|
||||
await addCustomProperty(page, 'Created by');
|
||||
await addCustomProperty(page, 'Last edited by');
|
||||
await addCustomProperty(page, infoModal, 'text');
|
||||
await addCustomProperty(page, infoModal, 'number');
|
||||
await addCustomProperty(page, infoModal, 'date');
|
||||
await addCustomProperty(page, infoModal, 'checkbox');
|
||||
await addCustomProperty(page, infoModal, 'createdBy');
|
||||
await addCustomProperty(page, infoModal, 'updatedBy');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user