What changed, and why it matters
This commit only changes an automated UI test file. It adds a helper that checks whether a Bitcoin payment address was correctly filled in after clicking a parse button, and inserts that check plus a screenshot step at three points in the test. There is no change to production code, no user-facing behavior change, and no security fix.
No security action needed. Treat as routine test maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies BTCPayServer.Tests/PayJoinTests.cs. It introduces AssertDestinationFilled, which uses Playwright’s Expect API to verify that #Outputs_0__DestinationAddress has the address extracted from a BIP21 URI. The helper is called after #bip21parse clicks in CanUsePayjoinForTopup, CanUsePayjoinViaUI, and CanUsePayjoinForNormalInvoice. A screenshot call is also added. These are test-hardening changes to reduce flakiness; no runtime BTCPay Server code is touched.
Changed components
BTCPayServer.Tests/PayJoinTests.csInspect captured patch +10 / −5
diff --git a/BTCPayServer.Tests/PayJoinTests.cs b/BTCPayServer.Tests/PayJoinTests.cs
index 7681d88..a13136f 100644
--- a/BTCPayServer.Tests/PayJoinTests.cs
+++ b/BTCPayServer.Tests/PayJoinTests.cs
@@ -273,11 +273,10 @@ namespace BTCPayServer.Tests
{
await s.Page.ClickAsync("#bip21parse");
});
-
+ await AssertDestinationFilled(s, bip21);
await s.Page.FillAsync("#Outputs_0__Amount", "0.023");
-
+ await s.TakeScreenshot("filled.png");
await s.Page.ClickAsync("#SignTransaction");
-
await s.Server.WaitForEvent<NewOnChainTransactionEvent>(async () =>
{
try
@@ -301,6 +300,12 @@ namespace BTCPayServer.Tests
});
}
+ private static async Task AssertDestinationFilled(PlaywrightTester s, string bip21)
+ {
+ var bitcoinUrl = new BitcoinUrlBuilder(bip21!, Network.RegTest);
+ await Expect(s.Page.Locator("#Outputs_0__DestinationAddress")).ToHaveValueAsync(bitcoinUrl.Address!.ToString());
+ }
+
[Fact]
[Trait("Playwright", "Playwright-2")]
public async Task CanUsePayjoinViaUI()
@@ -343,7 +348,7 @@ namespace BTCPayServer.Tests
{
await s.Page.ClickAsync("#bip21parse");
});
-
+ await AssertDestinationFilled(s, bip21Url);
await Expect(s.Page.Locator("#PayJoinBIP21")).Not.ToHaveValueAsync("");
await s.Page.ClickAsync("#SignTransaction");
await s.Server.WaitForEvent<NewOnChainTransactionEvent>(async () =>
@@ -375,7 +380,7 @@ namespace BTCPayServer.Tests
{
await s.Page.ClickAsync("#bip21parse");
});
-
+ await AssertDestinationFilled(s, bip21);
await Expect(s.Page.Locator("#PayJoinBIP21")).Not.ToHaveValueAsync("");
await s.Page.FillAsync("#FeeSatoshiPerByte", "2");
await s.Page.ClickAsync("#SignTransaction");
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.