test(e2e): harden LDAP teardown + tighten nav/health selectors (review fixes)
This commit is contained in:
@@ -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) =>
|
||||
|
||||
Reference in New Issue
Block a user