test(import): failure sentences, new cards, RTL text and the screen's accessibility
Logic tests for failure mapping, the folder path in replanning, nickname-less cards, entry tooltips, left-to-right paths and the right-to-left session arrow; the smoke test runs every state at 1200 x 788 and checks names on every button, uncut session times and Show plan names, aligned headers, the folder path error only for Folder with its status action, four-digit number boxes, disabled devices with their reason, live regions and the locked form after an import, plus a right-to-left pass in Arabic. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
5 files changed
+322
-2
No files matched your search
@@ -35,6 +35,7 @@ public sealed class ImportPlansTests
|
||||
Assert.True(totals.HasEnoughSpace);
|
||||
Assert.Equal(TimeSpan.FromSeconds(3), totals.Estimate);
|
||||
Assert.Equal("3 sessions · 7 photos · 120 MB · about 3 s", totals.Text);
|
||||
Assert.Equal("3 sessions · 7 photos · 120 MB", totals.SummaryText);
|
||||
Assert.Equal("1 duplicate", totals.DuplicatesText);
|
||||
Assert.Equal("Import 5 photos", totals.ImportText);
|
||||
Assert.Equal("80 MB free after import", totals.SpaceText);
|
||||
@@ -124,6 +125,39 @@ public sealed class ImportPlansTests
|
||||
Assert.Equal("2026/2026-09-28 Canon EOS R5/" + plan.Sessions[0].Items[0].FileName, folder.Rows[1].Destination);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ShowPlanShowsNamesUnderTheirSessionFolder()
|
||||
{
|
||||
var plan = ThreeSessions();
|
||||
var details = ImportPlans.Details(plan, ImportDestinationKind.Archive, verify: true);
|
||||
var session = details.Rows[0];
|
||||
Assert.True(session.SourceText.StartsWith("Session 1 · ", StringComparison.Ordinal), session.SourceText);
|
||||
Assert.Equal("2026/2026-09-28 Canon EOS R5/originals", session.DestinationText);
|
||||
var file = details.Rows[2];
|
||||
Assert.Equal("IMG_0002.CR2", file.SourceText);
|
||||
Assert.Equal(plan.Sessions[0].Items[1].FileName, file.DestinationText);
|
||||
Assert.Equal("DCIM/100CANON/IMG_0002.CR2", file.Source, "the full path stays for the tooltip");
|
||||
Assert.Equal("Split at IMG_0002.CR2", file.SplitName);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ARightToLeftLanguageReadsTheSessionTimesWithItsOwnArrow()
|
||||
{
|
||||
var plan = ThreeSessions();
|
||||
Assert.Contains("→", ImportPlans.Sessions(plan, ImportDestinationKind.Archive, new HashSet<string>())[0].TimeText);
|
||||
try
|
||||
{
|
||||
Loc.SetCulture(CultureInfo.GetCultureInfo("he"));
|
||||
var time = ImportPlans.Sessions(plan, ImportDestinationKind.Archive, new HashSet<string>())[0].TimeText;
|
||||
Assert.Contains("←", time);
|
||||
Assert.False(time.Contains('→'), "a right-to-left reader would see the arrow point back to the start");
|
||||
}
|
||||
finally
|
||||
{
|
||||
Loc.SetCulture(CultureInfo.GetCultureInfo("en"));
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TheNamePreviewShowsTheFirstThreeCopiedFiles()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user