prevent app creation without wallet creation (#6255)

* prevent app creation without wallet creation

* resolve test failures

* resolve selenium test
This commit is contained in:
Chukwuleta Tobechi
2024-09-27 07:28:55 +01:00
committed by GitHub
parent 9ba4b030ed
commit 83fa8cbf0f
4 changed files with 24 additions and 1 deletions

View File

@@ -1238,6 +1238,7 @@ namespace BTCPayServer.Tests
await s.StartAsync();
var userId = s.RegisterNewUser(true);
s.CreateNewStore();
s.GenerateWallet();
(_, string appId) = s.CreateApp("PointOfSale");
s.Driver.FindElement(By.Id("Title")).Clear();
s.Driver.FindElement(By.Id("Title")).SendKeys("Tea shop");
@@ -1249,7 +1250,8 @@ namespace BTCPayServer.Tests
s.Driver.FindElement(By.Id("CodeTabButton")).Click();
var template = s.Driver.FindElement(By.Id("TemplateConfig")).GetAttribute("value");
Assert.Contains("\"buyButtonText\": \"Take my money\"", template);
Assert.Matches("\"categories\": \\[\n\\s+\"Drinks\"\n\\s+\\]", template);
Assert.Matches("\"categories\": \\[\r?\n\\s*\"Drinks\"\\s*\\]", template);
s.ClickPagePrimary();
Assert.Contains("App updated", s.FindAlertMessage().Text);