1
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2026-03-28 19:38:27 +01:00

test: fixes after theme changes

This commit is contained in:
2025-08-26 08:47:55 +02:00
committed by wyzula-jan
parent 5730814520
commit 3cc4d19e99
6 changed files with 2 additions and 17 deletions

View File

@@ -71,16 +71,3 @@ def test_dark_mode_button_changes_theme(dark_mode_button):
dark_mode_button.toggle_dark_mode()
mocked_set_theme.assert_called_with("light")
def test_dark_mode_button_changes_on_os_theme_change(qtbot, dark_mode_button):
"""
Test that the dark mode button changes the theme correctly when the OS theme changes.
"""
qapp = QApplication.instance()
assert dark_mode_button.dark_mode_enabled is False
assert dark_mode_button.mode_button.toolTip() == "Set Dark Mode"
qapp.theme_signal.theme_updated.emit("dark")
qtbot.wait(100)
assert dark_mode_button.dark_mode_enabled is True
assert dark_mode_button.mode_button.toolTip() == "Set Light Mode"