Гант: пунктир от вехи до красной черты; опоздавшая веха справа от черты с красным контуром
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -195,6 +195,20 @@ describe("computeSchedule", () => {
|
||||
expect(svg.split('stroke="#d32f2f" stroke-width="3"').length - 1).toBe(3); // черта у CP-5, в сводной полосе группы и знак в легенде
|
||||
expect(svg).toContain("Крайний срок: день 75");
|
||||
expect(svg).toContain("Крайний срок: CP-5, день 75"); // и в сводной полосе группы
|
||||
expect(svg).toContain('stroke="#d32f2f" stroke-width="1" stroke-dasharray="3 3"'); // пунктир от ромба до красной черты
|
||||
expect(svg).not.toContain('stroke="#d32f2f" stroke-width="2.5"'); // опоздавшей вехи нет
|
||||
});
|
||||
|
||||
it("веха правее крайнего срока: ромб остаётся справа от черты и обведён красным", () => {
|
||||
const rows = [
|
||||
row({ id: "CP-0", stage: "S", date_constraint: "день 0" }),
|
||||
row({ id: "S-1", stage: "S", depends_on: "CP-0", duration: "20d" }),
|
||||
row({ id: "CP-5", stage: "S", depends_on: "S-1", date_constraint: "не позже дня 7" }),
|
||||
];
|
||||
const sc = computeSchedule(rows);
|
||||
expect(sc.timings.get("CP-5")).toMatchObject({ end: 20, deadline: 7 });
|
||||
const svg = renderGantt({ ...model, rows }, sc, {});
|
||||
expect(svg).toContain('stroke="#d32f2f" stroke-width="2.5"'); // красный контур ромба
|
||||
});
|
||||
|
||||
it("повторяющиеся шаги тянутся до конца проекта и не считаются предшественниками", () => {
|
||||
|
||||
Reference in New Issue
Block a user