mirror of
https://github.com/bec-project/bec_widgets.git
synced 2026-03-09 10:17:50 +01:00
test: fix tests for qtheme v1
This commit is contained in:
@@ -64,10 +64,10 @@ def test_dark_mode_button_changes_theme(dark_mode_button):
|
||||
Test that the dark mode button changes the theme correctly.
|
||||
"""
|
||||
with mock.patch(
|
||||
"bec_widgets.widgets.utility.visual.dark_mode_button.dark_mode_button.set_theme"
|
||||
) as mocked_set_theme:
|
||||
"bec_widgets.widgets.utility.visual.dark_mode_button.dark_mode_button.apply_theme"
|
||||
) as mocked_apply_theme:
|
||||
dark_mode_button.toggle_dark_mode()
|
||||
mocked_set_theme.assert_called_with("dark")
|
||||
mocked_apply_theme.assert_called_with("dark")
|
||||
|
||||
dark_mode_button.toggle_dark_mode()
|
||||
mocked_set_theme.assert_called_with("light")
|
||||
mocked_apply_theme.assert_called_with("light")
|
||||
|
||||
@@ -17,10 +17,6 @@ def stop_button(qtbot, mocked_client):
|
||||
|
||||
def test_stop_button(stop_button):
|
||||
assert stop_button.button.text() == "Stop"
|
||||
assert (
|
||||
stop_button.button.styleSheet()
|
||||
== "background-color: #cc181e; color: white; font-weight: bold; font-size: 12px;"
|
||||
)
|
||||
stop_button.button.click()
|
||||
assert stop_button.queue.request_scan_halt.called
|
||||
stop_button.close()
|
||||
|
||||
Reference in New Issue
Block a user