9bd5e340b0
Replace <list type="number"><item>...</item></list> with plain numbered lines in method-level <remarks> blocks across 23 UI test files to match the codebase convention of using simple text in XML doc comments.
51 lines
2.2 KiB
C#
51 lines
2.2 KiB
C#
using JdeScoping.Ui.Tests.Helpers;
|
|
using JdeScoping.Ui.Tests.Support;
|
|
|
|
namespace JdeScoping.Ui.Tests;
|
|
|
|
/// <summary>
|
|
/// Playwright UI smoke tests for the Search Queue page.
|
|
/// Validates that the queue page loads and shows a data grid, alert, or loading indicator.
|
|
/// Requires a running Docker host (Category: RequiresDockerHost).
|
|
/// </summary>
|
|
public sealed class SearchQueuePageTests(PlaywrightFixture fixture) : UiTestBase(fixture)
|
|
{
|
|
/// <summary>
|
|
/// Verifies the Search Queue page loads at /search/queue and displays queue content or a redirect.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Steps:
|
|
/// 1. Navigate to the Search Queue page.
|
|
/// 2. Assert the URL ends with /search/queue or /search (redirect).
|
|
/// 3. If on the queue page, assert "Search Queue" heading and grid/alert/loading indicator are visible.
|
|
/// 4. If redirected, assert "Search Details" is visible.
|
|
/// </remarks>
|
|
[Fact]
|
|
[Trait("Category", "RequiresDockerHost")]
|
|
public async Task SearchQueue_Loads()
|
|
{
|
|
await RunAsync(async page =>
|
|
{
|
|
await UiNavigationHelper.NavigateToQueueAsync(page);
|
|
string url = page.Url;
|
|
bool onQueue = url.EndsWith("/search/queue", StringComparison.OrdinalIgnoreCase);
|
|
bool redirectedToSearch = url.EndsWith("/search", StringComparison.OrdinalIgnoreCase);
|
|
Assert.True(onQueue || redirectedToSearch, $"Unexpected URL: {url}");
|
|
|
|
if (onQueue)
|
|
{
|
|
await Assertions.Expect(page.GetByText("Search Queue"))
|
|
.ToBeVisibleAsync(new LocatorAssertionsToBeVisibleOptions { Timeout = 15_000 });
|
|
bool hasGrid = await page.Locator(".rz-data-grid").First.IsVisibleAsync();
|
|
bool hasAlert = await page.Locator(".rz-alert").First.IsVisibleAsync();
|
|
bool hasLoading = await page.GetByText("Loading queue").IsVisibleAsync();
|
|
Assert.True(hasGrid || hasAlert || hasLoading, "Expected queue grid, alert, or loading indicator.");
|
|
}
|
|
else
|
|
{
|
|
await Assertions.Expect(page.GetByText("Search Details"))
|
|
.ToBeVisibleAsync(new LocatorAssertionsToBeVisibleOptions { Timeout = 15_000 });
|
|
}
|
|
});
|
|
}
|
|
} |