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:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user