test(playwright): align E2E nav tests with current NavMenu

The role-navigation and navigation E2E tests asserted on a stale nav model —
labels 'Data Connections', 'Instances', 'Areas' that NavMenu.razor no longer
uses, 'Connections' mapped to /admin instead of /design, and Event Logs /
Parked Messages treated as all-roles when they are Deployment-role gated.
SitesPage_ShowsTable expected an HTML <table> but Sites.razor renders site
cards. Corrected the expectations to the actual NavMenu/Sites markup; the
role-based authorization itself was already correct. Suite: 43/43.
This commit is contained in:
Joseph Doherty
2026-05-18 02:42:44 -04:00
parent 579522c586
commit fa7b12c4a3
3 changed files with 43 additions and 32 deletions

View File

@@ -13,15 +13,17 @@ public class SiteCrudTests
}
[Fact]
public async Task SitesPage_ShowsTable()
public async Task SitesPage_ShowsSiteManagement()
{
var page = await _fixture.NewAuthenticatedPageAsync();
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/admin/sites");
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
// Sites.razor renders the management page as a heading plus site cards
// (not an HTML table) and an always-present "Add Site" action.
await Expect(page.Locator("h4:has-text('Site Management')")).ToBeVisibleAsync();
await Expect(page.Locator("table")).ToBeVisibleAsync();
await Expect(page.Locator("button:has-text('Add Site')")).ToBeVisibleAsync();
}
[Fact]