Migrate UI tests to Playwright dotta
This commit is contained in:
@@ -3,8 +3,25 @@ using JdeScoping.Ui.Tests.Support;
|
||||
|
||||
namespace JdeScoping.Ui.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// 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).
|
||||
/// </summary>
|
||||
public sealed class SearchPageTests(PlaywrightFixture fixture) : UiTestBase(fixture)
|
||||
{
|
||||
/// <summary>
|
||||
/// Verifies the search page loads and displays the "Search Details" heading, Submit button, and no errors.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Steps:
|
||||
/// <list type="number">
|
||||
/// <item>Navigate to the search page.</item>
|
||||
/// <item>Assert the "Search Details" text is visible.</item>
|
||||
/// <item>Assert the Submit button is visible.</item>
|
||||
/// <item>Assert no error notification is present.</item>
|
||||
/// </list>
|
||||
/// </remarks>
|
||||
[Fact]
|
||||
[Trait("Category", "RequiresDockerHost")]
|
||||
public async Task SearchPage_LoadsAndShowsPrimaryControls()
|
||||
@@ -13,8 +30,9 @@ public sealed class SearchPageTests(PlaywrightFixture fixture) : UiTestBase(fixt
|
||||
{
|
||||
await UiNavigationHelper.NavigateToSearchPageAsync(page);
|
||||
await Assertions.Expect(page.GetByText("Search Details")).ToBeVisibleAsync();
|
||||
await Assertions.Expect(page.GetByRole(Microsoft.Playwright.AriaRole.Button, new() { Name = "Submit" }).First).ToBeVisibleAsync();
|
||||
await Assertions.Expect(page.GetByRole(AriaRole.Button, new PageGetByRoleOptions { Name = "Submit" }).First)
|
||||
.ToBeVisibleAsync();
|
||||
await UiSearchFormHelper.AssertNoErrorNotificationAsync(page);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user