Support trees in the Equity view
This commit is contained in:
@@ -55,15 +55,23 @@ const equityReport = {
|
||||
{
|
||||
commodity: "EUR",
|
||||
total: { commodity: "EUR", quantity: "1000.0", display: "1000.0 EUR" },
|
||||
holders: [
|
||||
rows: [
|
||||
{
|
||||
holder: "alice",
|
||||
amount: { commodity: "EUR", quantity: "600.0", display: "600.0 EUR" },
|
||||
account: "equity:alice",
|
||||
label: "Alice",
|
||||
depth: 0,
|
||||
amounts: [
|
||||
{ commodity: "EUR", quantity: "600.0", display: "600.0 EUR" },
|
||||
],
|
||||
percentage: "60.00",
|
||||
},
|
||||
{
|
||||
holder: "bob",
|
||||
amount: { commodity: "EUR", quantity: "400.0", display: "400.0 EUR" },
|
||||
account: "equity:bob",
|
||||
label: "Bob",
|
||||
depth: 0,
|
||||
amounts: [
|
||||
{ commodity: "EUR", quantity: "400.0", display: "400.0 EUR" },
|
||||
],
|
||||
percentage: "40.00",
|
||||
},
|
||||
],
|
||||
@@ -254,8 +262,15 @@ acceptance("Hledger plugin", function (needs) {
|
||||
|
||||
await click(".hledger-dashboard__toolbar .btn:nth-of-type(4)");
|
||||
|
||||
assert.dom(".hledger-dashboard__table").includesText("alice");
|
||||
assert.dom(".hledger-dashboard__table").includesText("Alice");
|
||||
assert.dom(".hledger-dashboard__table").includesText("60.00%");
|
||||
assert
|
||||
.dom('.hledger-dashboard__account[title="equity:alice"]')
|
||||
.hasText("Alice");
|
||||
assert.dom(".hledger-dashboard__account.--depth-0").exists({ count: 2 });
|
||||
assert
|
||||
.dom(".hledger-dashboard__account.--root")
|
||||
.doesNotExist("equity rows are never bold");
|
||||
});
|
||||
|
||||
test("renders the balance sheet and income statement as trees", async function (assert) {
|
||||
|
||||
Reference in New Issue
Block a user