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:
Joseph Doherty
2026-10-07 15:05:49 -04:00
parent 0ffd4bdbea
commit 513fa1aa16
998 changed files with 17896 additions and 2395 deletions
@@ -10,8 +10,8 @@ namespace ZB.MOM.WW.ScadaBridge.CentralUI.Tests.Components.Audit;
/// <summary>
/// bUnit tests for <see cref="AuditEventDetail"/> — the reusable single-row
/// detail body extracted from <see cref="AuditDrilldownDrawer"/> (Task 1 of the
/// Execution-Tree Node Detail Modal feature).
/// detail body extracted from <see cref="AuditDrilldownDrawer"/> for reuse by the
/// Execution-Tree Node Detail Modal.
///
/// These tests render the detail component directly (not via the drawer) and
/// pin the contract the drawer — and any future modal host — relies on:
@@ -22,6 +22,7 @@ namespace ZB.MOM.WW.ScadaBridge.CentralUI.Tests.Components.Audit;
/// </summary>
public class AuditEventDetailTests : BunitContext
{
/// <summary>Initializes the test context with loose JS interop so unrelated tests do not fail on the clipboard call.</summary>
public AuditEventDetailTests()
{
// Loose so the cURL clipboard call does not blow up tests that do not
@@ -67,6 +68,7 @@ public class AuditEventDetailTests : BunitContext
Extra = extra,
};
/// <summary>Verifies that the read-only field block renders the audit event fields.</summary>
[Fact]
public void RendersFieldBlock()
{
@@ -81,6 +83,7 @@ public class AuditEventDetailTests : BunitContext
Assert.Contains("2026-05-20T12:30:45", cut.Markup);
}
/// <summary>Verifies that the source node field renders between the site and instance fields.</summary>
[Fact]
public void RendersSourceNodeField_BetweenSiteAndInstance()
{
@@ -103,6 +106,7 @@ public class AuditEventDetailTests : BunitContext
$"Expected SourceSiteId < SourceNode < SourceInstanceId; got {siteIdx}, {nodeIdx}, {instanceIdx}");
}
/// <summary>Verifies that a null source node renders as a dash.</summary>
[Fact]
public void RendersSourceNodeField_AsDashWhenNull()
{
@@ -119,6 +123,7 @@ public class AuditEventDetailTests : BunitContext
Assert.Contains(">—<", cut.Markup);
}
/// <summary>Verifies that the error section renders when the event carries an error.</summary>
[Fact]
public void ErrorSection_RendersWhenErrorPresent()
{
@@ -134,6 +139,7 @@ public class AuditEventDetailTests : BunitContext
Assert.Contains("stack trace here", cut.Markup);
}
/// <summary>Verifies that the error section is hidden when the event has no error.</summary>
[Fact]
public void ErrorSection_HiddenWhenNoError()
{
@@ -144,6 +150,7 @@ public class AuditEventDetailTests : BunitContext
Assert.DoesNotContain("data-test=\"section-error\"", cut.Markup);
}
/// <summary>Verifies that the request section pretty-prints a JSON payload.</summary>
[Fact]
public void RequestSection_PrettyPrintsJson()
{
@@ -156,6 +163,7 @@ public class AuditEventDetailTests : BunitContext
Assert.Matches(@"\n\s+""a"":\s*1", cut.Markup);
}
/// <summary>Verifies that the response section renders when a response payload is present.</summary>
[Fact]
public void ResponseSection_RendersWhenPresent()
{
@@ -167,6 +175,7 @@ public class AuditEventDetailTests : BunitContext
Assert.Contains("data-test=\"response-body\"", cut.Markup);
}
/// <summary>Verifies that the extra section renders when extra data is present.</summary>
[Fact]
public void ExtraSection_RendersWhenPresent()
{
@@ -177,6 +186,7 @@ public class AuditEventDetailTests : BunitContext
Assert.Contains("data-test=\"section-extra\"", cut.Markup);
}
/// <summary>Verifies that a redacted body shows the redaction badge.</summary>
[Fact]
public void RedactedBody_ShowsRedactionBadge()
{
@@ -187,6 +197,7 @@ public class AuditEventDetailTests : BunitContext
Assert.Contains("data-test=\"redaction-badge-request\"", cut.Markup);
}
/// <summary>Verifies that a body that was not redacted hides the redaction badge.</summary>
[Fact]
public void NonRedactedBody_HidesRedactionBadge()
{
@@ -197,6 +208,7 @@ public class AuditEventDetailTests : BunitContext
Assert.DoesNotContain("data-test=\"redaction-badge-request\"", cut.Markup);
}
/// <summary>Verifies that a database outbound event renders its SQL block.</summary>
[Fact]
public void DbOutboundChannel_RendersSqlBlock()
{
@@ -210,6 +222,7 @@ public class AuditEventDetailTests : BunitContext
Assert.Contains("data-test=\"sql-parameters\"", cut.Markup);
}
/// <summary>Verifies that an API channel event shows the copy-as-cURL button.</summary>
[Fact]
public void ApiChannel_ShowsCopyAsCurlButton()
{
@@ -220,6 +233,7 @@ public class AuditEventDetailTests : BunitContext
Assert.Contains("data-test=\"copy-as-curl\"", cut.Markup);
}
/// <summary>Verifies that a non-API channel event hides the copy-as-cURL button.</summary>
[Fact]
public void NonApiChannel_HidesCopyAsCurlButton()
{
@@ -230,6 +244,7 @@ public class AuditEventDetailTests : BunitContext
Assert.DoesNotContain("data-test=\"copy-as-curl\"", cut.Markup);
}
/// <summary>Verifies that a null correlation id hides the show-all-for-operation button.</summary>
[Fact]
public void NullCorrelationId_HidesShowAllButton()
{
@@ -240,6 +255,7 @@ public class AuditEventDetailTests : BunitContext
Assert.DoesNotContain("data-test=\"show-all-events\"", cut.Markup);
}
/// <summary>Verifies that a non-null correlation id shows the show-all-for-operation button.</summary>
[Fact]
public void NonNullCorrelationId_ShowsShowAllButton()
{
@@ -250,6 +266,7 @@ public class AuditEventDetailTests : BunitContext
Assert.Contains("data-test=\"show-all-events\"", cut.Markup);
}
/// <summary>Verifies that the execution buttons render only when the matching execution ids are present.</summary>
[Fact]
public void ExecutionButtons_ConditionalOnExecutionIds()
{
@@ -264,6 +281,7 @@ public class AuditEventDetailTests : BunitContext
Assert.Contains("data-test=\"view-execution-chain\"", cut.Markup);
}
/// <summary>Verifies that show-all-for-operation navigates with the correlation id in the query string.</summary>
[Fact]
public void ShowAllForOperation_Navigates_WithCorrelationIdQueryString()
{
@@ -278,6 +296,7 @@ public class AuditEventDetailTests : BunitContext
Assert.Contains($"/audit/log?correlationId={corr}", nav.Uri);
}
/// <summary>Verifies that view-execution-chain navigates to the execution tree page.</summary>
[Fact]
public void ViewExecutionChain_Navigates_ToExecutionTreePage()
{
@@ -292,6 +311,8 @@ public class AuditEventDetailTests : BunitContext
Assert.Contains($"/audit/execution-tree?executionId={exec}", nav.Uri);
}
/// <summary>Verifies that copy-as-cURL invokes the clipboard with the generated cURL command.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task CopyAsCurl_InvokesClipboard_WithCurlString()
{