test(app): editor history, saver retry, merge, preview re-solve and capture scenes
- Tests for undo after adopted changes, run ending, saver retries and stop, the local source refusing unsaved writes, re-solves without decoding and equal to a fresh preparation, 1:1 pictures, waveform, crop margins and the values of the Optimise toast; the Windows smoke test checks Render, Batch, the waveform, 1:1, the window title and the hidden idle job bar. - The capture sample has a manual value and camera keyframes; the capture adds the overlays, the waveform, the Optimise toast and Export.html's tool state. - Crop margins live in a WPF-free class; a discarded change stops retrying. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
15 files changed
+462
-53
No files matched your search
@@ -114,8 +114,12 @@ public static class ScreenCapture
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>The sequence editor on the synthetic sunset: every section in both themes (<c>sequence-<tab>-<theme>.png</c>).</summary>
|
||||
private static async Task<int> CaptureEditorAsync(Window window, ShellViewModel shell, SampleData sample, string directory)
|
||||
/// <summary>
|
||||
/// The sequence editor on the synthetic sunset: every section in both themes (<c>sequence-<tab>-<theme>.png</c>,
|
||||
/// the Camera tab with a keyframe selected, the Export tab as Export.html with the crop mask and no compare), then
|
||||
/// the preview overlays, the waveform and the "what changed" toast of Optimise all.
|
||||
/// </summary>
|
||||
private static async Task<int> CaptureEditorAsync(MainWindow window, ShellViewModel shell, SampleData sample, string directory)
|
||||
{
|
||||
var written = 0;
|
||||
var id = await sample.FillEditorAsync();
|
||||
@@ -126,22 +130,42 @@ public static class ScreenCapture
|
||||
Log.Warning("capture", "The editor sample did not open");
|
||||
return 0;
|
||||
}
|
||||
foreach (var camera in editor.Tabs.OfType<CameraTab>()) camera.SelectedKey = 1;
|
||||
foreach (var theme in Themes)
|
||||
{
|
||||
ThemeManager.Apply(theme);
|
||||
foreach (var tab in editor.Tabs)
|
||||
{
|
||||
editor.SelectedTab = tab;
|
||||
editor.IsCompare = tab is not ExportTab;
|
||||
editor.CurrentIndex = tab is ExportTab ? 40 : 45;
|
||||
await Settle(window);
|
||||
if (!await editor.WhenIdleAsync(TimeSpan.FromSeconds(30))) Log.Warning("capture", $"The {tab.Key} section was still busy");
|
||||
written += await SaveAsync(window, directory, "sequence-" + tab.Key.ToLowerInvariant(), theme);
|
||||
written += await SaveEditorAsync(window, editor, directory, "sequence-" + tab.Key.ToLowerInvariant(), theme);
|
||||
}
|
||||
|
||||
editor.SelectedTab = editor.Exposure;
|
||||
editor.IsCompare = true;
|
||||
editor.ShowVectors = editor.ShowRegions = true;
|
||||
written += await SaveEditorAsync(window, editor, directory, "sequence-exposure-overlays", theme);
|
||||
editor.ShowVectors = editor.ShowRegions = false;
|
||||
editor.Exposure.ChartMode = ExposureChart.Waveform;
|
||||
written += await SaveEditorAsync(window, editor, directory, "sequence-exposure-waveform", theme);
|
||||
editor.Exposure.ChartMode = ExposureChart.Luminance;
|
||||
|
||||
editor.OptimiseAllCommand.Execute(null);
|
||||
written += await SaveEditorAsync(window, editor, directory, "sequence-optimise", theme);
|
||||
editor.Session.Undo();
|
||||
foreach (var toast in window.Toasts.Toasts.ToList()) window.Toasts.Dismiss(toast);
|
||||
}
|
||||
editor.SelectedTab = editor.Exposure;
|
||||
return written;
|
||||
}
|
||||
|
||||
private static async Task<int> SaveEditorAsync(Window window, EditorViewModel editor, string directory, string screen, AppTheme theme)
|
||||
{
|
||||
await Settle(window);
|
||||
if (!await editor.WhenIdleAsync(TimeSpan.FromSeconds(30))) Log.Warning("capture", $"{screen} was still busy");
|
||||
return await SaveAsync(window, directory, screen, theme);
|
||||
}
|
||||
|
||||
private static async Task<int> SaveAsync(Window window, string directory, string screen, AppTheme theme, ShellViewModel? waitForThumbnails = null)
|
||||
{
|
||||
await Settle(window);
|
||||
|
||||
Reference in new issue
Block a user