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

ulferts2b1816be481b
diff --git a/modules/documents/spec/features/attachment_upload_spec.rb b/modules/documents/spec/features/attachment_upload_spec.rb
index 197283b41ad..d912f4301a4 100644
--- a/modules/documents/spec/features/attachment_upload_spec.rb
+++ b/modules/documents/spec/features/attachment_upload_spec.rb
@@ -52,8 +52,10 @@ describe 'Upload attachment to documents', js: true do
it 'can upload an image' do
visit project_documents_path(project)
- expect(page)
- .to have_content I18n.t(:no_results_title_text)
+ # Saveguard to ensure the page is properly loaded before clicking on the "+ Document" button
+ # which sometimes seems to come to early.
+ expect(find_field(I18n.t(:'attributes.category')))
+ .to be_checked
within '.toolbar-items' do
click_on 'Document'