mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-02-04 05:44:22 +01:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user