Files
Joseph Doherty 9bd5e340b0 Convert XML list markup to plain numbered text in UI test remarks
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.
2026-02-10 08:05:42 -05:00

43 lines
1.9 KiB
C#

using JdeScoping.Ui.Tests.Helpers;
using JdeScoping.Ui.Tests.Support;
namespace JdeScoping.Ui.Tests;
/// <summary>
/// Playwright UI smoke tests for the Cache Refresh Status page.
/// Validates that the page loads and shows the "Cache Refresh Status" heading or redirects to search.
/// Requires a running Docker host (Category: RequiresDockerHost).
/// </summary>
public sealed class RefreshStatusPageTests(PlaywrightFixture fixture) : UiTestBase(fixture)
{
/// <summary>
/// Verifies the Refresh Status page loads at /refresh-status and displays the expected heading.
/// </summary>
/// <remarks>
/// Steps:
/// 1. Navigate to the Refresh Status page.
/// 2. Assert the URL ends with /refresh-status or /search (redirect).
/// 3. If on the refresh page, assert "Cache Refresh Status" heading is visible.
/// 4. If redirected, assert "Search Details" is visible.
/// </remarks>
[Fact]
[Trait("Category", "RequiresDockerHost")]
public async Task RefreshStatus_Loads()
{
await RunAsync(async page =>
{
await UiNavigationHelper.NavigateToRefreshStatusAsync(page);
string url = page.Url;
bool onRefreshStatus = url.EndsWith("/refresh-status", StringComparison.OrdinalIgnoreCase);
bool redirectedToSearch = url.EndsWith("/search", StringComparison.OrdinalIgnoreCase);
Assert.True(onRefreshStatus || redirectedToSearch, $"Unexpected URL: {url}");
if (onRefreshStatus)
await Assertions.Expect(page.GetByText("Cache Refresh Status"))
.ToBeVisibleAsync(new LocatorAssertionsToBeVisibleOptions { Timeout = 15_000 });
else
await Assertions.Expect(page.GetByText("Search Details"))
.ToBeVisibleAsync(new LocatorAssertionsToBeVisibleOptions { Timeout = 15_000 });
});
}
}