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
@@ -17,7 +17,7 @@ using SecuredWritesPage = ZB.MOM.WW.ScadaBridge.CentralUI.Components.Pages.Opera
namespace ZB.MOM.WW.ScadaBridge.CentralUI.Tests.Components;
/// <summary>
/// bUnit rendering + interaction tests for the Secured Writes page (M7 T14b / C5).
/// bUnit rendering + interaction tests for the Secured Writes page.
/// The page is the UI for the two-person MxGateway write workflow: an Operator submits,
/// a different Verifier approves/rejects, and everyone sees the history. The page only
/// SUBMITS commands through <see cref="ISecuredWriteService"/> — the server enforces
@@ -37,6 +37,7 @@ public class SecuredWritesTests : BunitContext
// even though these tests never drive the browser.
private readonly IBrowseService _browse = Substitute.For<IBrowseService>();
/// <summary>Registers the substitute services and default stubs the Secured Writes page needs when it renders.</summary>
public SecuredWritesTests()
{
Services.AddSingleton(_service);
@@ -48,7 +49,7 @@ public class SecuredWritesTests : BunitContext
// BOTH overloads must be stubbed: Reject takes the bool form, Approve takes the
// DialogSeverity form (register row 75). An unstubbed NSubstitute call returns a
// null Task, so missing one here surfaces as an NRE inside the click handler
// rather than as anything that names the dialog — the row-28 gotcha.
// rather than as anything that names the dialog — a known gotcha.
_dialog.ConfirmAsync(Arg.Any<string>(), Arg.Any<string>(), Arg.Any<bool>(), Arg.Any<string?>())
.Returns(Task.FromResult(true));
_dialog.ConfirmAsync(Arg.Any<string>(), Arg.Any<string>(), Arg.Any<DialogSeverity>(), Arg.Any<string?>())
@@ -130,6 +131,7 @@ public class SecuredWritesTests : BunitContext
// ── (a) Operator: submit form present + Submit calls SubmitAsync with the values ──
/// <summary>Verifies that a user with the Operator role sees the submit form.</summary>
[Fact]
public void Operator_SeesSubmitForm()
{
@@ -145,6 +147,7 @@ public class SecuredWritesTests : BunitContext
});
}
/// <summary>Verifies that submitting as an Operator calls the service with the entered values.</summary>
[Fact]
public void Operator_Submit_CallsServiceWithEnteredValues()
{
@@ -175,6 +178,7 @@ public class SecuredWritesTests : BunitContext
// ── (b) Verifier: pending row renders with Approve/Reject; own-row actions disabled ──
/// <summary>Verifies that a Verifier sees enabled approve and reject actions on a pending row submitted by another operator.</summary>
[Fact]
public void Verifier_PendingRow_HasEnabledActions_ForOtherOperatorsRow()
{
@@ -194,6 +198,7 @@ public class SecuredWritesTests : BunitContext
});
}
/// <summary>Verifies that a Verifier's own submission has its approve and reject actions disabled.</summary>
[Fact]
public void Verifier_OwnSubmission_HasApproveAndRejectDisabled()
{
@@ -216,6 +221,7 @@ public class SecuredWritesTests : BunitContext
});
}
/// <summary>Verifies that approving a pending row as a Verifier calls <c>ApproveAsync</c> on the service.</summary>
[Fact]
public void Verifier_Approve_CallsApproveAsync()
{
@@ -233,6 +239,7 @@ public class SecuredWritesTests : BunitContext
// ── (c) History: terminal rows render ──
/// <summary>Verifies that the history section renders rows in terminal states.</summary>
[Fact]
public void History_RendersTerminalRows()
{
@@ -263,6 +270,7 @@ public class SecuredWritesTests : BunitContext
// ── (d) History pager: page-size 50, driven by TotalCount ──
/// <summary>Verifies that the history pager requests the second page using the total count when Next is clicked.</summary>
[Fact]
public void History_Pager_NextRequestsSecondPage_UsingTotalCount()
{
@@ -285,13 +293,14 @@ public class SecuredWritesTests : BunitContext
cut.Find("[data-test='secured-write-history-next']").Click();
// The history page-2 fetch offsets by one page (skip: 50).
// The history second-page fetch offsets by one page (skip: 50).
_service.Received().ListAsync(
Arg.Any<string?>(), Arg.Any<string?>(), 50, Arg.Any<int>(), Arg.Any<CancellationToken>());
}
// ── (e) Approve dialog surfaces submission age (stale-setpoint scenario) ──
/// <summary>Verifies that the approve confirmation dialog shows the age of the submission.</summary>
[Fact]
public void Approve_ConfirmDialog_ShowsSubmissionAge()
{
@@ -316,6 +325,7 @@ public class SecuredWritesTests : BunitContext
// ── (f) Approve/Reject confirm-button severity (register row 75) ──
/// <summary>Verifies that the approve confirmation dialog uses caution styling rather than destructive styling.</summary>
[Fact]
public void Approve_ConfirmDialog_IsCautionNotDestructive()
{
@@ -343,6 +353,7 @@ public class SecuredWritesTests : BunitContext
Arg.Any<string>(), Arg.Any<string>(), Arg.Any<bool>(), Arg.Any<string?>());
}
/// <summary>Verifies that the reject confirmation dialog keeps its destructive styling.</summary>
[Fact]
public void Reject_ConfirmDialog_KeepsDestructiveStyling()
{
@@ -364,6 +375,7 @@ public class SecuredWritesTests : BunitContext
Arg.Any<string>(), Arg.Any<string>(), danger: true, confirmLabel: "Reject");
}
/// <summary>Verifies that a Viewer does not see the Operator or Verifier regions.</summary>
[Fact]
public void Viewer_DoesNotSeeOperatorOrVerifierRegions()
{