fix(ui): refine amount entry, date warnings and booking actions

This commit is contained in:
2026-11-02 20:31:09 +01:00
parent 71eed68e21
commit aa392815e5
17 changed files with 140 additions and 39 deletions
@@ -18,14 +18,17 @@ public class EntryPresentationTests
Assert.DoesNotContain("emptyEntriesMessage", page.Markup);
}
[Fact]
public void Actions_HaveVisibleTextAndBookingSpecificNames()
public void Actions_AreDirectIconButtonsWithTitlesAndBookingSpecificNames()
{
using var context = new BunitContext();
var entry = new EntryDto(1, 1, "2026-001", EntryType.Expense, DateTime.Today, "Porto", 4.20m, false, false, null, null, null);
var edited = 0;
var table = context.Render<EntryTable>(p => p.Add(x => x.Entries, [entry]).Add(x => x.OnEditEntry, id => edited = id));
Assert.Contains("2026-001 Porto", table.Find("summary").GetAttribute("aria-label"));
var edit = table.FindAll("button").Single(b => b.TextContent.Contains("Bearbeiten"));
Assert.Empty(table.FindAll("summary"));
var edit = table.Find("button[title='Buchung bearbeiten']");
Assert.Contains("2026-001 Porto", edit.GetAttribute("aria-label"));
Assert.NotNull(edit.QuerySelector(".bi-pencil[aria-hidden=true]"));
Assert.NotNull(table.Find("button.btn-outline-danger .bi-trash"));
Assert.Contains("Porto", edit.GetAttribute("aria-label"));
edit.Click();
Assert.Equal(1, edited);