test(app): capture the editor's busy state

The capture sample can mark an analysis of the editor sequence as running, so
sequence-busy-<theme>.png shows the settings waiting with the viewing tools live.

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-03 10:53:18 +00:00
1 parent 3a29b4fc6a
commit ea6a081062
3 files changed
+34 -2

No files matched your search

+23
View File
@@ -152,6 +152,29 @@ public sealed class SampleData
return id;
}
/// <summary>A deep analysis of <paramref name="sequenceId"/> half way through: the editor's busy state (settings wait, viewing stays live).</summary>
public async Task MarkAnalysingAsync(Guid sequenceId)
{
var db = _db ?? throw new InvalidOperationException("OpenEmptyAsync first.");
var now = DateTimeOffset.UtcNow;
await db.Jobs.EnqueueAsync(new Job
{
Id = Guid.CreateVersion7(),
Kind = JobKind.DeepAnalyse,
TargetIds = [sequenceId],
TargetLabel = "Harbour sunset",
State = JobState.Running,
Priority = JobPriority.User,
ProgressDone = 40,
ProgressTotal = 96,
ItemsPerSecond = 12,
NodeId = Environment.MachineName,
Attempts = 1,
Created = now.AddSeconds(-5),
Started = now.AddSeconds(-4),
});
}
/// <summary>A two-minute sunset at 2 s intervals: darkening scene, flicker, two shutter steps the pixels received, warming light.</summary>
private static readonly SyntheticSequenceOptions EditorSunset = new()
{
+1 -1
View File
@@ -15,7 +15,7 @@
<!-- One choice of a vertical segment group (the Exposure chart switch): text, accent when chosen. -->
<Style x:Key="RadioButton.ChartSegment" TargetType="RadioButton" BasedOn="{StaticResource RadioButton.Segment}">
<Setter Property="Width" Value="NaN" />
<Setter Property="Width" Value="Auto" />
<Setter Property="MinWidth" Value="64" />
<Setter Property="Height" Value="26" />
<Setter Property="Padding" Value="10,0" />
+10 -1
View File
@@ -117,7 +117,7 @@ public static class ScreenCapture
/// <summary>
/// The sequence editor on the synthetic sunset: every section in both themes (<c>sequence-&lt;tab&gt;-&lt;theme&gt;.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.
/// the preview overlays, the waveform, the "what changed" toast of Optimise all and the busy state.
/// </summary>
private static async Task<int> CaptureEditorAsync(MainWindow window, ShellViewModel shell, SampleData sample, string directory)
{
@@ -156,6 +156,15 @@ public static class ScreenCapture
editor.Session.Undo();
foreach (var toast in window.Toasts.Toasts.ToList()) window.Toasts.Dismiss(toast);
}
// Last, as it stays: an analysis of the sequence running (settings disabled, viewing tools live).
await sample.MarkAnalysingAsync(id);
await editor.AttachJobsAsync();
foreach (var theme in Themes)
{
ThemeManager.Apply(theme);
written += await SaveEditorAsync(window, editor, directory, "sequence-busy", theme);
}
return written;
}