Skip to content

Commit

Permalink
fix: Fix broken edges issues
Browse files Browse the repository at this point in the history
  • Loading branch information
huyenngn committed Jun 17, 2024
1 parent 36b4d75 commit 2ff9baa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions capellambse_context_diagrams/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def make_diagram(

self.diagram.calculate_viewport()
self.order_children()
self._edges.clear()
return self.diagram

def deserialize_child(
Expand Down
4 changes: 4 additions & 0 deletions tests/test_context_diagrams.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,17 @@
"c78b5d7c-be0c-4ed4-9d12-d447cb39304e",
id="PhysicalBehaviorComponent",
),
pytest.param("957c5799-1d4a-4ac0-b5de-33a65bf1519c", id="Hey"),
],
)
def test_context_diagrams(model: capellambse.MelodyModel, uuid: str) -> None:
obj = model.by_uuid(uuid)

diag = obj.context_diagram

diag.render("svgdiagram", display_parent_relation=True)
diag.render("svgdiagram", display_parent_relation=False)

assert diag.nodes


Expand Down

0 comments on commit 2ff9baa

Please sign in to comment.