mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 22:44:29 +01:00
Fix flaky tests
This commit is contained in:
@@ -566,21 +566,11 @@ namespace BTCPayServer.Tests
|
||||
}
|
||||
await Page.ClickAsync("#FakePayment");
|
||||
await Page.Locator("#CheatSuccessMessage").WaitForAsync();
|
||||
// TODO: Fix flakyness
|
||||
try
|
||||
{
|
||||
await Page.Locator("text=Payment Received").WaitForAsync();
|
||||
}
|
||||
catch
|
||||
{
|
||||
await TakeScreenshot("PayInvoice.png");
|
||||
throw;
|
||||
}
|
||||
|
||||
if (mine)
|
||||
{
|
||||
await MineBlockOnInvoiceCheckout();
|
||||
}
|
||||
await Page.Locator("xpath=//*[text()=\"Invoice Paid\" or text()=\"Payment Received\"]").WaitForAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -74,6 +74,7 @@ public class WalletTests(ITestOutputHelper helper) : UnitTestBase(helper)
|
||||
|
||||
await s.ClickPagePrimary();
|
||||
await s.Page.ClickAsync("#BroadcastTransaction");
|
||||
await s.FindAlertMessage();
|
||||
|
||||
await s.Page.ReloadAsync();
|
||||
var rbfTx = (await client.ShowOnChainWalletTransactions(s.StoreId, "BTC")).Select(t => t.TransactionHash).ToArray()[0];
|
||||
@@ -82,17 +83,7 @@ public class WalletTests(ITestOutputHelper helper) : UnitTestBase(helper)
|
||||
await w.AssertNotFound(cpfpTx);
|
||||
|
||||
// However, the new transaction should have copied the CPFP tag from the transaction it replaced, and have a RBF label as well.
|
||||
try
|
||||
{
|
||||
await w.AssertHasLabels(rbfTx, "CPFP");
|
||||
}
|
||||
catch
|
||||
{
|
||||
// TODO: Flaky
|
||||
await s.TakeScreenshot("AssertHasLabels-Fails.png");
|
||||
throw;
|
||||
}
|
||||
|
||||
await w.AssertHasLabels(rbfTx, "CPFP");
|
||||
await w.AssertHasLabels(rbfTx, "RBF");
|
||||
|
||||
// Now, we sweep all the UTXOs to a single destination. This should be RBF-able. (Fee deducted on the lone UTXO)
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace BTCPayServer
|
||||
}
|
||||
|
||||
if (Logs.Events.IsEnabled(LogLevel.Information))
|
||||
Logs.Events.LogInformation("Event published {0}", evt);
|
||||
Logs.Events.LogInformation("Event published {0}", string.IsNullOrEmpty(evt?.ToString()) ? evtType.GetType().Name : evt.ToString());
|
||||
|
||||
foreach (var sub in actionList)
|
||||
{
|
||||
|
||||
@@ -47,4 +47,7 @@ public class InvoiceWebhookDeliveryRequest(
|
||||
res = InterpolateJsonField(res, "Invoice.Metadata", Invoice.Metadata.ToJObject());
|
||||
return res;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
=> $"Webhook delivery request ({webhookEvent.Type})";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user