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:
@@ -8,11 +8,15 @@ public class SiteCrudTests
|
||||
{
|
||||
private readonly PlaywrightFixture _fixture;
|
||||
|
||||
/// <summary>Creates the test class with the shared Playwright fixture.</summary>
|
||||
/// <param name="fixture">The shared Playwright fixture.</param>
|
||||
public SiteCrudTests(PlaywrightFixture fixture)
|
||||
{
|
||||
_fixture = fixture;
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the sites page shows the site management view.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task SitesPage_ShowsSiteManagement()
|
||||
{
|
||||
@@ -27,6 +31,8 @@ public class SiteCrudTests
|
||||
await Expect(page.Locator("button:has-text('Add Site')")).ToBeVisibleAsync();
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the add site button navigates to the create page.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task AddSiteButton_NavigatesToCreatePage()
|
||||
{
|
||||
@@ -41,6 +47,8 @@ public class SiteCrudTests
|
||||
Assert.True(inputCount >= 2, $"Expected at least 2 inputs, found {inputCount}");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the back button on the create page returns to the site list.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task CreatePage_BackButton_ReturnsToList()
|
||||
{
|
||||
@@ -54,6 +62,8 @@ public class SiteCrudTests
|
||||
await Expect(page.Locator("h4:has-text('Site Management')")).ToBeVisibleAsync();
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the cancel button on the create page returns to the site list.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task CreatePage_CancelButton_ReturnsToList()
|
||||
{
|
||||
@@ -66,6 +76,8 @@ public class SiteCrudTests
|
||||
await PlaywrightFixture.WaitForPathAsync(page, "/admin/sites", excludePath: "/create");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the create page has node address subsections.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task CreatePage_HasNodeSubsections()
|
||||
{
|
||||
@@ -81,6 +93,8 @@ public class SiteCrudTests
|
||||
await Expect(page.Locator(".card-header:has-text('Node B')")).ToBeVisibleAsync();
|
||||
}
|
||||
|
||||
/// <summary>Verifies that saving without a name shows an error.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task CreatePage_SaveWithoutName_ShowsError()
|
||||
{
|
||||
@@ -99,6 +113,7 @@ public class SiteCrudTests
|
||||
/// Full create → edit → delete round-trip for a site via the Central UI.
|
||||
/// Uses CliRunner for best-effort teardown so no zztest-* site leaks on failure.
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[SkippableFact]
|
||||
public async Task CreateEditDelete_Site_RoundTrips()
|
||||
{
|
||||
@@ -205,6 +220,7 @@ public class SiteCrudTests
|
||||
/// (a raw EF message) and stays on /create. The Name is deliberately distinct so
|
||||
/// only the SiteIdentifier unique index can trip (not the Name unique index).
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[SkippableFact]
|
||||
public async Task Create_DuplicateIdentifier_ShowsSaveFailedError()
|
||||
{
|
||||
@@ -243,6 +259,7 @@ public class SiteCrudTests
|
||||
/// (like Back) calls GoBack() → /admin/sites with NO dirty-check and NO persistence,
|
||||
/// so re-opening the edit must show the ORIGINAL (empty) Description.
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[SkippableFact]
|
||||
public async Task EditCancel_DiscardsChanges()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user