refactor(core): use fractional indexing for sorting (#5809)

use https://github.com/rocicorp/fractional-indexing to enable better sorting logic for crdt app
This commit is contained in:
Peng Xiao
2024-02-22 09:37:59 +00:00
parent 372b4da884
commit 2df8f29b64
8 changed files with 157 additions and 74 deletions

View File

@@ -241,3 +241,45 @@ test('create a required property', async ({ page }) => {
)
).toContainText('Required');
});
test('delete a required property', async ({ page }) => {
await openWorkspaceProperties(page);
await addCustomProperty(page, 'Text', true);
await page
.locator('[data-testid="custom-property-row"]:has-text("Text")')
.getByRole('button')
.click();
await page
.getByRole('menuitem', {
name: 'Set as required property',
})
.click();
await page
.locator('[data-testid="custom-property-row"]:has-text("Text")')
.getByRole('button')
.click();
await page
.getByRole('menuitem', {
name: 'Delete property',
})
.click();
await page
.getByRole('button', {
name: 'Confirm',
})
.click();
// close workspace settings
await page.keyboard.press('Escape');
await waitForEditorLoad(page);
// check if the property is removed from page properties
await expect(
page.locator('[data-testid="page-property-row-name"]:has-text("Text")')
).not.toBeVisible();
});