tests(apphost.tests): added support for end to end testing using playwright

This commit is contained in:
Stevan Freeborn
2026-02-23 05:53:17 -06:00
parent fd2cd68d73
commit b45463e56b
11 changed files with 166 additions and 3 deletions
@@ -0,0 +1,26 @@
namespace FiscalOS.AppHost.Tests.Infra;
public sealed class PlaywrightFixture : IAsyncLifetime
{
private IPlaywright? _playwright;
internal IBrowser Browser { get; set; } = null!;
public async ValueTask InitializeAsync()
{
_playwright = await Playwright.CreateAsync();
Browser = await _playwright.Chromium.LaunchAsync(new()
{
Headless = false,
});
}
public async ValueTask DisposeAsync()
{
await Browser.CloseAsync();
await Browser.DisposeAsync();
_playwright?.Dispose();
}
}