Skip to content

Commit

Permalink
changed the shock checkbox test
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandrequ committed Mar 18, 2024
1 parent 44d7606 commit c680c5e
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions tests/test_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ def test_toggle_show_shock_checkbox(app, qtbot):
Test the functionality of the 'Show Shock' checkbox.
"""
initial_state = app.ui.checkBox_display_shock.isChecked()
print(f"Before click: {app.ui.checkBox_display_shock.isChecked()}")
qtbot.mouseClick(app.ui.checkBox_display_shock, Qt.LeftButton)
qtbot.wait(100) # Allow some time for the event to be processed
print(f"After click: {app.ui.checkBox_display_shock.isChecked()}")
assert app.ui.checkBox_display_shock.isChecked() != initial_state


Expand Down Expand Up @@ -403,11 +406,11 @@ def test_set_mask_nframes(app, qtbot):
assert app.ui.spinBox_mask_frames.value() == expected_mask_frames


def test_toggle_display_shock(app, qtbot, mocker):
test_load_analysis_files(app, qtbot, mocker)
initial_state = app.ui.checkBox_display_shock2.isChecked()
qtbot.mouseClick(app.ui.checkBox_display_shock2, Qt.LeftButton)
assert app.ui.checkBox_display_shock2.isChecked() != initial_state
# def test_toggle_display_shock_2(app, qtbot, mocker):
# test_load_analysis_files(app, qtbot, mocker)
# initial_state = app.ui.checkBox_display_shock2.isChecked()
# qtbot.mouseClick(app.ui.checkBox_display_shock2, Qt.LeftButton)
# assert app.ui.checkBox_display_shock2.isChecked() != initial_state


def test_switch_to_fitting_params_tab(app, qtbot):
Expand Down

0 comments on commit c680c5e

Please sign in to comment.