test(app): bring the screen smoke tests up to date and give the Reorganize scene sidecars

The App suite had not run on Windows since CI has no Windows runner, so five screen smoke
tests had gone stale: the archive folder is shown masked, the sync table offers the
workspace disabled on older servers, the sample has ten jobs, a year-row check raced the
tree rebuild, and the Reorganize capture showed every sequence unreadable because the
sample had no sidecars. The certificate rows' server column gives way earlier so Forget
fits at 1200 px in Bulgarian.

Refs #70

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-16 12:50:08 +01:00
1 parent 20d64af4a4
commit 28a9afdd7c
7 files changed
+74 -5

No files matched your search

@@ -100,7 +100,7 @@ public sealed class ArchiveScreenSmokeTests
Assert.NotEmpty(reorganize.Rows, "the dry run lists the sequences that change");
Assert.Null(reorganize.ErrorText);
await app.ExpectAsync<ArchiveView>("archive-reorganize");
Assert.True(ButtonFor(app, reorganize.ApplyCommand).IsEnabled, "Apply follows the dry run");
Assert.True(ButtonFor(app, reorganize.ApplyCommand).IsEnabled, "Apply follows the dry run: " + reorganize.ApplyToolTip);
Assert.True(ButtonFor(app, reorganize.CloseCommand).IsDefault, "Enter takes the safe way out");
foreach (var box in app.FindAll<CheckBox>().Where(c => c.IsVisible)) Assert.NotNull(box.ToolTip, "every template switch says what it does");
AssertNoErrorShown(app);
@@ -149,7 +149,7 @@ public sealed class ArchiveScreenSmokeTests
// The dialogs' templates exist once they are laid out: render first, then look inside.
await ArchiveScenes.ShowAsync(app.Shell, "rebuild");
await app.ExpectAsync<ArchiveView>("archive-rebuild-ar");
Assert.Equal(FlowDirection.LeftToRight, TextFor(app, archive.SelectedArchive!.RootPath).FlowDirection, "the archive folder reads left to right");
Assert.Equal(FlowDirection.LeftToRight, TextFor(app, AppEnvironment.Shown(archive.SelectedArchive!.RootPath)).FlowDirection, "the archive folder reads left to right");
await ArchiveScenes.ShowAsync(app.Shell, "reorganize");
var reorganize = Assert.NotNull(archive.Dialog as ReorganizeDialogViewModel);
@@ -299,7 +299,14 @@ public sealed class ArchiveScreenSmokeTests
UiLanguage.Apply(language);
window.UpdateLayout();
await window.Dispatcher.InvokeAsync(() => { }, System.Windows.Threading.DispatcherPriority.ApplicationIdle);
// A language switch builds the tree's rows again; they may arrive a few layout passes later.
var years = TreeItems(app).Where(i => ((ArchiveTreeRowViewModel)i.DataContext).IsYear).ToList();
for (var until = DateTime.UtcNow.AddSeconds(TestTiming.Budget(5)); years.Count == 0 && DateTime.UtcNow < until;)
{
await Task.Delay(50);
window.UpdateLayout();
years = TreeItems(app).Where(i => ((ArchiveTreeRowViewModel)i.DataContext).IsYear).ToList();
}
Assert.True(years.Count > 0, $"{language}: year rows show");
foreach (var item in years)
{
@@ -50,7 +50,8 @@ public sealed class ServerScreenSmokeTests
var sunrise = Row(table, "Sunrise over Superga");
Assert.Equal(SyncStatus.ProxiesOnly, sunrise.Entry.Status);
Assert.Equal(Loc.L("Server.Sync.Proxies"), sunrise.LocalText);
Assert.SequenceEqual([SyncAction.OpenWithProxies, SyncAction.DownloadOriginals], Actions(sunrise));
// A server without projects: open with proxies; the workspace is offered, disabled with the reason (phase 5b).
Assert.SequenceEqual([SyncAction.OpenWithProxies, SyncAction.DownloadOriginals, SyncAction.OpenInWorkspace], Actions(sunrise));
Assert.SequenceEqual([SyncAction.Upload], Actions(Row(table, "Clouds over the Langhe")));
var conflict = Row(table, "Holy grail · Monviso");
Assert.Equal(StatusKind.Warning, conflict.StateKind);
@@ -83,7 +83,7 @@ public sealed class ScreenSmokeTests
Assert.Equal(0, shell.Library.SelectionCount);
shell.Navigate(SectionKey.Jobs);
Assert.Equal(9, shell.Jobs.Rows.Count);
Assert.Equal(10, shell.Jobs.Rows.Count, string.Join(" | ", shell.Jobs.Rows.Select(r => r.AccessibleName)));
Assert.True(shell.IsJobActive, "running jobs show in the job bar");
shell.Jobs.Rows[0].IsExpanded = true;
await app.ExpectAsync<JobsView>("jobs");