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

Fix flaky test

Christophe Bliardc015be66caa0
diff --git a/spec/features/forums/attachment_upload_spec.rb b/spec/features/forums/attachment_upload_spec.rb
index 99fbb933db2..b82a8a4bffa 100644
--- a/spec/features/forums/attachment_upload_spec.rb
+++ b/spec/features/forums/attachment_upload_spec.rb
@@ -116,6 +116,7 @@ describe 'Upload attachment to forum message', js: true do
click_on "Edit"
end
+ page.find("[data-qa-selector='op-attachments']") # wait for attachments element to be displayed before starting drag and drop
script = <<~JS
const event = new DragEvent('dragenter');
document.body.dispatchEvent(event);