test(playwright): fix stale selectors after UI refactor (h1 headings, collapsed Topology/Audit disclosures, ParameterValueForm ids, method-select race)

This commit is contained in:
Joseph Doherty
2026-12-03 12:14:28 -05:00
parent 18311eb385
commit 5acb16ca07
23 changed files with 66 additions and 46 deletions
@@ -58,7 +58,7 @@ public class EventLogsTests
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{EventLogsUrl}");
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
await Assertions.Expect(page.Locator("h4:has-text('Site Event Logs')")).ToBeVisibleAsync();
await Assertions.Expect(page.Locator("h1:has-text('Site Event Logs')")).ToBeVisibleAsync();
// The site selector is populated from the cluster's known sites; the live cluster
// exposes site-a. Each option's value is the site's SiteIdentifier.
@@ -89,7 +89,7 @@ public class EventLogsTests
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{EventLogsUrl}");
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
await Assertions.Expect(page.Locator("h4:has-text('Site Event Logs')")).ToBeVisibleAsync();
await Assertions.Expect(page.Locator("h1:has-text('Site Event Logs')")).ToBeVisibleAsync();
await page.Locator("#filter-site").SelectOptionAsync(new SelectOptionValue { Value = "site-a" });
var searchBtn = page.Locator("button.btn.btn-primary.btn-sm:has-text('Search')");
@@ -56,7 +56,7 @@ public class ParkedMessagesActionTests
var page = await _fixture.NewAuthenticatedPageAsync();
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/monitoring/parked-messages");
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
await Assertions.Expect(page.Locator("h4:has-text('Parked Messages')")).ToBeVisibleAsync();
await Assertions.Expect(page.Locator("h1:has-text('Parked Messages')")).ToBeVisibleAsync();
var query = page.Locator("button.btn.btn-primary.btn-sm:has-text('Query')");
await Assertions.Expect(query).ToBeDisabledAsync();
@@ -52,7 +52,7 @@ public class ParkedMessagesTests
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{ParkedMessagesUrl}");
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
await Assertions.Expect(page.Locator("h4:has-text('Parked Messages')")).ToBeVisibleAsync();
await Assertions.Expect(page.Locator("h1:has-text('Parked Messages')")).ToBeVisibleAsync();
// Select site-a — the <option> value is the SiteIdentifier "site-a". The select is
// an @onchange handler that, on a non-empty selection, kicks off the query itself;