Merge branch 'worktree-agent-acdd9dc794506dee9' into feat/instance-picker

This commit is contained in:
Joseph Doherty
2026-09-08 09:45:55 -04:00
@@ -1,4 +1,5 @@
using System.Globalization;
using System.Text.RegularExpressions;
using Microsoft.Playwright;
using ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests.Cluster;
using Xunit;
@@ -210,11 +211,14 @@ public class FlowDebuggerTests : IClassFixture<FlowDebuggerFixture>
// Instance selection goes through the shared InstancePicker combobox (prefix
// "flow-instance"): typing the name filters the area tree and expands its
// ancestors, then the exact-text row is clicked to select and close the panel.
// ancestors, then the exact-text row is clicked to select and close the panel. The
// test only knows the instance NAME (not its id), so the row is matched through the
// data-test contract (flow-instance-row) with an exact-text regex rather than a
// free-text GetByText scan.
var instanceInput = page.Locator("[data-test='flow-instance-input']");
await instanceInput.FillAsync(RigInstanceName);
var instancePanel = page.Locator("[data-test='flow-instance-panel']");
var instanceRow = instancePanel.GetByText(RigInstanceName, new() { Exact = true });
var instanceRow = page.Locator("[data-test='flow-instance-row']",
new() { HasTextRegex = new Regex($"^\\s*{Regex.Escape(RigInstanceName)}\\s*$") });
Skip.IfNot(
await WaitForCountAsync(page, instanceRow),
$"Instance {RigInstanceName} is not on the rig's site-a — run docker/seed-delmia-sim.sh.");