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

updated notification center spec with new center behavior around auto-update

Jonas Jabari09a0f64ff42f
diff --git a/spec/features/notifications/notification_center/notification_center_spec.rb b/spec/features/notifications/notification_center/notification_center_spec.rb
index a87b3f86c93..7fbae2d99a6 100644
--- a/spec/features/notifications/notification_center/notification_center_spec.rb
+++ b/spec/features/notifications/notification_center/notification_center_spec.rb
@@ -219,7 +219,7 @@ RSpec.describe "Notification center",
read_ian: true)
end
- it "opens a toaster if the notification is part of the current filters" do
+ it "auto updates the center when a new notification is created" do
visit home_path
center.open
center.expect_bell_count 2
@@ -227,26 +227,11 @@ RSpec.describe "Notification center",
center.expect_work_package_item notification2
center.expect_no_toaster
notification3.update(read_ian: false)
- center.expect_toast
- center.update_via_toaster
center.expect_no_toaster
center.expect_work_package_item notification
center.expect_work_package_item notification2
center.expect_work_package_item notification3
end
-
- it "does not open a toaster if the notification is not part of the current filters" do
- visit home_path
- center.open
- center.expect_bell_count 2
- side_menu.click_item "Mentioned"
- side_menu.finished_loading
- center.expect_no_toaster
- notification3.update(read_ian: false)
- # We need to wait for the bell to poll for updates
- sleep 15
- center.expect_no_toaster
- end
end
context "with date alert notifications" do