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

attempt to fix flickering spec

ulferts3429ecb7bf38
diff --git a/spec/models/attribute_help_text/work_package_spec.rb b/spec/models/attribute_help_text/work_package_spec.rb
index 5318625cf81..fd0445890ce 100644
--- a/spec/models/attribute_help_text/work_package_spec.rb
+++ b/spec/models/attribute_help_text/work_package_spec.rb
@@ -32,6 +32,9 @@ describe AttributeHelpText::WorkPackage, type: :model do
def create_cf_help_text(custom_field)
# Need to clear the request store after every creation as the available attributes are cached
RequestStore.clear!
+ # need to clear the cache to free the memoized
+ # Type.translated_work_package_form_attributes
+ Rails.cache.clear
FactoryBot.create(:work_package_help_text, attribute_name: "custom_field_#{custom_field.id}")
end
@@ -76,10 +79,6 @@ describe AttributeHelpText::WorkPackage, type: :model do
let(:static_instance) { FactoryBot.create :work_package_help_text, attribute_name: 'project' }
before do
- # need to clear the cache to free the memoized
- # Type.translated_work_package_form_attributes
- Rails.cache.clear
-
cf_instance
static_instance
end