Migrate Playwright suite to .NET UI tests and deprecate TS project

This commit is contained in:
Joseph Doherty
2026-02-06 18:44:40 -05:00
parent 4e56ea3435
commit 562f7e9e37
105 changed files with 1119 additions and 0 deletions
@@ -0,0 +1,33 @@
using JdeScoping.Ui.Tests.Helpers;
using JdeScoping.Ui.Tests.Support;
namespace JdeScoping.Ui.Tests;
public sealed class SearchQueuePageTests(PlaywrightFixture fixture) : UiTestBase(fixture)
{
[Fact]
[Trait("Category", "RequiresDockerHost")]
public async Task SearchQueue_Loads()
{
await RunAsync(async page =>
{
await UiNavigationHelper.NavigateToQueueAsync(page);
var url = page.Url;
var onQueue = url.EndsWith("/search/queue", StringComparison.OrdinalIgnoreCase);
var redirectedToSearch = url.EndsWith("/search", StringComparison.OrdinalIgnoreCase);
Assert.True(onQueue || redirectedToSearch, $"Unexpected URL: {url}");
if (onQueue)
{
await Assertions.Expect(page.GetByText("Search Queue")).ToBeVisibleAsync(new() { Timeout = 15_000 });
var hasGrid = await page.Locator(".rz-data-grid").First.IsVisibleAsync();
var hasAlert = await page.Locator(".rz-alert").First.IsVisibleAsync();
var 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() { Timeout = 15_000 });
}
});
}
}