Fix flaky tests

This commit is contained in:
nicolas.dorier
2025-06-16 15:46:21 +09:00
parent 49f1f198f3
commit 0b29415d0e
4 changed files with 7 additions and 23 deletions

View File

@@ -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>