test(playwright): DeploymentActionTests load the lazy Topology tree via a shared helper

The Topology page has loaded lazily (bounded instance pages behind 'Load
instances' loaders) since 9ee402bb (2026-09-09); TopologyAreaTests was
updated then but DeploymentActionTests still relied on one Expand-all click
revealing instance rows, so all four facts timed out locating the row. Move
OpenStableTopologyAsync into TopologyPageHelper and use it from both.
This commit is contained in:
Joseph Doherty
2026-10-22 13:48:52 -04:00
parent 560adefb0c
commit 4ae3ed3fdd
3 changed files with 59 additions and 47 deletions
@@ -199,19 +199,9 @@ public class DeploymentActionTests : IClassFixture<DeploymentFixture>
/// </summary>
private static async Task<ILocator> OpenInstanceContextMenuAsync(IPage page, string uniqueName)
{
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/deployment/topology");
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
// Stop the 15s live-updates timer from rebuilding the tree under us.
var liveToggle = page.Locator("#live-updates");
if (await liveToggle.IsCheckedAsync())
{
await liveToggle.UncheckAsync();
}
// ExpandAll() recurses every branch (site → area → …), so one click reveals
// the nested instance row under site-a's zztest area.
await page.Locator("button[aria-label='Expand all areas']").ClickAsync();
// The tree loads lazily (since the 2026-09-09 low-findings wave): one Expand-all
// click no longer reveals instance rows, which sit behind "Load instances" loaders.
await TopologyPageHelper.OpenStableTopologyAsync(page);
var row = page.Locator("div.tv-row", new() { HasText = uniqueName });
await Assertions.Expect(row).ToBeVisibleAsync(new() { Timeout = 15_000 });