diff --git a/BTCPayServer.Tests/BTCPayServer.Tests.csproj b/BTCPayServer.Tests/BTCPayServer.Tests.csproj
index f76054a8e..301da2236 100644
--- a/BTCPayServer.Tests/BTCPayServer.Tests.csproj
+++ b/BTCPayServer.Tests/BTCPayServer.Tests.csproj
@@ -5,7 +5,7 @@
$(TargetFrameworkOverride)
false
NU1701,CA1816,CA1308,CA1810,CA2208
- 7.2
+ 8.0
AB0AC1DD-9D26-485B-9416-56A33F268117
diff --git a/BTCPayServer.Tests/SeleniumTester.cs b/BTCPayServer.Tests/SeleniumTester.cs
index 283c68545..e0aee0093 100644
--- a/BTCPayServer.Tests/SeleniumTester.cs
+++ b/BTCPayServer.Tests/SeleniumTester.cs
@@ -72,16 +72,16 @@ namespace BTCPayServer.Tests
internal void AssertHappyMessage()
{
- try
+ using var cts = new CancellationTokenSource(10_000);
+ while (!cts.IsCancellationRequested)
{
- Assert.Single(Driver.FindElements(By.ClassName("alert-success")).Where(el => el.Displayed));
- }
- catch (Xunit.Sdk.SingleException)
- {
- Logs.Tester.LogInformation("Should have shown happy message, but instead got");
- Logs.Tester.LogInformation(this.Driver.PageSource);
- throw;
+ var success = Driver.FindElements(By.ClassName("alert-success")).Where(el => el.Displayed).Any();
+ if (success)
+ return;
+ Thread.Sleep(100);
}
+ Logs.Tester.LogInformation(this.Driver.PageSource);
+ Assert.True(false, "Should have shown happy message");
}
public static readonly TimeSpan ImplicitWait = TimeSpan.FromSeconds(10);