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 stabilise the spec (Assumption: The click is either done to early or in the small area below the fig-caption where the whole image is selected --> This will replace the image when the text is entered)

Henriette Dinger78985c29756c
diff --git a/spec/features/work_packages/attachments/attachment_upload_spec.rb b/spec/features/work_packages/attachments/attachment_upload_spec.rb
index e310075506e..e23e51599ad 100644
--- a/spec/features/work_packages/attachments/attachment_upload_spec.rb
+++ b/spec/features/work_packages/attachments/attachment_upload_spec.rb
@@ -103,10 +103,12 @@ describe 'Upload attachment to work package', js: true do
expect(editable).to have_selector('img[src*="/api/v3/attachments/"]', wait: 20)
end
+ sleep 2
+
# Besides testing caption functionality this also slows down clicking on the submit button
# so that the image is properly embedded
caption = page.find('figure.image figcaption')
- caption.click
+ caption.click(x: 10, y: 10)
sleep 0.2
caption.base.send_keys('Some image caption')