Гант: подсказка на стрелке зависимости (от -> к, названия шагов)
All checks were successful
ci / test (push) Successful in 24s
ci / deploy (push) Successful in 1m27s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-17 13:30:50 +03:00
parent f56c19598d
commit c1e2e709e3
2 changed files with 10 additions and 1 deletions

View File

@@ -332,6 +332,13 @@ describe("Гант: группы, вехи, свёртывание, масшта
expect(arrows(renderGantt(ms, sch, {}))).toBeGreaterThan(arrows(shut));
});
it("стрелка зависимости имеет подсказку «от -> к» с названиями шагов", () => {
const rows = [row({ id: "A", stage: "S", action_name: "Первый", duration: "1d", date_constraint: "день 0 → день 1" }), row({ id: "B", stage: "S", action_name: "Второй", depends_on: "A", duration: "1d" })];
const m: ProcessModel = { ...model, rows };
const svg = renderGantt(m, computeSchedule(rows), {});
expect(svg).toContain("<title>A -&gt; B Первый -&gt; Второй</title>");
});
it("зависимость, следующая из цепочки других, не рисуется стрелкой (A→C при A→B→C)", () => {
const rows = [row({ id: "A" }), row({ id: "B", depends_on: "A" }), row({ id: "C", depends_on: "B", depends_on2: "A" })];
const redundant = redundantDependencies(rows);