feat(FN-4121): complete Step 2 — align resolver dimensions with chart CSS

Fusion-Task-Id: FN-4121
Fusion-Task-Lineage: aa8b8ab7-c250-4ce5-b42e-7b7a2ba920b1
This commit is contained in:
Fusion
2026-05-13 02:46:39 -07:00
committed by gsxdsm
parent ac2781afd3
commit 5c9920ebf7
2 changed files with 50 additions and 13 deletions

View File

@@ -75,6 +75,18 @@ describe("agentsOrgChartLayout", () => {
resolveOrgChartLayoutMode({ tree, availableWidth: 400 }),
);
});
it("uses compact mobile dimensions for auto mode near mobile breakpoint", () => {
const tree = [
makeNode("root", [
makeNode("a", [makeNode("a1"), makeNode("a2")]),
makeNode("b", [makeNode("b1"), makeNode("b2")]),
]),
];
expect(estimateOrgChartWidth(tree, 700)).toBe(680);
expect(resolveOrgChartLayoutMode({ tree, availableWidth: 700 })).toBe("horizontal");
});
});
describe("isOrgChartLayoutPreference", () => {