Skip to content

Commit

Permalink
Added qtbot.wait
Browse files Browse the repository at this point in the history
  • Loading branch information
fedesemeraro committed Mar 11, 2024
1 parent a5228aa commit c639605
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,13 @@ def test_toggle_show_shock_checkbox(app, qtbot):
Test the functionality of the 'Show Shock' checkbox.
"""
assert app.ui.checkBox_display_shock.isChecked()

qtbot.mouseClick(app.ui.checkBox_display_shock, Qt.LeftButton)
qtbot.wait(100) # event might be asynchronous
assert not app.ui.checkBox_display_shock.isChecked()

qtbot.mouseClick(app.ui.checkBox_display_shock, Qt.LeftButton)

qtbot.wait(100)
assert app.ui.checkBox_display_shock.isChecked()


Expand Down

0 comments on commit c639605

Please sign in to comment.