feat(ui): constrain decimal input and add stacked timed toasts with uniform actions

This commit is contained in:
2026-11-02 19:19:07 +01:00
parent 22e509d982
commit 86a73b862a
24 changed files with 315 additions and 103 deletions
+3 -3
View File
@@ -37,7 +37,7 @@ public class BookingSaveTests
Assert.Equal(1, fixture.Entries.WriteCalls);
delayed.SetResult();
await pending;
page.WaitForAssertion(() => Assert.Contains("gespeichert", page.Find(".alert-success").TextContent));
page.WaitForAssertion(() => Assert.Contains("gespeichert", page.Find(".toast-success").TextContent));
Assert.Single(await fixture.Entries.GetEntriesAsync(1, (int?)null));
Assert.Single(page.FindAll("tr.entry-recent"));
if (transfer) Assert.Single(await fixture.Entries.GetEntriesAsync(2, (int?)null));
@@ -62,7 +62,7 @@ public class BookingSaveTests
fixture.Entries.BeforeWrite = () => Task.FromException(new IOException("Simulierter Speicherfehler"));
await page.Find("form").TriggerEventAsync("onsubmit", EventArgs.Empty);
Assert.Contains("Eingaben bleiben erhalten", page.Markup);
Assert.Empty(page.FindAll(".alert-success"));
Assert.Empty(page.FindAll(".toast-success"));
Assert.Equal("Testbuchung", page.Find(transfer ? "#transfer-title" : "#entry-title").GetAttribute("value"));
Assert.Equal("12,50", page.Find(transfer ? "#transfer-amount" : "#entry-amount").GetAttribute("value"));
Assert.Empty(await fixture.Entries.GetEntriesAsync(1, (int?)null));
@@ -86,7 +86,7 @@ public class BookingSaveTests
dialog.Find("#entry-title").Input("Testbuchung");
dialog.Find("#entry-amount").Input("12,50");
await dialog.Find("form").TriggerEventAsync("onsubmit", EventArgs.Empty);
Assert.Contains("Die Buchung ist gespeichert", dialog.Markup);
Assert.Contains(fixture.Context.Services.GetRequiredService<ToastService>().Messages, t => t.Message.Contains("Die Buchung ist gespeichert"));
await dialog.Find("form").TriggerEventAsync("onsubmit", EventArgs.Empty);
Assert.Equal(1, fixture.Entries.WriteCalls);
Assert.Equal(2, notifications);