From 336f2d88e95ed5a8bded7eec869bdc91f3ff1cc7 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Wed, 25 Sep 2024 21:53:15 +0900 Subject: [PATCH] Fix flaky CanManageWallet Clicking on Sign Transaction in the Wallet Send page, will, when a hot wallet is setup, use PostRedirect page to redirect to the broadcast screen. The problem was that sometimes, s.Driver.PageSource would return this PostRedirect page rather than the broadcast page. Waiting for an element of the broadcast page fixes this issue. --- BTCPayServer.Tests/SeleniumTests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/BTCPayServer.Tests/SeleniumTests.cs b/BTCPayServer.Tests/SeleniumTests.cs index ea94e2603..15fa473a8 100644 --- a/BTCPayServer.Tests/SeleniumTests.cs +++ b/BTCPayServer.Tests/SeleniumTests.cs @@ -1973,6 +1973,7 @@ namespace BTCPayServer.Tests var jack = new Key().PubKey.Hash.GetAddress(Network.RegTest); SetTransactionOutput(s, 0, jack, 0.01m); s.Driver.FindElement(By.Id("SignTransaction")).Click(); + s.Driver.WaitForElement(By.CssSelector("button[value=broadcast]")); Assert.Contains(jack.ToString(), s.Driver.PageSource); Assert.Contains("0.01000000", s.Driver.PageSource); Assert.EndsWith("psbt/ready", s.Driver.Url);