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
Adapt notification spec to new split screen design
Henriette Darge7a00da991791
diff --git a/frontend/src/app/features/in-app-notifications/bell/in-app-notification-bell.component.html b/frontend/src/app/features/in-app-notifications/bell/in-app-notification-bell.component.htmlindex e01ff12a86e..528950d02a1 100644--- a/frontend/src/app/features/in-app-notifications/bell/in-app-notification-bell.component.html+++ b/frontend/src/app/features/in-app-notifications/bell/in-app-notification-bell.component.html@@ -1,5 +1,6 @@<aclass="op-ian-bell op-app-menu--item-action"+ data-qa-selector="op-ian-bell"uiSref="notifications"><op-icon icon-classes="icon-bell">diff --git a/frontend/src/app/features/work-packages/components/back-routing/back-button.component.html b/frontend/src/app/features/work-packages/components/back-routing/back-button.component.htmlindex 4973c83ec83..d418c128b08 100644--- a/frontend/src/app/features/work-packages/components/back-routing/back-button.component.html+++ b/frontend/src/app/features/work-packages/components/back-routing/back-button.component.html@@ -1,5 +1,6 @@<buttonclass="op-back-button button hide-when-print"+ data-qa-selector="op-back-button"[ngClass]="linkClass"[title]="text.goBack"(click)="goBack()"diff --git a/spec/features/notifications/notification_center_spec.rb b/spec/features/notifications/notification_center_spec.rbindex 3b686e6fc67..2539836c763 100644--- a/spec/features/notifications/notification_center_spec.rb+++ b/spec/features/notifications/notification_center_spec.rb@@ -18,6 +18,8 @@ describe "Notification center", type: :feature, js: true doendlet(:center) { ::Components::Notifications::Center.new }+ let(:activity_tab) { ::Components::WorkPackages::Activities.new(work_package) }+ let(:split_screen) { ::Pages::SplitWorkPackage.new work_package }describe 'notification for a new journal' docurrent_user { recipient }@@ -30,11 +32,9 @@ describe "Notification center", type: :feature, js: true docenter.expect_work_package_item notificationcenter.click_item notification- center.expect_expanded notification+ split_screen.expect_open- center.within_item(notification) do- expect(page).to have_text "The work package was created."- end+ activity_tab.expect_activity_listed "created on #{work_package.created_at.strftime('%m/%d/%Y')}"endend@@ -48,20 +48,19 @@ describe "Notification center", type: :feature, js: true docenter.expect_work_package_item notificationcenter.mark_all_read- center.expect_closedcenter.expect_bell_count 0notification.reloadexpect(notification.read_ian).to be_truthyend- it 'can expand the notification to mark it as read' do+ it 'can open the split screen of the notification to mark it as read' dovisit home_pathcenter.expect_bell_count 1center.opencenter.click_item notification- center.expect_expanded notification+ split_screen.expect_opencenter.expect_read_item notificationretry_block dodiff --git a/spec/support/components/notifications/center.rb b/spec/support/components/notifications/center.rbindex eecb1850bff..4e4faa70077 100644--- a/spec/support/components/notifications/center.rb+++ b/spec/support/components/notifications/center.rb@@ -40,7 +40,7 @@ module Componentsenddef close- page.find('button[data-qa-selector="op-modal-close"]').click+ page.find('button[data-qa-selector="op-back-button"]').clickexpect_closedend@@ -70,12 +70,6 @@ module Components.to have_selector("[data-qa-selector='op-ian-notification-item-#{notification.id}'][data-qa-ian-read]")end- def expect_expanded(notification)- within_item(notification) do- expect(page).to have_selector('[data-qa-selector="op-ian-details"]')- end- end-def expect_work_package_item(notification)work_package = notification.resourceraise(ArgumentError, "Expected work package") unless work_package.is_a?(WorkPackage)@@ -105,7 +99,7 @@ module Componentsenddef bell_element- page.find('op-in-app-notification-bell button')+ page.find('op-in-app-notification-bell [data-qa-selector="op-ian-bell"]')endendenddiff --git a/spec/support/components/work_packages/activities.rb b/spec/support/components/work_packages/activities.rbindex 4be0e3b8d6d..c258686f2e9 100644--- a/spec/support/components/work_packages/activities.rb+++ b/spec/support/components/work_packages/activities.rb@@ -36,6 +36,13 @@ module Componentsdef initialize(work_package)@work_package = work_package+ @container = '.work-package-details-activities-list'+ end++ def expect_activity_listed(activity)+ within @container do+ expect(page).to have_content(activity)+ endenddef hover_action(journal_id, action)diff --git a/spec/support/pages/work_packages/split_work_package.rb b/spec/support/pages/work_packages/split_work_package.rbindex 8590962b740..30ef22726d2 100644--- a/spec/support/pages/work_packages/split_work_package.rb+++ b/spec/support/pages/work_packages/split_work_package.rb@@ -47,6 +47,14 @@ module Pagesexpect(page).to have_no_selector(@selector)end+ def expect_open+ expect(page).to have_selector(@selector)++ within container do+ expect(page).to have_selector('.work-packages--details--subject', text: work_package.subject)+ end+ end+def closefind('.work-packages--details-close-icon').clickend