test(tag): add subtreeDocumentCount to admin tree fixtures (#698)

TagTreeNodeDTO now requires subtreeDocumentCount, so the admin sidebar test
fixtures (TagTreeNode, TagsListPanel) need the field to type-check. The admin
sidebar still renders the direct documentCount — these fixtures only gain the
new field, no behaviour change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-05-31 12:26:18 +02:00
parent 1fd8c2b2d2
commit aa9d4aafaa
2 changed files with 24 additions and 2 deletions

View File

@@ -22,6 +22,7 @@ const leafNode = (overrides: Record<string, unknown> = {}) => ({
name: 'Personen',
color: 'sage',
documentCount: 5,
subtreeDocumentCount: 5,
parentId: null,
children: [],
...overrides
@@ -32,8 +33,18 @@ const parentNode = (overrides: Record<string, unknown> = {}) => ({
name: 'Orte',
color: 'sienna',
documentCount: 0,
subtreeDocumentCount: 2,
parentId: null,
children: [{ id: 'tc1', name: 'Berlin', color: null, documentCount: 2, children: [] }],
children: [
{
id: 'tc1',
name: 'Berlin',
color: null,
documentCount: 2,
subtreeDocumentCount: 2,
children: []
}
],
...overrides
});

View File

@@ -15,9 +15,18 @@ const tree = [
name: 'Familie',
color: undefined,
documentCount: 3,
subtreeDocumentCount: 5,
parentId: undefined,
children: [
{ id: 't2', name: 'Eltern', color: undefined, documentCount: 2, parentId: 't1', children: [] }
{
id: 't2',
name: 'Eltern',
color: undefined,
documentCount: 2,
subtreeDocumentCount: 2,
parentId: 't1',
children: []
}
]
},
{
@@ -25,6 +34,7 @@ const tree = [
name: 'Urlaub',
color: 'teal',
documentCount: 0,
subtreeDocumentCount: 0,
parentId: undefined,
children: []
}
@@ -128,6 +138,7 @@ describe('TagsListPanel — color dot', () => {
id: 't1',
name: 'Familie',
documentCount: 0,
subtreeDocumentCount: 0,
parentId: undefined,
children: [],
color: undefined