using JdeScoping.Ui.Tests.Helpers; using JdeScoping.Ui.Tests.Support; namespace JdeScoping.Ui.Tests; /// /// Playwright UI smoke tests for the Search page. /// Validates that the search form loads with primary controls visible and no error notifications. /// Requires a running Docker host (Category: RequiresDockerHost). /// public sealed class SearchPageTests(PlaywrightFixture fixture) : UiTestBase(fixture) { /// /// Verifies the search page loads and displays the "Search Details" heading, Submit button, and no errors. /// /// /// Steps: /// 1. Navigate to the search page. /// 2. Assert the "Search Details" text is visible. /// 3. Assert the Submit button is visible. /// 4. Assert no error notification is present. /// [Fact] [Trait("Category", "RequiresDockerHost")] public async Task SearchPage_LoadsAndShowsPrimaryControls() { await RunAsync(async page => { await UiNavigationHelper.NavigateToSearchPageAsync(page); await Assertions.Expect(page.GetByText("Search Details")).ToBeVisibleAsync(); await Assertions.Expect(page.GetByRole(AriaRole.Button, new PageGetByRoleOptions { Name = "Submit" }).First) .ToBeVisibleAsync(); await UiSearchFormHelper.AssertNoErrorNotificationAsync(page); }); } }