0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-13 19:21:50 +02:00

test(plot_base): test for plot base re-enabled

This commit is contained in:
2025-04-10 10:07:07 +02:00
parent c97db6aaae
commit b51d637c5f

View File

@ -313,26 +313,26 @@ def test_enable_side_panel_property(qtbot, mocked_client):
assert pb.ui_mode == UIMode.NONE
# def test_switching_between_popup_and_side_panel_closes_dialog(qtbot, mocked_client):
# """
# Test that if a popup dialog is open (via the axis settings popup) then switching
# to side-panel mode closes the dialog.
# """
# pb = create_widget(qtbot, PlotBase, client=mocked_client)
# pb.ui_mode = UIMode.POPUP
# # Open the axis settings popup.
# pb.show_axis_settings_popup()
# qtbot.wait(100)
# # The dialog should now exist and be visible.
# assert pb.axis_settings_dialog is not None
# assert pb.axis_settings_dialog.isVisible() is True
def test_switching_between_popup_and_side_panel_closes_dialog(qtbot, mocked_client):
"""
Test that if a popup dialog is open (via the axis settings popup) then switching
to side-panel mode closes the dialog.
"""
pb = create_widget(qtbot, PlotBase, client=mocked_client)
pb.ui_mode = UIMode.POPUP
# Open the axis settings popup.
pb.show_axis_settings_popup()
qtbot.wait(100)
# The dialog should now exist and be visible.
assert pb.axis_settings_dialog is not None
assert pb.axis_settings_dialog.isVisible() is True
# # Switch to side panel mode.
# pb.ui_mode = UIMode.SIDE
# qtbot.wait(100)
# # The axis settings dialog should be closed (and reference cleared).
# Switch to side panel mode.
pb.ui_mode = UIMode.SIDE
qtbot.wait(100)
# The axis settings dialog should be closed (and reference cleared).
# qtbot.waitUntil(lambda: pb.axis_settings_dialog is None, timeout=5000)
qtbot.waitUntil(lambda: pb.axis_settings_dialog is None, timeout=5000)
def test_enable_fps_monitor_property(qtbot, mocked_client):