Show "no data" for empty titled sections

This commit is contained in:
2026-09-27 12:47:37 +02:00
parent baac0d14b3
commit ef4a43452c
4 changed files with 51 additions and 24 deletions
@@ -310,6 +310,21 @@ acceptance("Hledger plugin", function (needs) {
"indents below the heading's first level"
);
assert
.dom(".hledger-dashboard__empty")
.exists({ count: 1 }, "shows a placeholder for the empty section");
assert.dom(".hledger-dashboard__empty").hasText("No data");
assert
.dom(
".hledger-dashboard__section:nth-of-type(2) .hledger-dashboard__table"
)
.doesNotExist("omits the table for the empty section");
assert
.dom(
".hledger-dashboard__section:nth-of-type(1) .hledger-dashboard__table"
)
.exists("keeps the table for the populated section");
await click(".hledger-dashboard__toolbar .btn:nth-of-type(3)");
assert