mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-19 15:04:19 +01:00
test: ensure transaction label is persisted after broadcast in wallet send flow
This commit is contained in:
@@ -985,6 +985,16 @@ namespace BTCPayServer.Tests
|
|||||||
var bob = new Key().PubKey.Hash.GetAddress(Network.RegTest);
|
var bob = new Key().PubKey.Hash.GetAddress(Network.RegTest);
|
||||||
await ws.FillAddress(bob);
|
await ws.FillAddress(bob);
|
||||||
await ws.FillAmount(1);
|
await ws.FillAmount(1);
|
||||||
|
|
||||||
|
// Add labels to the transaction output
|
||||||
|
await TestUtils.EventuallyAsync(async () =>
|
||||||
|
{
|
||||||
|
await s.Page.ClickAsync("div.label-manager input");
|
||||||
|
await s.Page.FillAsync("div.label-manager input", "tx-label");
|
||||||
|
await s.Page.Keyboard.PressAsync("Enter");
|
||||||
|
await s.Page.WaitForSelectorAsync("[data-value='tx-label']");
|
||||||
|
});
|
||||||
|
|
||||||
await ws.Sign();
|
await ws.Sign();
|
||||||
// Back button should lead back to the previous page inside the send wizard
|
// Back button should lead back to the previous page inside the send wizard
|
||||||
var backUrl = await s.Page.Locator("#GoBack").GetAttributeAsync("href");
|
var backUrl = await s.Page.Locator("#GoBack").GetAttributeAsync("href");
|
||||||
@@ -998,6 +1008,8 @@ namespace BTCPayServer.Tests
|
|||||||
await wb.AssertSending(bob, 1.0m);
|
await wb.AssertSending(bob, 1.0m);
|
||||||
await wb.Broadcast();
|
await wb.Broadcast();
|
||||||
Assert.Equal(walletTransactionUri.ToString(), s.Page.Url);
|
Assert.Equal(walletTransactionUri.ToString(), s.Page.Url);
|
||||||
|
// Assert that the added label is associated with the transaction
|
||||||
|
await wt.AssertHasLabels("tx-label");
|
||||||
|
|
||||||
await s.Page.ClickAsync($"#StoreNav-Wallet{cryptoCode}");
|
await s.Page.ClickAsync($"#StoreNav-Wallet{cryptoCode}");
|
||||||
await s.Page.ClickAsync("#WalletNav-Send");
|
await s.Page.ClickAsync("#WalletNav-Send");
|
||||||
|
|||||||
Reference in New Issue
Block a user