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 64c21a9 commit fe5262e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/test_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,12 @@ def test_toggle_display_shock_checkbox(app, qtbot):
"""
Test the functionality of the 'Show Shock' checkbox.
"""
initial_state = app.ui.checkBox_display_shock.setChecked(True)
app.ui.checkBox_display_shock.setChecked(True)
initial_state = app.ui.checkBox_display_shock.isChecked()
qtbot.mouseClick(app.ui.checkBox_display_shock, Qt.LeftButton)
assert app.ui.checkBox_display_shock.isChecked() != initial_state
qtbot.mouseClick(app.ui.checkBox_display_shock, Qt.LeftButton)
assert app.ui.checkBox_display_shock.isChecked() == initial_state


def test_switch_tabs(app, qtbot):
Expand Down Expand Up @@ -405,9 +408,12 @@ def test_set_mask_nframes(app, qtbot):

def test_toggle_display_shock_2(app, qtbot, mocker):
test_load_analysis_files(app, qtbot, mocker)
initial_state = app.ui.checkBox_display_shock2.setChecked(True)
app.ui.checkBox_display_shock2.setChecked(True)
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
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 fe5262e

Please sign in to comment.