mirror of
https://github.com/laurent22/joplin.git
synced 2026-05-06 22:40:35 -05:00
@@ -91,6 +91,7 @@ function FolderItem(props: FolderItemProps) {
|
||||
isConflictFolder={folderId === Folder.conflictFolderId()}
|
||||
selected={selected}
|
||||
shareId={shareId}
|
||||
data-folder-id={folderId}
|
||||
onDoubleClick={onFolderToggleClick_}
|
||||
|
||||
onClick={() => {
|
||||
|
||||
@@ -101,4 +101,25 @@ test.describe('sidebar', () => {
|
||||
await expect(mainWindow.getByText('Another note in Folder A')).toBeAttached();
|
||||
await expect(mainWindow.getByText('A note in Folder B')).toBeAttached();
|
||||
});
|
||||
|
||||
test('double-clicking should collapse/expand folders in the sidebar', async ({ mainWindow }) => {
|
||||
const mainScreen = await new MainScreen(mainWindow).setup();
|
||||
const sidebar = mainScreen.sidebar;
|
||||
|
||||
const testFolderA = await sidebar.createNewFolder('Folder A');
|
||||
const testFolderB = await sidebar.createNewFolder('Folder B');
|
||||
|
||||
// Convert folder B to a subfolder
|
||||
await testFolderB.dragTo(testFolderA);
|
||||
|
||||
await expect(testFolderB).toBeVisible();
|
||||
|
||||
// Collapse
|
||||
await testFolderA.dblclick();
|
||||
await expect(testFolderB).not.toBeVisible();
|
||||
|
||||
// Expand
|
||||
await testFolderA.dblclick();
|
||||
await expect(testFolderB).toBeVisible();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user