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,29 @@
using Microsoft.Playwright;
namespace JdeScoping.Ui.Tests.Support;
[Collection(UiTestCollection.Name)]
public abstract class UiTestBase
{
private readonly PlaywrightFixture _fixture;
protected UiTestBase(PlaywrightFixture fixture)
{
_fixture = fixture;
}
protected async Task RunAsync(Func<IPage, Task> action)
{
await using var context = await _fixture.Browser.NewContextAsync(new BrowserNewContextOptions
{
BaseURL = UiTestSettings.BaseUrl,
IgnoreHTTPSErrors = true
});
var page = await context.NewPageAsync();
page.SetDefaultTimeout(30_000);
page.SetDefaultNavigationTimeout(120_000);
await action(page);
}
}