Skip to content

Commit da6a93e

Browse files
sp00ktoberclaude
andcommitted
test(studio): compile stays identical across the rows' edits and a selection writes nothing
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent 73fed61 commit da6a93e

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎apps/studio/tests/monster/ui/test_behaviour.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,11 +811,12 @@ def test_clearing_the_selection_undims(
811811
doc(ws).edit(rules)
812812
ws.refresh()
813813
panel.sync()
814-
before = bright(panel), wire_ops(panel)
814+
before, kept = (bright(panel), wire_ops(panel)), doc(ws).manifest
815815
select(qtbot, panel, "b4")
816816
assert bright(panel) != before[0]
817817
panel.view.viewer.scene().clearSelection()
818818
qtbot.wait(40)
819+
assert doc(ws).manifest is kept, "a selection writes nothing"
819820
assert (bright(panel), wire_ops(panel)) == before and set(before[1].values()) == {1.0}
820821

821822

‎apps/studio/tests/monster/ui/test_triggers.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,20 +1189,23 @@ def test_a_finding_on_a_block_in_a_rule_keeps_the_rows(
11891189
def test_editing_in_order_is_as_in_a_trigger(
11901190
qtbot: Any, panel: BehaviourPanel, ws: MonsterWorkspace
11911191
) -> None:
1192+
rules = model.compile(doc(ws).manifest)
11921193
entry(right_click(qtbot, panel, "b4"), "Insert after", "Modifiers", "At most").trigger()
11931194
qtbot.wait(60)
11941195
assert blocks(ws)["b4"].next == ["b9"] and blocks(ws)["b9"].play == ["stamp"]
11951196
assert ws.all_view == ORDER and "b9" in shown(panel)
11961197
doc(ws).undo()
11971198
ws.refresh()
11981199
panel.sync()
1200+
assert model.compile(doc(ws).manifest) == rules
11991201
click(qtbot, panel, node_pos(panel, "b4"))
12001202
QTest.keyClick(panel.view, Qt.Key.Key_Delete)
12011203
qtbot.wait(60)
12021204
assert "b4" not in blocks(ws) and "b4" not in shown(panel)
12031205
doc(ws).undo()
12041206
ws.refresh()
12051207
panel.sync()
1208+
assert model.compile(doc(ws).manifest) == rules
12061209
click(qtbot, panel, node_pos(panel, "ref:b4:stamp"))
12071210
assert panel.bar.plays is not None
12081211
panel.bar.plays.ctl.setCurrentIndex(panel.bar.plays.ctl.findText("howl"))

0 commit comments

Comments
 (0)