Fix broken "CanCreateRefunds" test (#3635)

This commit is contained in:
Umar Bolatov 2022-04-13 22:07:10 -07:00 committed by GitHub
parent 1235ced355
commit 64534efe71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 10 deletions

View file

@ -358,7 +358,7 @@ namespace BTCPayServer.Tests
{
if (multiCurrency)
user.RegisterDerivationScheme("LTC");
foreach (var rateSelection in new[] { "FiatText", "CurrentRateText", "RateThenText" })
foreach (var rateSelection in new[] { "FiatTextRadio", "CurrentRateTextRadio", "RateThenTextRadio" })
await CanCreateRefundsCore(s, user, multiCurrency, rateSelection);
}
}
@ -402,11 +402,11 @@ namespace BTCPayServer.Tests
s.Driver.FindElement(By.Id(rateSelection)).Click();
s.Driver.FindElement(By.Id("ok")).Click();
Assert.Contains("pull-payments", s.Driver.Url);
if (rateSelection == "FiatText")
if (rateSelection == "FiatTextRadio")
Assert.Contains("$5,500.00", s.Driver.PageSource);
if (rateSelection == "CurrentRateText")
if (rateSelection == "CurrentRateTextRadio")
Assert.Contains("2.20000000 ₿", s.Driver.PageSource);
if (rateSelection == "RateThenText")
if (rateSelection == "RateThenTextRadio")
Assert.Contains("1.10000000 ₿", s.Driver.PageSource);
s.GoToInvoice(invoice.Id);
s.Driver.FindElement(By.Id("refundlink")).Click();

View file

@ -36,22 +36,22 @@
<input type="hidden" asp-for="CryptoAmountNow"/>
<div class="form-group">
<div class="form-check">
<input id="RateThenText" asp-for="SelectedRefundOption" type="radio" value="RateThen" class="form-check-input"/>
<label for="RateThenText" class="form-check-label">@Model.RateThenText</label>
<input id="RateThenTextRadio" asp-for="SelectedRefundOption" type="radio" value="RateThen" class="form-check-input"/>
<label for="RateThenTextRadio" class="form-check-label">@Model.RateThenText</label>
</div>
<small class="form-text text-muted">The crypto currency price, at the rate the invoice got paid.</small>
</div>
<div class="form-group">
<div class="form-check">
<input id="CurrentRateText" asp-for="SelectedRefundOption" type="radio" value="CurrentRate" class="form-check-input"/>
<label for="CurrentRateText" class="form-check-label">@Model.CurrentRateText</label>
<input id="CurrentRateTextRadio" asp-for="SelectedRefundOption" type="radio" value="CurrentRate" class="form-check-input"/>
<label for="CurrentRateTextRadio" class="form-check-label">@Model.CurrentRateText</label>
</div>
<small class="form-text text-muted">The crypto currency price, at the current rate.</small>
</div>
<div class="form-group">
<div class="form-check">
<input id="FiatText" asp-for="SelectedRefundOption" type="radio" value="Fiat" class="form-check-input"/>
<label for="FiatText" class="form-check-label">@Model.FiatText</label>
<input id="FiatTextRadio" asp-for="SelectedRefundOption" type="radio" value="Fiat" class="form-check-input"/>
<label for="FiatTextRadio" class="form-check-label">@Model.FiatText</label>
</div>
<small class="form-text text-muted">The invoice currency, at the rate when the refund will be sent.</small>
</div>