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

Add page title for news index page

Christophe Bliardc849072a7279
diff --git a/app/views/news/index.html.erb b/app/views/news/index.html.erb
index 0ac67a4077d..6b18570a3df 100644
--- a/app/views/news/index.html.erb
+++ b/app/views/news/index.html.erb
@@ -26,6 +26,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See COPYRIGHT and LICENSE files for more details.
++#%>
+
+<% html_title t(:label_news_plural) %>
+
<%
managable = User.current.allowed_in_project?(:manage_news, @project)
%>
diff --git a/spec/features/news/creation_and_commenting_spec.rb b/spec/features/news/creation_and_commenting_spec.rb
index 5d6616f8ccd..9b8959736cc 100644
--- a/spec/features/news/creation_and_commenting_spec.rb
+++ b/spec/features/news/creation_and_commenting_spec.rb
@@ -37,6 +37,7 @@ RSpec.describe "News creation and commenting", :js, :with_cuprite do
build(:notification_setting, news_added: true, news_commented: true)
])
end
+ let(:global_html_title) { Components::HtmlTitle.new(project) }
current_user do
create(:user,
@@ -47,6 +48,7 @@ RSpec.describe "News creation and commenting", :js, :with_cuprite do
it "allows creating new and commenting it all of which will result in notifications and mails" do
visit project_news_index_path(project)
+ global_html_title.expect_first_segment "News"
page.find_test_selector("add-news-button").click