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(() => {