feat: collapse\expand steps in pipeline

This commit is contained in:
2026-10-06 19:08:47 +05:00
parent e7d3925eb2
commit 5c58451f2f
7 changed files with 47 additions and 7 deletions
+12
View File
@@ -79,6 +79,18 @@ describe("pipeline: parseChain (localStorage/импорт)", () => {
expect(chain[0].params).toMatchObject({ x: 5, y: 0 });
});
it("parseChain сохраняет collapsed, по умолчанию шаг развёрнут", () => {
const chain = parseChain({
version: CHAIN_VERSION,
steps: [
{ id: "crop", params: {}, collapsed: true },
{ id: "resize", params: {} },
],
})!;
expect(chain[0].collapsed).toBe(true);
expect(chain[1].collapsed).toBeUndefined();
});
it.each([
["нет версии", { steps: [{ id: "crop" }] }],
["другая версия", { version: 99, steps: [{ id: "crop" }] }],