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
@@ -60,6 +60,15 @@ public sealed class EditorSmokeTests
|
||||
Assert.NotNull(editor.Session.Content.Deep, "the sample is analysed");
|
||||
Assert.True(editor.Session.Project.Exposure.Deflicker.HasAdvice, "the advice is in the project");
|
||||
Assert.Equal("Harbour sunset", editor.Title);
|
||||
Assert.Equal("Titano — Harbour sunset", shell.WindowTitle, "the window title follows the open sequence");
|
||||
Assert.False(shell.IsJobBarVisible, "the idle job bar gives its height to the editor");
|
||||
|
||||
// The Render split button can be clicked once the plan exists (its command re-reads its state).
|
||||
Assert.True(await editor.WhenIdleAsync(TimeSpan.FromSeconds(60)), "the editor settled");
|
||||
await SettleAsync(window);
|
||||
Assert.True(editor.CanRender, editor.RenderBlockedReason ?? "renderable");
|
||||
var render = Find<SplitButton>(window).Single(b => b.IsVisible);
|
||||
Assert.True(Find<Button>(render).First().IsEnabled, "Render is enabled");
|
||||
|
||||
foreach (var theme in Themes)
|
||||
{
|
||||
@@ -78,6 +87,35 @@ public sealed class EditorSmokeTests
|
||||
}
|
||||
}
|
||||
|
||||
// The Export tab: Add to queue and Batch follow the plan and the ticked presets.
|
||||
ThemeManager.Apply(AppTheme.Dark);
|
||||
var export = editor.Tabs.OfType<ExportTab>().Single();
|
||||
editor.ShowVectors = true;
|
||||
editor.SelectedTab = export;
|
||||
await SettleAsync(window);
|
||||
Assert.False(Find<PreviewViewport>(window).Single(p => p.IsVisible).ShowVectors, "a tool without a button on the Export tab draws nothing");
|
||||
Assert.True(export.AddToQueueCommand.CanExecute(null));
|
||||
Assert.False(export.BatchCommand.CanExecute(null), "nothing ticked");
|
||||
var batchButton = Find<Button>(window).Single(b => ReferenceEquals(b.Command, export.BatchCommand));
|
||||
Assert.False(batchButton.IsEnabled);
|
||||
export.Cards.First(c => c.CanBatch).IsInBatch = true;
|
||||
await SettleAsync(window);
|
||||
Assert.True(batchButton.IsEnabled, "ticking a card enables Batch…");
|
||||
editor.ShowVectors = false;
|
||||
|
||||
// The waveform of the Exposure tab is measured from the preview.
|
||||
editor.SelectedTab = editor.Exposure;
|
||||
editor.Exposure.ChartMode = ExposureChart.Waveform;
|
||||
Assert.True(await editor.WhenIdleAsync(TimeSpan.FromSeconds(60)));
|
||||
Assert.NotNull(editor.WaveformImage, "the waveform shows the frame on screen");
|
||||
editor.Exposure.ChartMode = ExposureChart.Luminance;
|
||||
|
||||
// 1:1 renders the source's own pixels; Fit returns to the view's size.
|
||||
editor.ZoomMode = PreviewZoomMode.Actual;
|
||||
Assert.True(await editor.WhenIdleAsync(TimeSpan.FromSeconds(60)));
|
||||
Assert.Equal(editor.Session.Content.SourceWidth, ((BitmapSource)editor.PreviewImage!).PixelWidth, "1:1 shows source pixels");
|
||||
editor.ZoomMode = PreviewZoomMode.Fit;
|
||||
|
||||
// An edit through the session is undone and redone (Ctrl+Z / Ctrl+Y run the same commands).
|
||||
ThemeManager.Apply(AppTheme.Dark);
|
||||
var before = editor.Session.Project.Exposure.ExposureOffsetEv;
|
||||
|
||||
Reference in new issue
Block a user