From 8129881f77742b87cae6b38690ee7b89f8e23a6a Mon Sep 17 00:00:00 2001 From: amrali-eg <32075105+amrali-eg@users.noreply.github.com> Date: Sun, 20 Sep 2026 01:40:14 +0300 Subject: [PATCH 1/2] Make the confirmation dialog tests reach the cases they name ItBuildsWhenNothingIsRefused used a Shift_JIS file, which the policy refuses, and asserted the absence of prose the dialog no longer uses, so it passed with the refusal panel showing. ItBuildsForAMixOfEveryOutcome only checked that the form had some controls, and its fixtures did not cover every outcome. The first is replaced by a test with an automatically convertible file that asserts the plan and the absence of the source-choice controls by name. The second is replaced by a mix with a different number of files in each of the five categories, checking the plan summary, the count shown beside each label and the files offered a source choice. Co-Authored-By: Claude Sonnet 5 --- .../ConversionConfirmationFormTests.cs | 79 ++++++++++++++++--- 1 file changed, 69 insertions(+), 10 deletions(-) diff --git a/sources/EncodingChecker.Tests/ConversionConfirmationFormTests.cs b/sources/EncodingChecker.Tests/ConversionConfirmationFormTests.cs index 0dde6ba..b790124 100644 --- a/sources/EncodingChecker.Tests/ConversionConfirmationFormTests.cs +++ b/sources/EncodingChecker.Tests/ConversionConfirmationFormTests.cs @@ -76,37 +76,96 @@ private static IEnumerable Descendants(Control root) private static string AllText(Control root) => string.Join("\n", Descendants(root).Select(c => c.Text)); + private static IEnumerable Named(Control root, string name) => + Descendants(root).Where(c => c.Name == name); + + // The count the dialog shows beside a category label, or null when the category is hidden. + private static string? CountShownFor(Control root, string label) + { + Label? cell = Descendants(root).OfType