docs(tests): fix CommentChecker findings across tests/ — 13,392 → 0 (repo-wide scan clean)
Comment/XML-doc changes only: - add summaries to ~10k test methods, fixtures, fakes and helpers (+ <param> on theories, <returns> on async Task methods, <inheritdoc/> on interface implementations the checker can resolve) - strip ~2.6k project-tracking references (WP*, P*-*, row-NN, Task N, #NN, Component-0NN) from comments, keeping the explanatory text; reword false positives in comments only - real docs on fakes implementing BCL/library interfaces (IDisposable, ILogger, IOptionsMonitor, IAsyncLifetime) - reword the last 5 src/ false positives (CWE-1236, failures-1, year-0001, M365) Only non-comment edits: four one-line nested classes split across lines so members can carry docs. Build 0 errors / 0 warnings.
This commit is contained in:
@@ -28,6 +28,7 @@ public class DialogSeverityStylingTests : BunitContext
|
||||
{
|
||||
private readonly DialogService _dialog = new();
|
||||
|
||||
/// <summary>Initializes the test context with the dialog service and its dependencies.</summary>
|
||||
public DialogSeverityStylingTests()
|
||||
{
|
||||
Services.AddSingleton<IDialogService>(_dialog);
|
||||
@@ -52,10 +53,11 @@ public class DialogSeverityStylingTests : BunitContext
|
||||
return footer.Single(b => b.TextContent.Trim() != "Cancel");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a caution dialog renders amber, neither red nor primary.</summary>
|
||||
[Fact]
|
||||
public void Caution_rendersAmber_notRedAndNotPrimary()
|
||||
{
|
||||
// The row-75 case. Amber is the point: not red (which reads "delete"), and not
|
||||
// The caution case. Amber is the point: not red (which reads "delete"), and not
|
||||
// the primary blue (which reads "safe default" — wrong for a live device write).
|
||||
var confirm = OpenConfirm(d => d.ConfirmAsync("Approve thing", "Sure?", DialogSeverity.Caution, "Approve"));
|
||||
|
||||
@@ -64,6 +66,7 @@ public class DialogSeverityStylingTests : BunitContext
|
||||
Assert.DoesNotContain("btn-primary", confirm.ClassList);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a destructive dialog still renders red.</summary>
|
||||
[Fact]
|
||||
public void Destructive_stillRendersRed()
|
||||
{
|
||||
@@ -74,6 +77,7 @@ public class DialogSeverityStylingTests : BunitContext
|
||||
Assert.Contains("btn-danger", confirm.ClassList);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a normal dialog still renders with the primary style.</summary>
|
||||
[Fact]
|
||||
public void Normal_stillRendersPrimary()
|
||||
{
|
||||
@@ -82,6 +86,9 @@ public class DialogSeverityStylingTests : BunitContext
|
||||
Assert.Contains("btn-primary", confirm.ClassList);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the boolean danger form maps onto the same two severities.</summary>
|
||||
/// <param name="danger">Whether the dialog is requested as dangerous.</param>
|
||||
/// <param name="expectedClass">The button CSS class the dialog is expected to render.</param>
|
||||
[Theory]
|
||||
[InlineData(true, "btn-danger")]
|
||||
[InlineData(false, "btn-primary")]
|
||||
@@ -99,6 +106,7 @@ public class DialogSeverityStylingTests : BunitContext
|
||||
Assert.Contains(expectedClass, confirm.ClassList);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a caution dialog without a label reads Confirm rather than Delete.</summary>
|
||||
[Fact]
|
||||
public void UnlabelledCaution_readsConfirm_notDelete()
|
||||
{
|
||||
@@ -110,10 +118,11 @@ public class DialogSeverityStylingTests : BunitContext
|
||||
Assert.Equal("Confirm", confirm.TextContent.Trim());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a destructive dialog without a label still falls back to Delete.</summary>
|
||||
[Fact]
|
||||
public void UnlabelledDestructive_stillFallsBackToDelete()
|
||||
{
|
||||
// The row-28 fallback is retained deliberately (the Playwright suites click the
|
||||
// The "Delete" fallback is retained deliberately (the Playwright suites click the
|
||||
// literal "Delete"). Pinned here alongside its new sibling so the pair is read
|
||||
// together.
|
||||
var confirm = OpenConfirm(d => d.ConfirmAsync("Delete thing", "Sure?", DialogSeverity.Destructive));
|
||||
|
||||
Reference in New Issue
Block a user