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:
+23
-3
@@ -10,7 +10,7 @@ using ZB.MOM.WW.ScadaBridge.Commons.Types.Enums;
|
||||
namespace ZB.MOM.WW.ScadaBridge.CentralUI.Tests.Components.Audit;
|
||||
|
||||
/// <summary>
|
||||
/// bUnit tests for <see cref="AuditResultsGrid"/> (#23 M7-T3 / Bundle B). The grid
|
||||
/// bUnit tests for <see cref="AuditResultsGrid"/>. The grid
|
||||
/// renders 10 columns, paginates via keyset (passing the last row's
|
||||
/// (OccurredAtUtc, EventId) back to the service), raises a row-click callback
|
||||
/// that Bundle C wires to the drilldown drawer, and styles non-success status
|
||||
@@ -39,6 +39,7 @@ public class AuditResultsGridTests : BunitContext
|
||||
ErrorMessage = status == AuditStatus.Failed ? "boom — unreachable" : null,
|
||||
};
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="AuditResultsGridTests"/> class.</summary>
|
||||
public AuditResultsGridTests()
|
||||
{
|
||||
_service = Substitute.For<IAuditLogQueryService>();
|
||||
@@ -62,6 +63,7 @@ public class AuditResultsGridTests : BunitContext
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>Verifies the case: render, ten Columns, from Stub Service.</summary>
|
||||
[Fact]
|
||||
public void Render_TenColumns_FromStubService()
|
||||
{
|
||||
@@ -84,6 +86,7 @@ public class AuditResultsGridTests : BunitContext
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Verifies the case: click, next Page, calls Service, with Cursor, of Last Row.</summary>
|
||||
[Fact]
|
||||
public void Click_NextPage_CallsService_WithCursor_OfLastRow()
|
||||
{
|
||||
@@ -105,6 +108,7 @@ public class AuditResultsGridTests : BunitContext
|
||||
Assert.Equal(second.EventId, nextCall.Paging.AfterEventId);
|
||||
}
|
||||
|
||||
/// <summary>Verifies the case: click, row, raises On Row Selected.</summary>
|
||||
[Fact]
|
||||
public void Click_Row_RaisesOnRowSelected()
|
||||
{
|
||||
@@ -122,10 +126,11 @@ public class AuditResultsGridTests : BunitContext
|
||||
Assert.Equal(target.EventId, captured!.EventId);
|
||||
}
|
||||
|
||||
/// <summary>Verifies the case: render, includes Node Column, between Site And Channel.</summary>
|
||||
[Fact]
|
||||
public void Render_IncludesNodeColumn_BetweenSiteAndChannel()
|
||||
{
|
||||
// Task 15: the grid surfaces SourceNode in a dedicated "Node" column
|
||||
// The grid surfaces SourceNode in a dedicated "Node" column
|
||||
// positioned between Site and Channel.
|
||||
StubPage(new List<AuditEventView>
|
||||
{
|
||||
@@ -144,6 +149,7 @@ public class AuditResultsGridTests : BunitContext
|
||||
Assert.True(nodeIdx < channelIdx, "Node column must precede Channel.");
|
||||
}
|
||||
|
||||
/// <summary>Verifies the case: render, includes Execution Id Column.</summary>
|
||||
[Fact]
|
||||
public void Render_IncludesExecutionIdColumn()
|
||||
{
|
||||
@@ -158,6 +164,7 @@ public class AuditResultsGridTests : BunitContext
|
||||
Assert.Contains("data-test=\"col-header-ExecutionId\"", cut.Markup);
|
||||
}
|
||||
|
||||
/// <summary>Verifies the case: execution Id, non Null Row, renders Short Monospace Value.</summary>
|
||||
[Fact]
|
||||
public void ExecutionId_NonNullRow_RendersShortMonospaceValue()
|
||||
{
|
||||
@@ -175,6 +182,7 @@ public class AuditResultsGridTests : BunitContext
|
||||
Assert.Equal(executionId.ToString(), cell.GetAttribute("title"));
|
||||
}
|
||||
|
||||
/// <summary>Verifies the case: execution Id, null Row, renders Blank Placeholder, no Execution Id Cell.</summary>
|
||||
[Fact]
|
||||
public void ExecutionId_NullRow_RendersBlankPlaceholder_NoExecutionIdCell()
|
||||
{
|
||||
@@ -187,6 +195,7 @@ public class AuditResultsGridTests : BunitContext
|
||||
Assert.Empty(cut.FindAll($"[data-test=\"execution-id-{row.EventId}\"]"));
|
||||
}
|
||||
|
||||
/// <summary>Verifies the case: render, includes Parent Execution Id Column.</summary>
|
||||
[Fact]
|
||||
public void Render_IncludesParentExecutionIdColumn()
|
||||
{
|
||||
@@ -201,6 +210,7 @@ public class AuditResultsGridTests : BunitContext
|
||||
Assert.Contains("data-test=\"col-header-ParentExecutionId\"", cut.Markup);
|
||||
}
|
||||
|
||||
/// <summary>Verifies the case: parent Execution Id, non Null Row, renders Short Monospace Value.</summary>
|
||||
[Fact]
|
||||
public void ParentExecutionId_NonNullRow_RendersShortMonospaceValue()
|
||||
{
|
||||
@@ -218,6 +228,7 @@ public class AuditResultsGridTests : BunitContext
|
||||
Assert.Equal(parentExecutionId.ToString(), cell.GetAttribute("title"));
|
||||
}
|
||||
|
||||
/// <summary>Verifies the case: parent Execution Id, null Row, renders Blank Placeholder, no Parent Execution Id Cell.</summary>
|
||||
[Fact]
|
||||
public void ParentExecutionId_NullRow_RendersBlankPlaceholder_NoParentExecutionIdCell()
|
||||
{
|
||||
@@ -230,6 +241,7 @@ public class AuditResultsGridTests : BunitContext
|
||||
Assert.Empty(cut.FindAll($"[data-test=\"parent-execution-id-{row.EventId}\"]"));
|
||||
}
|
||||
|
||||
/// <summary>Verifies the case: status, failed Row, has Error Badge Class.</summary>
|
||||
[Fact]
|
||||
public void Status_FailedRow_HasErrorBadgeClass()
|
||||
{
|
||||
@@ -247,7 +259,7 @@ public class AuditResultsGridTests : BunitContext
|
||||
Assert.Contains("bg-success", deliveredBadge.GetAttribute("class") ?? string.Empty);
|
||||
}
|
||||
|
||||
// --- column resize + reorder UX (#23 follow-ups Task 10) ---------------
|
||||
// --- column resize + reorder UX ---------------
|
||||
//
|
||||
// The drag interaction itself is browser-side (audit-grid.js) and covered
|
||||
// by the Playwright suite. The bUnit tests below exercise the .NET-side
|
||||
@@ -265,6 +277,7 @@ public class AuditResultsGridTests : BunitContext
|
||||
private static int HeaderIndex(string markup, string key)
|
||||
=> markup.IndexOf($"data-col-key=\"{key}\"", StringComparison.Ordinal);
|
||||
|
||||
/// <summary>Verifies the case: headers, render Resize Handle And Drag Key, for Every Column.</summary>
|
||||
[Fact]
|
||||
public void Headers_RenderResizeHandleAndDragKey_ForEveryColumn()
|
||||
{
|
||||
@@ -280,6 +293,7 @@ public class AuditResultsGridTests : BunitContext
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Verifies the case: column Order Parameter, drives Header Order.</summary>
|
||||
[Fact]
|
||||
public void ColumnOrderParameter_DrivesHeaderOrder()
|
||||
{
|
||||
@@ -300,6 +314,8 @@ public class AuditResultsGridTests : BunitContext
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Verifies the case: on Column Reordered, moves Column Into Target Slot, and Persists.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task OnColumnReordered_MovesColumnIntoTargetSlot_AndPersists()
|
||||
{
|
||||
@@ -318,6 +334,8 @@ public class AuditResultsGridTests : BunitContext
|
||||
Assert.Contains("Status", (string)save.Arguments[1]!);
|
||||
}
|
||||
|
||||
/// <summary>Verifies the case: on Column Resized, below Minimum, clamps To64px, and Persists.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task OnColumnResized_BelowMinimum_ClampsTo64px_AndPersists()
|
||||
{
|
||||
@@ -335,6 +353,7 @@ public class AuditResultsGridTests : BunitContext
|
||||
i => i.Identifier == "auditGrid.save" && (string)i.Arguments[0]! == "columnWidths");
|
||||
}
|
||||
|
||||
/// <summary>Verifies the case: stored Order, with Unknown Key, degrades Gracefully.</summary>
|
||||
[Fact]
|
||||
public void StoredOrder_WithUnknownKey_DegradesGracefully()
|
||||
{
|
||||
@@ -360,6 +379,7 @@ public class AuditResultsGridTests : BunitContext
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Verifies the case: stored Widths, for Unknown Column, are Ignored.</summary>
|
||||
[Fact]
|
||||
public void StoredWidths_ForUnknownColumn_AreIgnored()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user