feat: asked-field envelope, standalone form components, branched forms

This commit is contained in:
Jonas Miederer 2026-09-28 14:07:09 +02:00
parent 0d43b0e8fb
commit f27be044b4
26 changed files with 3651 additions and 104 deletions

View file

@ -43,6 +43,28 @@ def test_iter_flow_files_only_top_level_json(tmp_path):
assert export.iter_flow_files(tmp_path) == [tmp_path / "a.json"]
def test_flowsignore_parsing_and_filtering(tmp_path):
assert export.ignored_stems(tmp_path) == set()
(tmp_path / export.IGNORE_FILENAME).write_text(
"# experiments stay Langflow-only\n\ni_love_this_app\n", encoding="utf-8"
)
assert export.ignored_stems(tmp_path) == {"i_love_this_app"}
(tmp_path / "a.json").write_text("{}")
(tmp_path / "i_love_this_app.json").write_text("{}")
assert export.iter_flow_files(tmp_path) == [tmp_path / "a.json"]
# Explicit override still works.
assert export.iter_flow_files(tmp_path, ignored=set()) == [
tmp_path / "a.json",
tmp_path / "i_love_this_app.json",
]
def test_find_reuse_path_ignores_ignored_files(tmp_path):
(tmp_path / export.IGNORE_FILENAME).write_text("alt\n", encoding="utf-8")
(tmp_path / "alt.json").write_text(json.dumps({"name": "Neu"}))
assert export.find_reuse_path(tmp_path, {"name": "Neu"}) == (None, False)
def test_find_reuse_path_matches_identical_content_first(tmp_path):
doc = {"name": "Simple Rule", "data": {"nodes": [], "edges": []}}
other = tmp_path / "other-name.json"