merge: integration branch claude/keen-knuth-uhxv8w (screen tests past the first-run dialog) into the Library workstream
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
2 files changed
+10
-6
No files matched your search
@@ -127,17 +127,18 @@ public sealed class ArchiveScreenSmokeTests
|
||||
Assert.Equal(Loc.L("Tooltips.Archive.YearRowRtl", year.Title + " · " + year.Detail), year.RowToolTip, "the tooltip names the mirrored arrow keys");
|
||||
await app.ExpectAsync<ArchiveView>("archive-overview-ar");
|
||||
|
||||
// The dialogs' templates exist once they are laid out: render first, then look inside.
|
||||
await ArchiveScenes.ShowAsync(app.Shell, "rebuild");
|
||||
Assert.Equal(FlowDirection.LeftToRight, TextFor(app, archive.SelectedArchive!.RootPath).FlowDirection, "the archive folder reads left to right");
|
||||
await app.ExpectAsync<ArchiveView>("archive-rebuild-ar");
|
||||
Assert.Equal(FlowDirection.LeftToRight, TextFor(app, archive.SelectedArchive!.RootPath).FlowDirection, "the archive folder reads left to right");
|
||||
|
||||
await ArchiveScenes.ShowAsync(app.Shell, "move");
|
||||
var move = Assert.NotNull(archive.Dialog as RenameDialogViewModel);
|
||||
await app.ExpectAsync<ArchiveView>("archive-move-ar");
|
||||
var template = Assert.NotNull(app.FindAll<TextBox>().FirstOrDefault(t => t.IsVisible && EditBehavior.GetField(t) == move.Template));
|
||||
Assert.Equal(FlowDirection.LeftToRight, template.FlowDirection, "the naming template reads left to right");
|
||||
Assert.Equal(FlowDirection.LeftToRight, TextFor(app, move.Rows[0].From).FlowDirection, "a folder before the move reads left to right");
|
||||
Assert.Equal(FlowDirection.LeftToRight, TextFor(app, move.Rows[0].To).FlowDirection, "a folder after the move reads left to right");
|
||||
await app.ExpectAsync<ArchiveView>("archive-move-ar");
|
||||
move.CloseCommand.Execute(null);
|
||||
}
|
||||
finally
|
||||
|
||||
@@ -132,7 +132,7 @@ public sealed class ScreenSmokeTests
|
||||
public Task ArabicMirrorsTheShellFromStartButNotItsPicturesOrLogo() => ScreenHost.RunAsync(async () =>
|
||||
{
|
||||
// The language is applied before the window exists, as at start-up with Arabic saved in the settings.
|
||||
await using var app = await SampleApp.StartAsync("ar");
|
||||
await using var app = await SampleApp.StartAsync("ar", firstRun: true);
|
||||
try
|
||||
{
|
||||
var window = app.Window;
|
||||
@@ -220,7 +220,8 @@ public sealed class ScreenSmokeTests
|
||||
|
||||
// A text box hands its padding to the text itself; the template adds none (8 px after a leading icon).
|
||||
app.Shell.Navigate(SectionKey.Settings);
|
||||
await app.ExpectAsync<SettingsView>("settings");
|
||||
app.Shell.Settings.Page = SettingsPage.Archive;
|
||||
await app.ExpectAsync<SettingsView>("settings-archive");
|
||||
var boxes = app.FindAll<TextBox>().Where(t => t.IsVisible).ToList();
|
||||
Assert.Contains(boxes, t => Field.GetGlyph(t) is not null);
|
||||
Assert.Contains(boxes, t => Field.GetGlyph(t) is null);
|
||||
@@ -258,12 +259,14 @@ public sealed class ScreenSmokeTests
|
||||
public MainWindow Window => _window;
|
||||
|
||||
/// <param name="language">The UI language, applied before the window is created (as at start-up).</param>
|
||||
public static async Task<SampleApp> StartAsync(string language = "en")
|
||||
/// <param name="firstRun">Opens with the first-run dialog, which keeps the shell behind it disabled.</param>
|
||||
public static async Task<SampleApp> StartAsync(string language = "en", bool firstRun = false)
|
||||
{
|
||||
var environment = AppEnvironment.ForCapture();
|
||||
UiLanguage.Apply(language);
|
||||
ThemeManager.Apply(AppTheme.Dark);
|
||||
var services = new AppServices(environment, new AppSettings { Language = language }, () => { }, new NoDialogs());
|
||||
var settings = new AppSettings { Language = language, FirstRunCompleted = !firstRun };
|
||||
var services = new AppServices(environment, settings, () => { }, new NoDialogs());
|
||||
var sample = SampleData.Configure(services);
|
||||
var shell = new ShellViewModel(services);
|
||||
|
||||
|
||||
Reference in new issue
Block a user