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:
@@ -9,6 +9,8 @@ public class ApiMethodFormTests
|
||||
{
|
||||
private readonly PlaywrightFixture _pw;
|
||||
|
||||
/// <summary>Initializes the test class with the shared Playwright fixture.</summary>
|
||||
/// <param name="pw">The shared Playwright fixture.</param>
|
||||
public ApiMethodFormTests(PlaywrightFixture pw)
|
||||
{
|
||||
_pw = pw;
|
||||
@@ -21,6 +23,7 @@ public class ApiMethodFormTests
|
||||
/// inline "Name and script required." error. The form does not navigate, so nothing is
|
||||
/// saved — this fixture name never reaches the database.
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[SkippableFact]
|
||||
public async Task CreateForm_NameWithoutScript_ShowsInlineError()
|
||||
{
|
||||
@@ -33,7 +36,7 @@ public class ApiMethodFormTests
|
||||
await Assertions.Expect(page.Locator("h4:has-text('Add API Method')")).ToBeVisibleAsync();
|
||||
|
||||
// The form has several text inputs (Name + SchemaBuilder/parameter rows that also
|
||||
// carry .form-control), so anchor the Name input to its labelled mb-3 wrapper and
|
||||
// carry .form-control), so anchor the Name input to its labelled wrapper and
|
||||
// require .form-control (the peer ExternalSystemCrudTests pattern). The count guard
|
||||
// makes any future selector ambiguity fail loudly instead of filling the wrong field.
|
||||
var nameInput = page.Locator("div.mb-3:has(label:has-text('Name')) input[type=text].form-control");
|
||||
@@ -57,6 +60,7 @@ public class ApiMethodFormTests
|
||||
/// delete round-trip is the behavior under test. A best-effort CLI delete in finally
|
||||
/// guarantees no zztest-method-* row leaks if the UI path fails mid-way.
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[SkippableFact]
|
||||
public async Task CliCreated_Method_VisibleAndDeletes()
|
||||
{
|
||||
|
||||
+4
@@ -9,6 +9,8 @@ public class DataConnectionCrudTests
|
||||
{
|
||||
private readonly PlaywrightFixture _pw;
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="DataConnectionCrudTests"/> class.</summary>
|
||||
/// <param name="pw">The shared Playwright fixture.</param>
|
||||
public DataConnectionCrudTests(PlaywrightFixture pw)
|
||||
{
|
||||
_pw = pw;
|
||||
@@ -22,6 +24,7 @@ public class DataConnectionCrudTests
|
||||
/// CLI (a minimal create needs no primary config) and only drive the delete via the UI.
|
||||
/// The best-effort <c>finally</c> is a safety net: the happy path deletes via the UI.
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[SkippableFact]
|
||||
public async Task CliCreated_Connection_DeletesViaTree()
|
||||
{
|
||||
@@ -89,6 +92,7 @@ public class DataConnectionCrudTests
|
||||
/// The "+ Connection" button is gated on a tree-node selection: it starts disabled
|
||||
/// and only enables once a site (or connection) node is selected. Mutates nothing.
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[SkippableFact]
|
||||
public async Task CreateButton_GatedOnNodeSelection()
|
||||
{
|
||||
|
||||
+5
-1
@@ -9,6 +9,8 @@ public class ExternalSystemCrudTests
|
||||
{
|
||||
private readonly PlaywrightFixture _pw;
|
||||
|
||||
/// <summary>Initializes the tests with the shared Playwright fixture.</summary>
|
||||
/// <param name="pw">The shared Playwright browser fixture.</param>
|
||||
public ExternalSystemCrudTests(PlaywrightFixture pw)
|
||||
{
|
||||
_pw = pw;
|
||||
@@ -19,6 +21,7 @@ public class ExternalSystemCrudTests
|
||||
/// Uses CliRunner for best-effort teardown so no zztest-extsys-* definition leaks on
|
||||
/// failure (the happy path already deletes via the UI).
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[SkippableFact]
|
||||
public async Task Create_Delete_RoundTrips()
|
||||
{
|
||||
@@ -37,7 +40,7 @@ public class ExternalSystemCrudTests
|
||||
|
||||
// ExternalSystemForm.razor has THREE input[type=text].form-control fields
|
||||
// (Name, Endpoint URL, and Auth Config JSON), so index-based selection is
|
||||
// fragile. Anchor each fill to its own div.mb-3 wrapper via the field label
|
||||
// fragile. Anchor each fill to its own form-group wrapper div via the field label
|
||||
// so the selectors survive field reordering and uniquely match one element.
|
||||
await page.Locator("div.mb-3:has(label:has-text('Name')) input[type=text].form-control")
|
||||
.FillAsync(name);
|
||||
@@ -86,6 +89,7 @@ public class ExternalSystemCrudTests
|
||||
/// Saving the create form with both fields blank surfaces the inline validation
|
||||
/// error and keeps the user on the create page. Mutates nothing.
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[SkippableFact]
|
||||
public async Task CreateForm_EmptyFields_ShowsInlineError()
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ using Xunit;
|
||||
namespace ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests.Design;
|
||||
|
||||
/// <summary>
|
||||
/// Browser-level coverage for the M9 design surfaces, run against the live dev cluster:
|
||||
/// Browser-level coverage for the design surfaces, run against the live dev cluster:
|
||||
/// <list type="bullet">
|
||||
/// <item>the <c>/design/templates</c> tree search filter (TemplateFolderTree pruning),</item>
|
||||
/// <item>the <c>/design/schema-library</c> page (render-smoke + UI create→delete round-trip),</item>
|
||||
@@ -22,6 +22,8 @@ public class M9SurfaceTests
|
||||
{
|
||||
private readonly PlaywrightFixture _pw;
|
||||
|
||||
/// <summary>Initializes a new instance of the test class.</summary>
|
||||
/// <param name="pw">The shared Playwright fixture.</param>
|
||||
public M9SurfaceTests(PlaywrightFixture pw)
|
||||
{
|
||||
_pw = pw;
|
||||
@@ -34,6 +36,7 @@ public class M9SurfaceTests
|
||||
/// DOM. The filter rebuilds <c>_visibleRoots</c> from matches only — non-matches are gone,
|
||||
/// not CSS-hidden — so a <c>ToHaveCountAsync(0)</c> on the non-match is the correct assertion.
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[SkippableFact]
|
||||
public async Task TemplateSearch_FiltersTree()
|
||||
{
|
||||
@@ -90,6 +93,7 @@ public class M9SurfaceTests
|
||||
/// the SchemaBuilder editor, and the success/delete toasts all render with no circuit crash.
|
||||
/// The DB safety-net <c>finally</c> only fires if the UI delete failed mid-flow.
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[SkippableFact]
|
||||
public async Task SchemaLibrary_CreateDelete_RoundTrips()
|
||||
{
|
||||
@@ -157,6 +161,7 @@ public class M9SurfaceTests
|
||||
/// sites exist on the live cluster, so the picker (rather than the "no other site" fallback)
|
||||
/// renders.
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[SkippableFact]
|
||||
public async Task MoveConnectionDialog_OpensWithSitePicker()
|
||||
{
|
||||
|
||||
@@ -9,6 +9,8 @@ public class SharedScriptCrudTests
|
||||
{
|
||||
private readonly PlaywrightFixture _pw;
|
||||
|
||||
/// <summary>Initializes the test class with the shared Playwright fixture.</summary>
|
||||
/// <param name="pw">The shared Playwright fixture.</param>
|
||||
public SharedScriptCrudTests(PlaywrightFixture pw)
|
||||
{
|
||||
_pw = pw;
|
||||
@@ -21,6 +23,7 @@ public class SharedScriptCrudTests
|
||||
/// best-effort CLI delete in finally guarantees no zztest-script-* definition leaks
|
||||
/// if the UI path fails mid-way (the happy path already deletes via the UI).
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[SkippableFact]
|
||||
public async Task CliCreated_Script_DeletesViaCard()
|
||||
{
|
||||
@@ -72,6 +75,7 @@ public class SharedScriptCrudTests
|
||||
/// the Monaco editor surface. Asserts render only — does NOT click Save, Check Syntax,
|
||||
/// or Test Run (Test Run fires real I/O). Mutates nothing.
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[SkippableFact]
|
||||
public async Task CreateForm_Renders()
|
||||
{
|
||||
|
||||
@@ -16,12 +16,21 @@ public class TemplateCrudTests : IClassFixture<DeploymentFixture>
|
||||
private readonly PlaywrightFixture _fixture;
|
||||
private readonly DeploymentFixture _cluster;
|
||||
|
||||
/// <summary>Initializes the test class with the shared Playwright and cluster fixtures.</summary>
|
||||
/// <param name="fixture">The fixture.</param>
|
||||
/// <param name="cluster">The cluster.</param>
|
||||
/// <summary>Initializes the test class with the shared Playwright and cluster fixtures.</summary>
|
||||
/// <param name="fixture">The fixture.</param>
|
||||
/// <param name="cluster">The cluster.</param>
|
||||
public TemplateCrudTests(PlaywrightFixture fixture, DeploymentFixture cluster)
|
||||
{
|
||||
_fixture = fixture;
|
||||
/// <summary>Verifies that a template can be created, given an attribute and deleted again.</summary>
|
||||
_cluster = cluster;
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a template can be created, given an attribute and deleted again.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[SkippableFact]
|
||||
public async Task CreateAddAttributeDelete_Template_RoundTrips()
|
||||
{
|
||||
@@ -126,10 +135,13 @@ public class TemplateCrudTests : IClassFixture<DeploymentFixture>
|
||||
catch
|
||||
{
|
||||
// Best-effort — swallow to avoid masking the original test failure.
|
||||
/// <summary>Verifies that creating a template with a duplicate name shows an inline error.</summary>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Verifies that creating a template with a duplicate name shows an inline error.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[SkippableFact]
|
||||
public async Task CreateTemplate_DuplicateName_ShowsInlineError()
|
||||
{
|
||||
@@ -175,11 +187,14 @@ public class TemplateCrudTests : IClassFixture<DeploymentFixture>
|
||||
}
|
||||
catch
|
||||
{
|
||||
/// <summary>Verifies that cancelling template creation returns to the list without creating a template.</summary>
|
||||
// Best-effort — swallow to avoid masking the original test failure.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Verifies that cancelling template creation returns to the list without creating a template.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[SkippableFact]
|
||||
public async Task CreateTemplate_Cancel_ReturnsToListWithoutCreating()
|
||||
{
|
||||
@@ -216,12 +231,15 @@ public class TemplateCrudTests : IClassFixture<DeploymentFixture>
|
||||
}
|
||||
}
|
||||
catch
|
||||
/// <summary>Verifies that editing an attribute persists the change.</summary>
|
||||
{
|
||||
// Best-effort — swallow to avoid masking the original test failure.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Verifies that editing an attribute persists the change.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[SkippableFact]
|
||||
public async Task EditAttribute_PersistsChange()
|
||||
{
|
||||
@@ -289,6 +307,7 @@ public class TemplateCrudTests : IClassFixture<DeploymentFixture>
|
||||
await CliRunner.DeleteTemplateAsync(leftover);
|
||||
}
|
||||
}
|
||||
/// <summary>Verifies that deleting a template that has an instance is blocked.</summary>
|
||||
catch
|
||||
{
|
||||
// Best-effort — swallow to avoid masking the original test failure.
|
||||
@@ -296,6 +315,8 @@ public class TemplateCrudTests : IClassFixture<DeploymentFixture>
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Verifies that deleting a template that has an instance is blocked.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[SkippableFact]
|
||||
public async Task DeleteTemplate_WithInstance_IsBlocked()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user