diff --git a/examples/v0/src/lib.rs b/examples/v0/src/lib.rs index 363b031..95f17e1 100644 --- a/examples/v0/src/lib.rs +++ b/examples/v0/src/lib.rs @@ -105,4 +105,17 @@ mod tests { assert!(effect.has_slot(ui::slots::login_status)); assert!(matches!(effect.ops(), [Effect::Put { .. }])); } + + // req: examples/001 req: push/001 req: push/003 req: build/001 req: build/005 + #[test] + fn sse_notifications_update_a_generated_slot() { + fn notification(message: &str) -> impl IntoEffect { + ui::slots::notifications.text(message) + } + + let effect = inspect(notification("Build finished")); + + assert!(effect.has_slot(ui::slots::notifications)); + assert!(matches!(effect.ops(), [Effect::Put { .. }])); + } } diff --git a/examples/v0/templates/notifications.heml b/examples/v0/templates/notifications.heml new file mode 100644 index 0000000..c9e0c7e --- /dev/null +++ b/examples/v0/templates/notifications.heml @@ -0,0 +1,4 @@ +
+

Notifications

+
No notifications
+