test(app): Library logic tests, capture scenes and smoke tests
Timeline bands and month mapping, saved views (validation and a round trip through the settings table), the mass actions bar's targets and reasons, remote cards and their place among the pages, the CSV list and the delete dry run's confirmation. --capture writes library-timeline, library-mass, library-delete and library-remote in both themes (LibraryScenes), the sample data saves two views, and a Windows smoke test renders each scene and checks the bar, the typed confirmation and the saved views. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
10 files changed
+729
No files matched your search
@@ -7,6 +7,7 @@ using Titano.App.Archiving;
|
||||
using Titano.App.DesignTime;
|
||||
using Titano.App.Editor;
|
||||
using Titano.App.Import;
|
||||
using Titano.App.Library;
|
||||
using Titano.App.Server;
|
||||
using Titano.App.Settings;
|
||||
using Titano.Core.Diagnostics;
|
||||
@@ -61,6 +62,8 @@ public static class ScreenCapture
|
||||
await shell.Services.Server.RestoreAsync();
|
||||
await shell.Services.Sync.RefreshAsync();
|
||||
await shell.Server.Sync.ReloadAsync();
|
||||
// The server's sequences without a copy here join the Library as remote cards.
|
||||
await shell.Library.RefreshAsync();
|
||||
shell.About.SetResult(null);
|
||||
await shell.Settings.DetectEncodersAsync();
|
||||
await shell.Settings.SelfTestAsync();
|
||||
@@ -79,6 +82,7 @@ public static class ScreenCapture
|
||||
written += await SaveAsync(window, directory, "library-list", theme, waitForThumbnails: shell);
|
||||
shell.Library.LayoutIndex = 0;
|
||||
shell.Library.ClearSelectionCommand.Execute(null);
|
||||
written += await CaptureLibraryScenesAsync(window, shell, directory, theme);
|
||||
|
||||
shell.Navigate(SectionKey.Jobs);
|
||||
if (shell.Jobs.Rows.Count > 0) shell.Jobs.Rows[0].IsExpanded = true;
|
||||
@@ -148,6 +152,29 @@ public static class ScreenCapture
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <c>library-timeline</c>, <c>library-mass</c> (the selection with the whole bar), <c>library-delete</c> (the dry run
|
||||
/// of deleting that selection, behind its typed confirmation) and <c>library-remote</c> (the server's sequences as
|
||||
/// remote cards), then the Library as it was.
|
||||
/// </summary>
|
||||
private static async Task<int> CaptureLibraryScenesAsync(MainWindow window, ShellViewModel shell, string directory, AppTheme theme)
|
||||
{
|
||||
var written = 0;
|
||||
foreach (var scene in LibraryScenes.Scenes)
|
||||
{
|
||||
DismissToasts(window);
|
||||
await LibraryScenes.ShowAsync(shell, scene);
|
||||
written += await SaveAsync(window, directory, "library-" + scene, theme, waitForThumbnails: shell);
|
||||
if (scene == "mass" && await LibraryScenes.DeleteRequestAsync(shell) is { } request)
|
||||
written += await SaveDialogAsync(new ConfirmDialog(request), directory, "library-delete", theme);
|
||||
}
|
||||
shell.Library.ClearSelectionCommand.Execute(null);
|
||||
shell.Library.ClearFiltersCommand.Execute(null);
|
||||
shell.Library.LayoutIndex = 0;
|
||||
await shell.Library.RefreshAsync();
|
||||
return written;
|
||||
}
|
||||
|
||||
private static void SelectSyncFilter(ShellViewModel shell, SyncFilter filter) =>
|
||||
shell.Server.Sync.Chips.First(c => c.Filter == filter).SelectCommand.Execute(null);
|
||||
|
||||
|
||||
Reference in new issue
Block a user