From c6396057184908461eb5a9c325d8d9274ccac6aa Mon Sep 17 00:00:00 2001 From: fsemerar Date: Mon, 11 Mar 2024 14:38:11 -0700 Subject: [PATCH] Added qtbot.wait --- tests/test_gui.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_gui.py b/tests/test_gui.py index 7138827..8f76df5 100644 --- a/tests/test_gui.py +++ b/tests/test_gui.py @@ -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()