Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Fix failing notification center spec

Dombi Attila84dcc352704b
diff --git a/spec/features/notifications/notification_center/notification_center_spec.rb b/spec/features/notifications/notification_center/notification_center_spec.rb
index c3c25db8782..5360552af0f 100644
--- a/spec/features/notifications/notification_center/notification_center_spec.rb
+++ b/spec/features/notifications/notification_center/notification_center_spec.rb
@@ -246,6 +246,17 @@ describe "Notification center", js: true, with_settings: { journal_aggregation_t
center.expect_work_package_item due_date_notification
center.expect_work_package_item overdue_date_notification
center.expect_no_item(notification, start_date_notification)
+
+ # do not open a toaster if the notification is not part of the current filters
+ create(:notification,
+ reason: :mentioned,
+ recipient:,
+ resource: overdue_work_package,
+ project: project1)
+
+ # We need to wait for the bell to poll for updates
+ sleep 15
+ center.expect_no_toaster
end
end