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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
add notification center sidemenu feature specs
Kabiru Mwenjaa8537f34484e
diff --git a/spec/features/notifications/notification_center/notification_center_sidemenu_spec.rb b/spec/features/notifications/notification_center/notification_center_sidemenu_spec.rbindex faf5a6209aa..c2cd4a83248 100644--- a/spec/features/notifications/notification_center/notification_center_sidemenu_spec.rb+++ b/spec/features/notifications/notification_center/notification_center_sidemenu_spec.rb@@ -24,6 +24,7 @@ RSpec.describe "Notification center sidemenu",shared_let(:work_package4) { create(:work_package, project: project3, author: other_user) }shared_let(:work_package5) { create(:work_package, :is_milestone, project: project3, author: other_user) }shared_let(:work_package6) { create(:work_package, :is_milestone, project: project3, author: other_user) }+ shared_let(:work_package7) { create(:work_package, project: project3, author: other_user) }let(:notification_watched) docreate(:notification,@@ -67,9 +68,19 @@ RSpec.describe "Notification center sidemenu",reason: :shared)end+ let(:notification_reminder) do+ reminder = create(:reminder, remindable: work_package7, creator: other_user, note: "This is an important reminder")+ notification = create(:notification,+ recipient:,+ resource: work_package7,+ reason: :reminder)+ create(:reminder_notification, reminder:, notification:)+ notification+ end+let(:notifications) do[notification_watched, notification_assigned, notification_responsible, notification_mentioned, notification_date,- notification_shared]+ notification_shared, notification_reminder]endlet(:center) { Pages::Notifications::Center.new }@@ -99,6 +110,7 @@ RSpec.describe "Notification center sidemenu",side_menu.expect_item_with_no_count "Watcher"side_menu.expect_item_with_no_count "Date alert"side_menu.expect_item_with_no_count "Shared"+ side_menu.expect_item_with_no_count "Reminder"endend@@ -106,35 +118,37 @@ RSpec.describe "Notification center sidemenu",side_menu.expect_open# Expect standard filters- side_menu.expect_item_with_count "Inbox", 6+ side_menu.expect_item_with_count "Inbox", 7side_menu.expect_item_with_count "Assignee", 1side_menu.expect_item_with_count "Mentioned", 1side_menu.expect_item_with_count "Accountable", 1side_menu.expect_item_with_count "Watcher", 1side_menu.expect_item_with_count "Date alert", 1side_menu.expect_item_with_count "Shared", 1+ side_menu.expect_item_with_count "Reminder", 1# Expect project filtersside_menu.expect_item_with_count project.name, 1side_menu.expect_item_with_count project2.name, 1- side_menu.expect_item_with_count "... #{project3.name}", 4+ side_menu.expect_item_with_count "... #{project3.name}", 5# Reading a notification...center.mark_notification_as_read notification_watched# ... will change the filter counts- side_menu.expect_item_with_count "Inbox", 5+ side_menu.expect_item_with_count "Inbox", 6side_menu.expect_item_with_count "Assignee", 1side_menu.expect_item_with_count "Mentioned", 1side_menu.expect_item_with_count "Accountable", 1side_menu.expect_item_with_count "Date alert", 1side_menu.expect_item_with_count "Shared", 1+ side_menu.expect_item_with_count "Reminder", 1side_menu.expect_item_with_no_count "Watcher"# ... and show only those projects with a notificationside_menu.expect_no_item project.nameside_menu.expect_item_with_count project2.name, 1- side_menu.expect_item_with_count "... #{project3.name}", 4+ side_menu.expect_item_with_count "... #{project3.name}", 5# Empty filter sets have a separate messageside_menu.click_item "Watcher"@@ -152,6 +166,7 @@ RSpec.describe "Notification center sidemenu",side_menu.expect_item_with_no_count "Watcher"side_menu.expect_item_with_no_count "Date alert"side_menu.expect_item_with_no_count "Shared"+ side_menu.expect_item_with_no_count "Reminder"side_menu.expect_no_item project.nameside_menu.expect_no_item project2.name@@ -160,66 +175,74 @@ RSpec.describe "Notification center sidemenu",it "updates the content when a filter is clicked" do# All notifications are shown- center.expect_work_package_item *notifications+ center.expect_work_package_item(*notifications)# Filter for "Watcher"side_menu.click_item "Watcher"side_menu.finished_loadingcenter.expect_work_package_item notification_watchedcenter.expect_no_item notification_assigned, notification_responsible, notification_mentioned, notification_date,- notification_shared+ notification_shared, notification_reminder# Filter for "Assignee"side_menu.click_item "Assignee"side_menu.finished_loadingcenter.expect_work_package_item notification_assignedcenter.expect_no_item notification_watched, notification_responsible, notification_mentioned, notification_date,- notification_shared+ notification_shared, notification_reminder# Filter for "Accountable"side_menu.click_item "Accountable"side_menu.finished_loadingcenter.expect_work_package_item notification_responsiblecenter.expect_no_item notification_watched, notification_assigned, notification_mentioned, notification_date,- notification_shared+ notification_shared, notification_reminder# Filter for "Mentioned"side_menu.click_item "Mentioned"side_menu.finished_loadingcenter.expect_work_package_item notification_mentionedcenter.expect_no_item notification_watched, notification_assigned, notification_responsible, notification_date,- notification_shared+ notification_shared, notification_reminder# Filter for "Date alert"side_menu.click_item "Date alert"side_menu.finished_loadingcenter.expect_work_package_item notification_datecenter.expect_no_item notification_watched, notification_assigned, notification_responsible, notification_mentioned,- notification_shared+ notification_shared, notification_reminder# Filter for "Shared"side_menu.click_item "Shared"side_menu.finished_loadingcenter.expect_work_package_item notification_sharedcenter.expect_no_item notification_watched, notification_assigned, notification_responsible, notification_mentioned,- notification_date+ notification_date, notification_reminder++ # Filter for "Reminder"+ side_menu.click_item "Reminder"+ side_menu.finished_loading+ center.expect_work_package_item notification_reminder+ center.expect_no_item notification_watched, notification_assigned, notification_responsible, notification_mentioned,+ notification_date, notification_shared# Filter for project1side_menu.click_item project.nameside_menu.finished_loadingcenter.expect_work_package_item notification_watchedcenter.expect_no_item notification_assigned, notification_responsible, notification_mentioned, notification_date,- notification_shared+ notification_shared, notification_reminder# Filter for project3side_menu.click_item "... #{project3.name}"side_menu.finished_loading- center.expect_work_package_item notification_responsible, notification_mentioned, notification_date, notification_shared+ center.expect_work_package_item notification_responsible, notification_mentioned, notification_date, notification_shared,+ notification_remindercenter.expect_no_item notification_watched, notification_assigned# Reset by clicking on the Inboxside_menu.click_item "Inbox"side_menu.finished_loading- center.expect_work_package_item *notifications+ center.expect_work_package_item(*notifications)endend