using JdeScoping.Ui.Tests.Helpers; using JdeScoping.Ui.Tests.Support; namespace JdeScoping.Ui.Tests; public sealed class RefreshStatusPageTests(PlaywrightFixture fixture) : UiTestBase(fixture) { [Fact] [Trait("Category", "RequiresDockerHost")] public async Task RefreshStatus_Loads() { await RunAsync(async page => { await UiNavigationHelper.NavigateToRefreshStatusAsync(page); var url = page.Url; var onRefreshStatus = url.EndsWith("/refresh-status", StringComparison.OrdinalIgnoreCase); var 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() { Timeout = 15_000 }); } else { await Assertions.Expect(page.GetByText("Search Details")).ToBeVisibleAsync(new() { Timeout = 15_000 }); } }); } }