Show "no data" for empty titled sections
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user