test(app): RTL and collapsed-rail captures; curve keyboard insertion tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
Claude committed 2026-10-06 07:49:19 +00:00
1 parent a92120fb0d
commit e371b542a3
2 files changed
+70 -1

No files matched your search

+44 -1
View File
@@ -7,6 +7,7 @@ using Titano.App.Archiving;
using Titano.App.DesignTime;
using Titano.App.Editor;
using Titano.App.Import;
using Titano.App.Infrastructure;
using Titano.App.Server;
using Titano.App.Settings;
using Titano.Core.Diagnostics;
@@ -17,7 +18,9 @@ namespace Titano.App.Shell;
/// <summary>
/// <c>Titano.exe --capture &lt;dir&gt;</c>: renders every client screen at 1440×900 in the dark and light themes to
/// <c>&lt;screen&gt;-&lt;theme&gt;.png</c> from <see cref="SampleData"/> (first run on an empty index, then a populated
/// one, then the sync table with transfers, a conflict and its confirmation), for visual review and phase reports (BRIEF §20.2), then exits.
/// one, then the sync table with transfers, a conflict and its confirmation), plus the Library, the editor's Exposure
/// tab and the import plan in Arabic (<c>*-rtl-dark.png</c>, right to left), for visual review and phase reports
/// (BRIEF §20.2), then exits.
/// </summary>
public static class ScreenCapture
{
@@ -79,6 +82,9 @@ public static class ScreenCapture
written += await SaveAsync(window, directory, "library-list", theme, waitForThumbnails: shell);
shell.Library.LayoutIndex = 0;
shell.Library.ClearSelectionCommand.Execute(null);
shell.IsRailCollapsed = true;
written += await SaveAsync(window, directory, "library-rail-collapsed", theme, waitForThumbnails: shell);
shell.IsRailCollapsed = false;
shell.Navigate(SectionKey.Jobs);
if (shell.Jobs.Rows.Count > 0) shell.Jobs.Rows[0].IsExpanded = true;
@@ -213,6 +219,8 @@ public static class ScreenCapture
foreach (var toast in window.Toasts.Toasts.ToList()) window.Toasts.Dismiss(toast);
}
written += await CaptureRightToLeftAsync(window, shell, editor, directory);
// Last, as it stays: an analysis of the sequence running (settings disabled, viewing tools live).
await sample.MarkAnalysingAsync(id);
await editor.AttachJobsAsync();
@@ -224,6 +232,41 @@ public static class ScreenCapture
return written;
}
/// <summary>
/// The Library, the editor's Exposure tab and the import plan in Arabic, dark: the layout mirrors while photos,
/// charts, the filmstrip and templates stay left to right. English is restored whatever happens.
/// </summary>
private static async Task<int> CaptureRightToLeftAsync(MainWindow window, ShellViewModel shell, EditorViewModel editor, string directory)
{
var written = 0;
var frame = editor.CurrentIndex;
ThemeManager.Apply(AppTheme.Dark);
UiLanguage.Apply("ar");
try
{
DismissToasts(window);
shell.Navigate(SectionKey.Library);
written += await SaveAsync(window, directory, "library-rtl", AppTheme.Dark, waitForThumbnails: shell);
shell.Navigate(SectionKey.Sequence);
editor.SelectedTab = editor.Exposure;
editor.IsCompare = true;
editor.CurrentIndex = 45;
written += await SaveEditorAsync(window, editor, directory, "sequence-exposure-rtl", AppTheme.Dark);
await ImportScenes.ShowAsync(shell, "plan");
DismissToasts(window);
written += await SaveAsync(window, directory, "import-plan-rtl", AppTheme.Dark);
}
finally
{
UiLanguage.Apply("en");
}
shell.Navigate(SectionKey.Sequence);
editor.CurrentIndex = frame;
return written;
}
private static async Task<int> SaveEditorAsync(Window window, EditorViewModel editor, string directory, string screen, AppTheme theme)
{
await Settle(window);