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 LoginTests
|
||||
{
|
||||
private readonly PlaywrightFixture _fixture;
|
||||
|
||||
/// <summary>Initializes the tests with the shared Playwright fixture.</summary>
|
||||
/// <param name="fixture">The shared Playwright fixture.</param>
|
||||
public LoginTests(PlaywrightFixture fixture)
|
||||
{
|
||||
_fixture = fixture;
|
||||
}
|
||||
|
||||
/// <summary>Verifies that an unauthenticated user is redirected to the login page.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task UnauthenticatedUser_RedirectsToLogin()
|
||||
{
|
||||
@@ -30,6 +34,8 @@ public class LoginTests
|
||||
await Expect(page.Locator("button[type='submit']")).ToHaveTextAsync("Sign in");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that valid credentials authenticate the user successfully.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task ValidCredentials_AuthenticatesSuccessfully()
|
||||
{
|
||||
@@ -39,6 +45,8 @@ public class LoginTests
|
||||
Assert.DoesNotContain("/login", page.Url);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that invalid credentials show an error on the login page.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task InvalidCredentials_ShowsError()
|
||||
{
|
||||
@@ -66,6 +74,8 @@ public class LoginTests
|
||||
Assert.Equal(200, status); // redirect followed to login page
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the token endpoint returns a JWT for valid credentials.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task TokenEndpoint_ReturnsJwt()
|
||||
{
|
||||
@@ -91,6 +101,8 @@ public class LoginTests
|
||||
Assert.Equal("multi-role", result.GetProperty("username").GetString());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the token endpoint returns HTTP 401 for invalid credentials.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task TokenEndpoint_InvalidCredentials_Returns401()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user