Updates preferred price source copy label (#4492)

* ui+create: updates preferred price source copy label

* Add test case

Co-authored-by: d11n <mail@dennisreimann.de>
This commit is contained in:
dstrukt 2022-12-31 02:24:10 -06:00 committed by GitHub
parent 03d7dc8971
commit eb6d01c21e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -176,7 +176,9 @@ namespace BTCPayServer.Tests
var name = "Store" + RandomUtils.GetUInt64();
TestLogs.LogInformation($"Created store {name}");
Driver.WaitForElement(By.Id("Name")).SendKeys(name);
new SelectElement(Driver.FindElement(By.Id("PreferredExchange"))).SelectByText("CoinGecko");
var rateSource = new SelectElement(Driver.FindElement(By.Id("PreferredExchange")));
Assert.Equal("Kraken (Recommended)", rateSource.SelectedOption.Text);
rateSource.SelectByText("CoinGecko");
Driver.WaitForElement(By.Id("Create")).Click();
Driver.FindElement(By.Id("StoreNav-StoreSettings")).Click();
Driver.FindElement(By.Id($"SectionNav-{StoreNavPages.General.ToString()}")).Click();

View File

@ -11,7 +11,7 @@
const updateRecommended = currency => {
const source = exchanges[currency] || 'coingecko'
const name = source.charAt(0).toUpperCase() + source.slice(1)
recommended.innerText = `Recommended (${name})`
recommended.innerText = `${name} (Recommended)`
}
updateRecommended(@Safe.Json(Model.DefaultCurrency))
delegate('change', '#DefaultCurrency', e => updateRecommended(e.target.value))