From fe4bbbe25698fa742b6787ff3203062b8d038861 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Thu, 3 Dec 2026 16:25:27 -0500 Subject: [PATCH] test(adminui): #1049 NodeEdit/ClusterEdit delete tests wait for the confirm dialog to render before clicking it --- .../Pages/ClusterNodeEditConcurrencySqlServerTests.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/Pages/ClusterNodeEditConcurrencySqlServerTests.cs b/tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/Pages/ClusterNodeEditConcurrencySqlServerTests.cs index d93e9bab5..7ffe0b546 100644 --- a/tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/Pages/ClusterNodeEditConcurrencySqlServerTests.cs +++ b/tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/Pages/ClusterNodeEditConcurrencySqlServerTests.cs @@ -155,6 +155,8 @@ public sealed class ClusterNodeEditConcurrencySqlServerTests : BunitContext var cut = Render(p => p.Add(x => x.ClusterId, clusterId).Add(x => x.NodeId, nodeId)); cut.WaitForAssertion(() => cut.Find("button.btn-outline-danger")); cut.Find("button.btn-outline-danger").Click(); + // The confirm dialog renders on a later pass than the click: wait for it rather than racing the renderer. + cut.WaitForAssertion(() => cut.Find(".modal-footer .btn-danger")); cut.Find(".modal-footer .btn-danger").Click(); cut.WaitForAssertion(() => @@ -175,6 +177,8 @@ public sealed class ClusterNodeEditConcurrencySqlServerTests : BunitContext var cut = Render(p => p.Add(x => x.ClusterId, busy)); cut.WaitForAssertion(() => cut.Find("button.btn-outline-danger")); cut.Find("button.btn-outline-danger").Click(); + // The confirm dialog renders on a later pass than the click: wait for it rather than racing the renderer. + cut.WaitForAssertion(() => cut.Find(".modal-footer .btn-danger")); cut.Find(".modal-footer .btn-danger").Click(); cut.WaitForAssertion(() => cut.Markup.ShouldContain("remove them first")); @@ -185,6 +189,8 @@ public sealed class ClusterNodeEditConcurrencySqlServerTests : BunitContext var cut2 = Render(p => p.Add(x => x.ClusterId, empty)); cut2.WaitForAssertion(() => cut2.Find("button.btn-outline-danger")); cut2.Find("button.btn-outline-danger").Click(); + // The confirm dialog renders on a later pass than the click: wait for it rather than racing the renderer. + cut2.WaitForAssertion(() => cut2.Find(".modal-footer .btn-danger")); cut2.Find(".modal-footer .btn-danger").Click(); cut2.WaitForAssertion(() => {