mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-24 09:52:49 +08:00
chore(editor): improve selection of doc in canvas (#11314)
Close [BS-2705](https://linear.app/affine-design/issue/BS-2705/[improvement]-通过-viability-control-选择-hide-in-edgeless) This PR disabled selecting operation of notes that are only shown in page mode.
This commit is contained in:
@@ -320,9 +320,10 @@ test.describe('TOC and edgeless selection', () => {
|
||||
expect(await getEdgelessSelectedIds(page)).toHaveLength(0);
|
||||
|
||||
await cards.nth(1).click();
|
||||
expect(await getEdgelessSelectedIds(page)).toHaveLength(1);
|
||||
await cards.nth(1).click();
|
||||
expect(await getEdgelessSelectedIds(page)).toHaveLength(0);
|
||||
expect(
|
||||
await getEdgelessSelectedIds(page),
|
||||
'should not select doc only note'
|
||||
).toHaveLength(0);
|
||||
|
||||
await cards.nth(2).click();
|
||||
expect(await getEdgelessSelectedIds(page)).toHaveLength(1);
|
||||
@@ -333,7 +334,7 @@ test.describe('TOC and edgeless selection', () => {
|
||||
await cards.nth(1).click({ modifiers: ['Shift'] });
|
||||
await cards.nth(2).click({ modifiers: ['Shift'] });
|
||||
|
||||
expect(await getEdgelessSelectedIds(page)).toHaveLength(3);
|
||||
expect(await getEdgelessSelectedIds(page)).toHaveLength(2);
|
||||
});
|
||||
|
||||
test('should select note cards when select note blocks in canvas', async ({
|
||||
|
||||
Reference in New Issue
Block a user