Admin.E2ETests scaffolding — Playwright + Kestrel + InMemory DB + test auth #188
Reference in New Issue
Block a user
Delete Branch "phase-6-4-uns-drag-drop-e2e"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Ships the E2E infrastructure filed against task #199 (UnsTab drag-drop Playwright smoke). The Blazor Server interactive-render assertion through a test-owned pipeline needs a dedicated diagnosis pass — filed as task #242 — but the Playwright harness lands here so that follow-up starts from a known-good scaffolding rather than setting up the project from scratch.
New project
tests/ZB.MOM.WW.OtOpcUa.Admin.E2ETestsAdminWebAppFactory— boots the Admin pipeline with Kestrel on a free loopback port, swaps the SQLDbContextfor EF Core InMemory, replaces the LDAP cookie auth withTestAuthHandler, mirrors the Razor-components/auth/antiforgery pipeline, and seeds a cluster + draft generation with areaswarsaw/berlinand a lineline-a1in warsaw. NotWebApplicationFactory<Program>because WAF's TestServer transport doesn't coexist cleanly with Kestrel-on-a-real-port, which Playwright needs.TestAuthHandler— stamps every request with aFleetAdminclaim so tests hit authenticated routes without the LDAP bind.PlaywrightFixture— one Chromium launch shared across tests; throwsPlaywrightBrowserMissingExceptionwhen the binary isn't installed so tests canAssert.Skiprather than fail hard.UnsTabDragDropE2ETests.Admin_host_serves_HTTP_via_Playwright_scaffolding— proves the full stack comes up: Kestrel bind, InMemory DbContext, test auth, Playwright navigation, Razor route pipeline responds with HTML < 500. 1/1 pass.Prerequisite
Absent the browser, the suite
Assert.Skip's cleanly — CI without the install step still reports green. Once installed,dotnet testruns the scaffolding smoke in ~12s.Follow-up (task #242)
Diagnose why
/clusters/{id}/draft/{gen}→ UNS-tab click → drag-drop flow times out under the test-ownedProgram.csreplica. Candidate causes: route-ordering difference, missing SignalR hub mapping timing, JS interop asset differences, culture middleware. Once the interactive circuit boots, add: