From c71676a29c73ce3a0fb07ce193f6569d17ccfdf2 Mon Sep 17 00:00:00 2001 From: Dawn Date: Mon, 24 Aug 2026 18:21:15 +0200 Subject: [PATCH] test: log panel --- tests/unit/gui/test_log_panel.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/unit/gui/test_log_panel.py b/tests/unit/gui/test_log_panel.py index 962ad6df..8b8df096 100644 --- a/tests/unit/gui/test_log_panel.py +++ b/tests/unit/gui/test_log_panel.py @@ -29,3 +29,14 @@ def test_notification_requests_reveal(qtbot): with qtbot.waitSignal(panel.reveal_requested, timeout=1000): panel.show_notification(title="Boom", message="it broke") assert panel.notification._title.text() == "Boom" + + +def test_sticky_notification_is_dismissable(qtbot): + # Sticky means "no auto-clear timer", not "undismissable": the Clear + # button must stay so users can get rid of stale warnings by hand. + panel = LogPanel() + qtbot.addWidget(panel) + panel.show_notification(title="Warn", message="stuck", level="warning", sticky=True) + assert not panel.notification._clear_button.isHidden() + panel.notification._clear_button.click() + assert not panel.notification.isVisible()