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:
+19
-1
@@ -5,7 +5,7 @@ namespace ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests.SiteCalls;
|
||||
|
||||
/// <summary>
|
||||
/// Direct-SQL seeding helper for the Site Calls page Playwright E2E tests
|
||||
/// (Site Call Audit #22, follow-ups Task 6).
|
||||
/// (Site Call Audit).
|
||||
///
|
||||
/// <para>
|
||||
/// The Site Calls page reads the central <c>SiteCalls</c> table through the
|
||||
@@ -38,6 +38,19 @@ internal static class SiteCallDataSeeder
|
||||
/// needs for its grid assertions. <c>TrackedOperationId</c> is stored as the
|
||||
/// 36-character GUID string the entity mapping expects.
|
||||
/// </summary>
|
||||
/// <param name="trackedOperationId">The tracked operation id of the row.</param>
|
||||
/// <param name="channel">The channel of the site call.</param>
|
||||
/// <param name="target">The target of the site call.</param>
|
||||
/// <param name="sourceSite">The identifier of the originating site.</param>
|
||||
/// <param name="status">The status of the site call.</param>
|
||||
/// <param name="retryCount">The retry count.</param>
|
||||
/// <param name="createdAtUtc">The UTC creation time.</param>
|
||||
/// <param name="updatedAtUtc">The UTC time of the last update.</param>
|
||||
/// <param name="lastError">The last error message, if any.</param>
|
||||
/// <param name="httpStatus">The HTTP status code of the last attempt, if any.</param>
|
||||
/// <param name="terminalAtUtc">The UTC time the call reached a terminal status, if any.</param>
|
||||
/// <param name="ct">A token to cancel the operation.</param>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
public static async Task InsertSiteCallAsync(
|
||||
Guid trackedOperationId,
|
||||
string channel,
|
||||
@@ -84,6 +97,9 @@ VALUES
|
||||
/// starts with <paramref name="targetPrefix"/>. Swallows all errors — the
|
||||
/// prefix carries a per-run GUID so the rows are unique to this test run.
|
||||
/// </summary>
|
||||
/// <param name="targetPrefix">The target prefix identifying the rows to delete.</param>
|
||||
/// <param name="ct">A token to cancel the operation.</param>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
public static async Task DeleteByTargetPrefixAsync(string targetPrefix, CancellationToken ct = default)
|
||||
{
|
||||
try
|
||||
@@ -107,6 +123,8 @@ VALUES
|
||||
/// setup on this so a downed cluster surfaces a clear message rather than an
|
||||
/// opaque <see cref="SqlException"/>.
|
||||
/// </summary>
|
||||
/// <param name="ct">A token to cancel the operation.</param>
|
||||
/// <returns>A task that resolves to <c>true</c> when the configuration database is reachable; otherwise <c>false</c>.</returns>
|
||||
public static async Task<bool> IsAvailableAsync(CancellationToken ct = default)
|
||||
{
|
||||
try
|
||||
|
||||
+22
-7
@@ -4,8 +4,7 @@ using Xunit;
|
||||
namespace ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests.SiteCalls;
|
||||
|
||||
/// <summary>
|
||||
/// End-to-end coverage for the central Site Calls page (Site Call Audit #22,
|
||||
/// follow-ups Task 6).
|
||||
/// End-to-end coverage for the central Site Calls page (Site Call Audit).
|
||||
///
|
||||
/// <para>
|
||||
/// Each test seeds its own <c>SiteCalls</c> rows directly into the running
|
||||
@@ -14,13 +13,13 @@ namespace ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests.SiteCalls;
|
||||
/// their <c>Target</c> prefix. The Site Calls page reads the <c>SiteCalls</c>
|
||||
/// table through the <c>SiteCallAuditActor</c> (a pure read-from-table mirror),
|
||||
/// so a directly-INSERTed row surfaces exactly as a telemetry-ingested row
|
||||
/// would — the same seeding model the Audit Log E2E tests use. The pattern
|
||||
/// would — the same seeding model the Audit Log end-to-end tests use. The pattern
|
||||
/// keeps each test self-contained without touching
|
||||
/// <c>infra/mssql/seed-config.sql</c>.
|
||||
/// </para>
|
||||
///
|
||||
/// <para>
|
||||
/// Scenarios covered (per the Task 6 brief):
|
||||
/// Scenarios covered:
|
||||
/// <list type="bullet">
|
||||
/// <item><c>PageLoads</c> — the page renders for a Deployment-role user.</item>
|
||||
/// <item><c>FilterNarrowing</c> — a channel filter narrows the results grid.</item>
|
||||
@@ -31,7 +30,7 @@ namespace ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests.SiteCalls;
|
||||
/// <item><c>RetryClickThrough</c> — clicking Retry on a Parked row confirms
|
||||
/// the dialog, relays to the owning site, and surfaces an outcome toast.</item>
|
||||
/// <item><c>DiscardClickThrough</c> — clicking Discard on a Parked row confirms
|
||||
/// the danger dialog ("Discard" since the row-28 explicit labels), relays to the owning site, and surfaces an
|
||||
/// the danger dialog ("Discard", an explicit label), relays to the owning site, and surfaces an
|
||||
/// outcome toast.</item>
|
||||
/// </list>
|
||||
/// </para>
|
||||
@@ -49,6 +48,8 @@ public class SiteCallsPageTests
|
||||
|
||||
private readonly PlaywrightFixture _fixture;
|
||||
|
||||
/// <summary>Initializes the test class with the shared Playwright fixture.</summary>
|
||||
/// <param name="fixture">The shared Playwright fixture.</param>
|
||||
public SiteCallsPageTests(PlaywrightFixture fixture)
|
||||
{
|
||||
_fixture = fixture;
|
||||
@@ -88,6 +89,8 @@ public class SiteCallsPageTests
|
||||
await search.DispatchEventAsync("change");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the Site Calls page loads for a user with the Deployment role.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task PageLoads_ForDeploymentUser()
|
||||
{
|
||||
@@ -106,6 +109,8 @@ public class SiteCallsPageTests
|
||||
"SiteCallDataSeeder cannot reach MSSQL at localhost:1433 — bring up infra/docker-compose and docker/deploy.sh, " +
|
||||
"or set SCADABRIDGE_PLAYWRIGHT_DB to a reachable connection string.";
|
||||
|
||||
/// <summary>Verifies that applying a channel filter shrinks the results grid.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[SkippableFact]
|
||||
public async Task FilterNarrowing_ChannelFilterShrinksGrid()
|
||||
{
|
||||
@@ -162,6 +167,8 @@ public class SiteCallsPageTests
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the view audit history link navigates to the Audit Log pre-filtered to the call.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[SkippableFact]
|
||||
public async Task DrillIn_ViewAuditHistory_NavigatesToPreFilteredAuditLog()
|
||||
{
|
||||
@@ -209,6 +216,8 @@ public class SiteCallsPageTests
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the Retry and Discard actions are visible only on parked rows.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[SkippableFact]
|
||||
public async Task RetryDiscard_VisibleOnlyOnParkedRows()
|
||||
{
|
||||
@@ -266,6 +275,8 @@ public class SiteCallsPageTests
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Verifies that retrying a parked row confirms the dialog, relays to the site and shows an outcome toast.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[SkippableFact]
|
||||
public async Task RetryClickThrough_OnParkedRow_ConfirmsRelayAndShowsOutcomeToast()
|
||||
{
|
||||
@@ -336,9 +347,10 @@ public class SiteCallsPageTests
|
||||
/// Mirrors <see cref="RetryClickThrough_OnParkedRow_ConfirmsRelayAndShowsOutcomeToast"/>
|
||||
/// but exercises the Discard path: clicking Discard opens a <em>danger</em>
|
||||
/// confirm modal (Dialog.ConfirmAsync with <c>danger: true</c>), whose footer
|
||||
/// button is labelled "Discard" (explicit label since row 28; not "Confirm"). Confirming relays a discard to
|
||||
/// button is labelled "Discard" (an explicit label, not "Confirm"). Confirming relays a discard to
|
||||
/// the owning site and <c>ShowRelayOutcome</c> surfaces exactly one outcome toast.
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[SkippableFact]
|
||||
public async Task DiscardClickThrough_OnParkedRow_ConfirmsRelayAndShowsOutcomeToast()
|
||||
{
|
||||
@@ -401,6 +413,7 @@ public class SiteCallsPageTests
|
||||
/// <c>FilterPermittedAsync</c> drops rows whose source site is not permitted.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[SkippableFact]
|
||||
public async Task StatusFilter_NarrowsToSelectedStatus()
|
||||
{
|
||||
@@ -470,6 +483,7 @@ public class SiteCallsPageTests
|
||||
/// <see cref="IPage.GetByText(string,PageGetByTextOptions)"/> instead.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[SkippableFact]
|
||||
public async Task EmptyState_NoMatch_ShowsEmptyCard()
|
||||
{
|
||||
@@ -513,6 +527,7 @@ public class SiteCallsPageTests
|
||||
/// mid-fetch — reading button state before the fetch settles would race.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[SkippableFact]
|
||||
public async Task Pagination_KeysetNextAndPrev_TraversesPages()
|
||||
{
|
||||
@@ -546,7 +561,7 @@ public class SiteCallsPageTests
|
||||
await SetSearchKeywordAsync(page, sharedTarget);
|
||||
await page.ClickAsync("[data-test='site-calls-query']");
|
||||
|
||||
// The M10 KeysetPager summary span (`Page {N} · {rows} rows`), exposed
|
||||
// The KeysetPager summary span (`Page {N} · {rows} rows`), exposed
|
||||
// via its stable data-test hook so a future markup tweak can't make this
|
||||
// match ambiguous under strict mode.
|
||||
var pageIndicator = page.Locator("[data-test='keyset-summary']");
|
||||
|
||||
Reference in New Issue
Block a user