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

Please rubocop

Henriette Dargeea5ed94755db
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index a803fc381ea..14ef126e147 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -327,7 +327,7 @@ module ApplicationHelper
def user_theme_data_attributes
mode, _theme_suffix = User.current.pref.theme.split("_", 2)
- "data-color-mode=\"#{mode}\" data-#{mode}-theme=\"#{User.current.pref.theme}\"".html_safe
+ "data-color-mode=#{mode} data-#{mode}-theme=#{User.current.pref.theme}"
end
def highlight_default_language(lang_options)
lang_options.map do |(language_name, code)|
diff --git a/spec/features/types/form_configuration_spec.rb b/spec/features/types/form_configuration_spec.rb
index 63addc141e2..777f7601a79 100644
--- a/spec/features/types/form_configuration_spec.rb
+++ b/spec/features/types/form_configuration_spec.rb
@@ -278,7 +278,7 @@ RSpec.describe 'form configuration', js: true do
let(:cf_identifier) { custom_field.attribute_name }
let(:cf_identifier_api) { cf_identifier.camelcase(:lower) }
- before do
+ def add_cf_to_group
project
custom_field
@@ -301,6 +301,7 @@ RSpec.describe 'form configuration', js: true do
context 'if inactive in project' do
it 'can be added to the type, but is not shown' do
+ add_cf_to_group
# Disable in project, should be invisible
# This step is necessary, since we auto-activate custom fields
# when adding them to the form configuration
@@ -353,6 +354,8 @@ RSpec.describe 'form configuration', js: true do
end
it 'can be added to type and is visible' do
+ add_cf_to_group
+
# Visit work package with that type
wp_page.visit!
wp_page.ensure_page_loaded