test(e2e): harden LDAP teardown + tighten nav/health selectors (review fixes)

This commit is contained in:
Joseph Doherty
2026-06-05 10:19:48 -04:00
parent 754f049a98
commit 3d9ef0a477
3 changed files with 107 additions and 59 deletions
@@ -106,10 +106,11 @@ public class NavigationTests
// Verify the destination page actually rendered its heading (catches 500s
// and blank renders that a URL-only check would miss).
// Every mapped route renders its heading as an <h4> — tightened from the
// broader "h1, h4, h5" to prevent strict-mode violations if multiple
// heading elements match.
var expectedHeading = RouteHeadings[expectedPath];
await Assertions.Expect(
page.Locator("h1, h4, h5", new() { HasText = expectedHeading })
).ToBeVisibleAsync();
await Assertions.Expect(page.Locator("h4", new() { HasText = expectedHeading })).ToBeVisibleAsync();
}
private static ILocatorAssertions Expect(ILocator locator) =>