test: cover list folders in the data and sidebar layers
Data: folder delete keeps its lists (ON DELETE SET NULL), rename patches name/icon without resetting sort order or collapse state. Sidebar: grouping on load, folder badge as the sum of its children, both move routes, and the persisted collapse state. Drops the LoadAsync/AddRowAsync normalization of a dangling folder_id: FK enforcement is on for every connection, so the row it guarded against cannot exist, and ContainerOf already falls back to the top level.
This commit is contained in:
@@ -338,9 +338,7 @@ public sealed partial class ListsIslandViewModel : ViewModelBase, IDisposable
|
||||
IsManual = l.IsManual,
|
||||
FindingsTracked = l.FindingsTracked,
|
||||
HasTicketProject = ticketsConfigured && cfg?.TicketProjectId > 0,
|
||||
// A folder_id pointing at a folder that isn't there (shouldn't happen — the FK
|
||||
// sets it null on delete) would otherwise hide the list entirely.
|
||||
FolderId = Folders.Any(f => f.Id == l.FolderId) ? l.FolderId : null,
|
||||
FolderId = l.FolderId,
|
||||
};
|
||||
Items.Add(item);
|
||||
UserLists.Add(item);
|
||||
@@ -707,7 +705,7 @@ public sealed partial class ListsIslandViewModel : ViewModelBase, IDisposable
|
||||
IsManual = entity.IsManual,
|
||||
FindingsTracked = entity.FindingsTracked,
|
||||
HasTicketProject = hasTicketProject,
|
||||
FolderId = Folders.Any(f => f.Id == entity.FolderId) ? entity.FolderId : null,
|
||||
FolderId = entity.FolderId,
|
||||
};
|
||||
|
||||
var seedNames = new HashSet<string>(new[] { "My Day", "Important", "Planned" });
|
||||
|
||||
Reference in New Issue
Block a user