Skip to content
Snippets Groups Projects
Commit f830824a authored by Oscar Gustafsson's avatar Oscar Gustafsson :bicyclist:
Browse files

Another test

parent 883b1221
No related branches found
No related tags found
No related merge requests found
Pipeline #88146 passed
...@@ -56,6 +56,23 @@ def test_sfg_invalidated_by_remove_of_operation(qtbot, datadir): ...@@ -56,6 +56,23 @@ def test_sfg_invalidated_by_remove_of_operation(qtbot, datadir):
widget.exit_app() widget.exit_app()
def test_sfg_invalidated_by_deleting_of_operation(qtbot, datadir):
widget = GUI.MainWindow()
qtbot.addWidget(widget)
widget._load_from_file(datadir.join('twotapfir.py'))
sfg = widget.sfg_dict['twotapfir']
ops_before_remove = len(widget.operationDragDict)
op = sfg.find_by_name("cmul2")
dragbutton = widget.operationDragDict[op[0]]
# Click
qtbot.mouseClick(dragbutton, QtCore.Qt.MouseButton.LeftButton)
qtbot.keyClick(widget, QtCore.Qt.Key.Key_Delete)
assert not widget.sfg_dict
assert ops_before_remove - 1 == len(widget.operationDragDict)
widget.exit_app()
def test_select_operation(qtbot, datadir): def test_select_operation(qtbot, datadir):
widget = GUI.MainWindow() widget = GUI.MainWindow()
qtbot.addWidget(widget) qtbot.addWidget(widget)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment