test: log panel
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user