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

Rename center component to a page

Oliver Günther2ab2d8ebeb21
diff --git a/spec/features/notifications/navigation_spec.rb b/spec/features/notifications/navigation_spec.rb
index 986b7b6063a..83c797c35cb 100644
--- a/spec/features/notifications/navigation_spec.rb
+++ b/spec/features/notifications/navigation_spec.rb
@@ -1,5 +1,4 @@
require 'spec_helper'
-require 'support/components/notifications/center'
describe "Notification center navigation", type: :feature, js: true do
shared_let(:project) { FactoryBot.create :project }
@@ -26,7 +25,7 @@ describe "Notification center navigation", type: :feature, js: true do
journal: second_work_package.journals.last
end
- let(:center) { ::Components::Notifications::Center.new }
+ let(:center) { ::Pages::Notifications::Center.new }
let(:activity_tab) { ::Components::WorkPackages::Activities.new(work_package) }
let(:split_screen) { ::Pages::SplitWorkPackage.new work_package }
diff --git a/spec/features/notifications/notification_center/notification_center_spec.rb b/spec/features/notifications/notification_center/notification_center_spec.rb
index 228bc210ddc..550344bc28c 100644
--- a/spec/features/notifications/notification_center/notification_center_spec.rb
+++ b/spec/features/notifications/notification_center/notification_center_spec.rb
@@ -1,5 +1,4 @@
require 'spec_helper'
-require 'support/components/notifications/center'
describe "Notification center", type: :feature, js: true, with_settings: { journal_aggregation_time_minutes: 0 } do
# Notice that the setup in this file here is not following the normal rules as
@@ -29,7 +28,7 @@ describe "Notification center", type: :feature, js: true, with_settings: { journ
work_package2.journals.first.notifications.first
end
- let(:center) { ::Components::Notifications::Center.new }
+ let(:center) { ::Pages::Notifications::Center.new }
let(:activity_tab) { ::Components::WorkPackages::Activities.new(work_package) }
let(:split_screen) { ::Pages::SplitWorkPackage.new work_package }
diff --git a/spec/features/notifications/notification_center/split_screen_spec.rb b/spec/features/notifications/notification_center/split_screen_spec.rb
index 8de86639736..9418b8ead60 100644
--- a/spec/features/notifications/notification_center/split_screen_spec.rb
+++ b/spec/features/notifications/notification_center/split_screen_spec.rb
@@ -1,5 +1,4 @@
require 'spec_helper'
-require 'support/components/notifications/center'
describe "Split screen in the notification center", type: :feature, js: true do
shared_let(:project) { FactoryBot.create :project }
@@ -26,7 +25,7 @@ describe "Split screen in the notification center", type: :feature, js: true do
journal: second_work_package.journals.last
end
- let(:center) { ::Components::Notifications::Center.new }
+ let(:center) { ::Pages::Notifications::Center.new }
let(:split_screen) { ::Pages::SplitWorkPackage.new work_package }
describe 'basic use case' do
diff --git a/spec/support/components/notifications/center.rb b/spec/support/pages/notifications/center.rb
similarity index 97%
rename from spec/support/components/notifications/center.rb
rename to spec/support/pages/notifications/center.rb
index ac35691efcb..a5e7c9ed793 100644
--- a/spec/support/components/notifications/center.rb
+++ b/spec/support/pages/notifications/center.rb
@@ -26,19 +26,19 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-module Components
+module Pages
module Notifications
- class Center
- include Capybara::DSL
- include RSpec::Matchers
-
- def initialize; end
+ class Center < ::Pages::Page
def open
bell_element.click
expect_open
end
+ def path
+ notifications_center_path
+ end
+
def close
page.find('button[data-qa-selector="op-back-button"]').click
expect_closed