What changed, and why it matters
This commit adds a single line to a test file to wait for the web page to finish loading before checking its content. It is a test reliability fix, not a security fix, and does not change any production code.
No security action required. This is a routine test stabilization change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change is in BTCPayServer.Tests/PlaywrightTests.cs, an automated UI test. It inserts await s.Page.WaitForLoadStateAsync(); before an assertion that checks page content. This addresses a flaky test caused by a race condition where the assertion ran before the page had fully loaded. No application logic, authentication, authorization, cryptography, or input handling code is modified.
Changed components
BTCPayServer.Tests/PlaywrightTests.csInspect captured patch +1 / −0
diff --git a/BTCPayServer.Tests/PlaywrightTests.cs b/BTCPayServer.Tests/PlaywrightTests.cs
index ceea073..09e6ba9 100644
--- a/BTCPayServer.Tests/PlaywrightTests.cs
+++ b/BTCPayServer.Tests/PlaywrightTests.cs
@@ -827,6 +827,7 @@ namespace BTCPayServer.Tests
await settings.UpdateSetting(policies);
await s.RegisterNewUser(isAdmin: true);
await s.GoToUrl("/server/services");
+ await s.Page.WaitForLoadStateAsync();
Assert.Contains("server/services/ssh", await s.Page.ContentAsync());
using (var client = await s.Server.PayTester.GetService<BTCPayServerOptions>().SSHSettings
.ConnectAsync())
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.