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:
@@ -5,16 +5,16 @@ using ZB.MOM.WW.ScadaBridge.Commons.Types.Debugging;
|
||||
namespace ZB.MOM.WW.ScadaBridge.CentralUI.Tests.Deployment;
|
||||
|
||||
/// <summary>
|
||||
/// Flow Debugger outbound-calls plan (2026-09-06) Task 8: the step detail panel's Lifecycle tab,
|
||||
/// outbound "Where this ran" fields and kind-specific Input tab labels. Follow-ups plan (2026-09-06)
|
||||
/// Task 6: report deep links from a correlated outbound step and Retry/Discard on a parked one (D2/D5).
|
||||
/// Step-logs plan (2026-09-09) Task 12: the Log tab — exception block, level-filtered lines and the
|
||||
/// cross-step hint (design D8).
|
||||
/// Tests for the Flow Debugger step detail panel: the Lifecycle tab, outbound "Where this ran" fields
|
||||
/// and kind-specific Input tab labels; report deep links from a correlated outbound step and
|
||||
/// Retry/Discard on a parked one (D2/D5); and the Log tab — exception block, level-filtered lines and
|
||||
/// the cross-step hint (design D8).
|
||||
/// </summary>
|
||||
public class FlowStepDetailTests : BunitContext
|
||||
{
|
||||
private static readonly DateTimeOffset T0 = new(2026, 9, 6, 12, 0, 0, TimeSpan.Zero);
|
||||
|
||||
/// <summary>Initializes the test context with loose JS interop so the Log tab's clipboard calls are accepted.</summary>
|
||||
public FlowStepDetailTests()
|
||||
{
|
||||
// The Log tab's Copy buttons call navigator.clipboard through IJSRuntime.
|
||||
@@ -59,6 +59,7 @@ public class FlowStepDetailTests : BunitContext
|
||||
new(Guid.NewGuid(), "CachedResolve", terminalStatus, T0.AddMilliseconds(4100), "node-b", null, null),
|
||||
];
|
||||
|
||||
/// <summary>Verifies that the Lifecycle tab renders its rows in time order and shows who delivered the operation.</summary>
|
||||
[Fact]
|
||||
public void LifecycleTab_RendersRowsInTimeOrder_AndDeliveredBy()
|
||||
{
|
||||
@@ -84,6 +85,7 @@ public class FlowStepDetailTests : BunitContext
|
||||
Assert.Empty(cut.FindAll("[data-test=flow-step-parked-hint]"));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a step without lifecycle rows hides the Lifecycle tab.</summary>
|
||||
[Fact]
|
||||
public void NoLifecycle_HidesTheTab()
|
||||
{
|
||||
@@ -93,6 +95,7 @@ public class FlowStepDetailTests : BunitContext
|
||||
Assert.Equal("Input", cut.Find("[data-test=flow-step-tab-input]").TextContent.Trim());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a parked notification step shows the hint, the list label and a parked badge.</summary>
|
||||
[Fact]
|
||||
public void ParkedNotify_ShowsHint_AndListLabel_AndParkedBadge()
|
||||
{
|
||||
@@ -115,6 +118,10 @@ public class FlowStepDetailTests : BunitContext
|
||||
Assert.Contains("Site Calls / Notification", cut.Find("[data-test=flow-step-parked-hint]").TextContent);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that each outbound step kind labels its Input tab and target field appropriately.</summary>
|
||||
/// <param name="kind">The outbound step kind under test.</param>
|
||||
/// <param name="inputLabel">The expected label of the Input tab.</param>
|
||||
/// <param name="targetLabel">The expected label of the target field.</param>
|
||||
[Theory]
|
||||
[InlineData(FlowStepKind.ApiCall, "Request", "System")]
|
||||
[InlineData(FlowStepKind.DbCall, "SQL + parameters", "Connection")]
|
||||
@@ -127,6 +134,7 @@ public class FlowStepDetailTests : BunitContext
|
||||
Assert.Contains(targetLabel, cut.Find("[data-test=flow-step-where]").TextContent);
|
||||
Assert.Equal("Pending", cut.Find("[data-test=flow-step-outcome]").TextContent.Trim());
|
||||
}
|
||||
/// <summary>Verifies that an outbound step with a correlation id links to its report page.</summary>
|
||||
[Fact]
|
||||
public void OutboundStepWithCorrelation_LinksToTheReportPage()
|
||||
{
|
||||
@@ -149,6 +157,7 @@ public class FlowStepDetailTests : BunitContext
|
||||
Assert.Empty(cut.FindAll("[data-test=open-report]"));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a parked step with callbacks shows Retry and Discard actions.</summary>
|
||||
[Fact]
|
||||
public void ParkedStep_WithCallbacks_ShowsRetryAndDiscard()
|
||||
{
|
||||
@@ -187,6 +196,7 @@ public class FlowStepDetailTests : BunitContext
|
||||
Assert.True(cut.Find("button[data-test=flow-step-discard]").HasAttribute("disabled"));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a parked step without callbacks shows only the hint link.</summary>
|
||||
[Fact]
|
||||
public void ParkedStep_WithoutCallbacks_ShowsOnlyTheHintLink()
|
||||
{
|
||||
@@ -205,6 +215,7 @@ public class FlowStepDetailTests : BunitContext
|
||||
Assert.Equal($"/notifications/report?correlationId={c:N}", hintLink!.GetAttribute("href"));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a successful step never shows Retry or Discard actions.</summary>
|
||||
[Fact]
|
||||
public void OkStep_NeverShowsActions()
|
||||
{
|
||||
@@ -218,6 +229,7 @@ public class FlowStepDetailTests : BunitContext
|
||||
Assert.Empty(cut.FindAll("[data-test=flow-step-discard]"));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a step with no log lines and no error detail hides the Log tab.</summary>
|
||||
[Fact]
|
||||
public void NoLinesAndNoDetail_HidesTheLogTab()
|
||||
{
|
||||
@@ -225,6 +237,7 @@ public class FlowStepDetailTests : BunitContext
|
||||
Assert.Empty(cut.FindAll("[data-test=flow-step-tab-log]"));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the Log tab shows a count of its lines.</summary>
|
||||
[Fact]
|
||||
public void LogTab_CountsItsLines()
|
||||
{
|
||||
@@ -239,6 +252,7 @@ public class FlowStepDetailTests : BunitContext
|
||||
Assert.Equal("Log (3)", cut.Find("[data-test=flow-step-tab-log]").TextContent.Trim());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a failed step with error detail opens on the Log tab and renders the exception block.</summary>
|
||||
[Fact]
|
||||
public void FailedStepWithDetail_OpensOnLog_AndRendersTheExceptionBlock()
|
||||
{
|
||||
@@ -254,10 +268,11 @@ public class FlowStepDetailTests : BunitContext
|
||||
Assert.NotNull(cut.Find("[data-test=flow-step-exception-copy]"));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the exception block header names the innermost exception type in full for a wrapped exception.</summary>
|
||||
[Fact]
|
||||
public void WrappedException_TheBlockHeaderNamesTheINNERMOSTType_InFull()
|
||||
{
|
||||
// Final review M1: the panel used to parse the OUTERMOST exception of a " ---> " chain
|
||||
// The panel used to parse the OUTERMOST exception of a " ---> " chain
|
||||
// while the graph node's subtitle showed the innermost — the two now share
|
||||
// ExceptionHeader, which always follows the chain to its end. The panel still shows the
|
||||
// type with its namespace (only the node badge shortens it), and the raw detail is
|
||||
@@ -275,6 +290,7 @@ public class FlowStepDetailTests : BunitContext
|
||||
Assert.Contains("System.AggregateException", exc.QuerySelector("pre")!.TextContent);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a successful step with log lines opens on the Input tab.</summary>
|
||||
[Fact]
|
||||
public void OkStepWithLines_OpensOnInput()
|
||||
{
|
||||
@@ -286,6 +302,7 @@ public class FlowStepDetailTests : BunitContext
|
||||
Assert.Empty(cut.FindAll("[data-test=flow-step-exception]"));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the warning filter leaves only warning and error rows.</summary>
|
||||
[Fact]
|
||||
public void WarnFilter_LeavesOnlyWarnAndErrorRows()
|
||||
{
|
||||
@@ -311,6 +328,7 @@ public class FlowStepDetailTests : BunitContext
|
||||
Assert.Equal(4, cut.FindAll("[data-test=flow-step-log-lines] tr[data-level]").Count);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the hint names another step of the same execution and selects it when clicked.</summary>
|
||||
[Fact]
|
||||
public void Hint_NamesAnotherStepOfTheSameExecution_AndSelectsIt()
|
||||
{
|
||||
@@ -336,6 +354,7 @@ public class FlowStepDetailTests : BunitContext
|
||||
Assert.Same(other, picked);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a hint without a select callback is rendered as plain text.</summary>
|
||||
[Fact]
|
||||
public void Hint_WithoutASelectCallback_IsPlainText()
|
||||
{
|
||||
@@ -352,6 +371,7 @@ public class FlowStepDetailTests : BunitContext
|
||||
Assert.Null(hint.QuerySelector("button"));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the see-exception link in the output alert switches to the Log tab.</summary>
|
||||
[Fact]
|
||||
public void OutputAlert_SeeExceptionLink_SwitchesToTheLogTab()
|
||||
{
|
||||
@@ -367,6 +387,7 @@ public class FlowStepDetailTests : BunitContext
|
||||
Assert.NotNull(cut.Find("[data-test=flow-step-exception]"));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a runtime-sourced log line shows its source and any attached exception.</summary>
|
||||
[Fact]
|
||||
public void RuntimeSourcedLine_ShowsItsSource_AndAnAttachedException()
|
||||
{
|
||||
@@ -384,6 +405,7 @@ public class FlowStepDetailTests : BunitContext
|
||||
Assert.Contains("System.TimeoutException", row.QuerySelector("details pre")!.TextContent);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that switching steps keeps the selected tab when it is still valid for the new step.</summary>
|
||||
[Fact]
|
||||
public void SwitchingSteps_KeepsAStillValidTab()
|
||||
{
|
||||
@@ -400,6 +422,7 @@ public class FlowStepDetailTests : BunitContext
|
||||
Assert.DoesNotContain("active", cut.Find("[data-test=flow-step-tab-input]").ClassName);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that refreshing the same step keeps the selected tab and the level filter.</summary>
|
||||
[Fact]
|
||||
public void RefreshingTheSameStep_KeepsTheTabAndTheLevelFilter()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user