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,31 @@
using Microsoft.Playwright;
namespace JdeScoping.Ui.Tests.Support;
public sealed class PlaywrightFixture : IAsyncLifetime
{
private IPlaywright? _playwright;
private IBrowser? _browser;
public IBrowser Browser => _browser ?? throw new InvalidOperationException("Browser is not initialized.");
public async Task InitializeAsync()
{
_playwright = await Microsoft.Playwright.Playwright.CreateAsync();
_browser = await _playwright.Chromium.LaunchAsync(new BrowserTypeLaunchOptions
{
Headless = UiTestSettings.Headless,
Args = ["--no-sandbox", "--disable-dev-shm-usage"]
});
}
public async Task DisposeAsync()
{
if (_browser is not null)
{
await _browser.CloseAsync();
}
_playwright?.Dispose();
}
}