test(stammbaum): fix #718 tab-order test for tidy-tree layout (#724) #729

Merged
marcel merged 1 commits from fix/issue-718-tidy-tree-tab-order-stale into main 2026-06-04 18:16:00 +02:00

View File

@@ -1099,9 +1099,11 @@ describe('StammbaumTree keyboard tab order (#718)', () => {
const CLARA = '00000000-0000-0000-0000-0000000000a3';
const HANS = '00000000-0000-0000-0000-0000000000a4';
// Walter ↔ Eugenie (gen 0); their children Clara + Hans (gen 1). buildLayout
// sorts each generation alphabetically, so the deterministic visual order is
// Eugenie, Walter (top row) then Clara, Hans (next row).
// Walter ↔ Eugenie (gen 0); their children Clara + Hans (gen 1). The tidy-tree
// layout (#724) orders a couple's run by structural ownership (earliest birth
// year, then a deterministic id tie-break), not alphabetically — with no birth
// years here Walter (id …a1) owns the run and Eugenie sits to his right. So the
// deterministic visual order is Walter, Eugenie (top row) then Clara, Hans.
const FAMILY_EDGES = [
{
id: 'sp',
@@ -1171,7 +1173,7 @@ describe('StammbaumTree keyboard tab order (#718)', () => {
});
// Top generation left-to-right, then next generation left-to-right.
expect(nodeLabelsInDomOrder()).toEqual(['Eugenie', 'Walter', 'Clara', 'Hans']);
expect(nodeLabelsInDomOrder()).toEqual(['Walter', 'Eugenie', 'Clara', 'Hans']);
});
it('orders tab stops by rendered position regardless of input order', () => {