|
@@ -37,3 +37,22 @@ def test_dismiss(screen: Screen):
|
|
|
screen.wait(1.5)
|
|
|
screen.should_not_contain('Hi!')
|
|
|
assert len(b.client.layout.default_slot.children) == 1
|
|
|
+
|
|
|
+
|
|
|
+def test_no_reset_by_other_notifications(screen: Screen):
|
|
|
+ # see #4373
|
|
|
+ ui.button('Button A', on_click=lambda: ui.notification('Notification A', timeout=1.0))
|
|
|
+ ui.button('Button B', on_click=lambda: ui.notification('Notification B', timeout=1.0))
|
|
|
+ ui.button('Button C', on_click=lambda: ui.notification('Notification C', timeout=1.0))
|
|
|
+ ui.button('Button D', on_click=lambda: ui.notification('Notification D', timeout=1.0))
|
|
|
+
|
|
|
+ screen.open('/')
|
|
|
+ screen.click('Button A')
|
|
|
+ screen.wait(1)
|
|
|
+ screen.click('Button B')
|
|
|
+ screen.wait(1)
|
|
|
+ screen.click('Button C')
|
|
|
+ screen.wait(1)
|
|
|
+ screen.click('Button D')
|
|
|
+ screen.should_contain('Notification D')
|
|
|
+ screen.should_not_contain('Notification A')
|