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:
Claude committed 2026-10-03 17:13:25 +00:00
1 parent 0dada9bf47
commit 7746903b0c
5 files changed
+322 -2

No files matched your search

@@ -53,6 +53,49 @@ public sealed class CardPoolTests
Assert.Equal(@"D:\Shoots\2026", pool[4].Root);
}
[Test]
public void ARememberedCardStaysNewUntilItHasANickname()
{
var unnamed = Known(GoPro, "GoPro 12", DateTimeOffset.UtcNow) with { Nickname = null };
var source = CardPool.Build([GoPro], [unnamed], null).Single();
Assert.NotNull(source.Card, "the first plan remembered it");
Assert.False(source.IsKnown);
Assert.Equal("New card", source.StateText);
Assert.Equal("GOPRO", source.Title);
var named = CardPool.Build([GoPro], [unnamed with { Nickname = "GoPro 12" }], null).Single();
Assert.True(named.IsKnown);
Assert.Equal("Known card", named.StateText);
}
[Test]
public void TheEntryTooltipCarriesTheStateAndTheWholeSubtitle()
{
var pool = CardPool.Build([CardA, Usb], [Known(CardA, "EOS R5 · card A", DateTimeOffset.UtcNow)], @"D:\Shoots\2026");
Assert.Equal("Known card · 128 GB · 96.2 GB used", pool[0].ToolTip);
Assert.Equal("no DCIM · 1.8 TB free", pool[1].ToolTip);
Assert.Equal(@"Folder · D:\Shoots\2026", pool[2].ToolTip);
}
[Test]
public void PathsAndSerialsStayLeftToRightInARightToLeftLanguage()
{
try
{
Loc.SetCulture(CultureInfo.GetCultureInfo("he"));
var pool = CardPool.Build([Usb with { Label = string.Empty }, CardA], [], @"D:\Shoots\");
Assert.Equal("\u202AG:\\\u202C", pool[1].Title, "a drive root keeps its separator at its end");
Assert.Equal("\u202AD:\\Shoots\\\u202C", pool[2].Title);
Assert.Equal("\u202AD:\\Shoots\\\u202C", pool[2].Subtitle);
Assert.Contains("\u202A3F2A-9C11\u202C", pool[0].IdentityText);
Assert.Equal("EOS_DIGITAL", pool[0].Title, "a label is left to bidi");
}
finally
{
Loc.SetCulture(CultureInfo.GetCultureInfo("en"));
}
}
[Test]
public void AKnownCardWithoutDcimIsStillACard()
{