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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Add activity tab image upload feature spec
Kabiru Mwenja4bb4845641d8
diff --git a/spec/features/activities/work_package/activity_tab_comment_editor_spec.rb b/spec/features/activities/work_package/activity_tab_comment_editor_spec.rbindex 988bde84570..370d85c645e 100644--- a/spec/features/activities/work_package/activity_tab_comment_editor_spec.rb+++ b/spec/features/activities/work_package/activity_tab_comment_editor_spec.rb@@ -118,4 +118,29 @@ RSpec.describe "Work package activity tab comment editor",endendend++ describe "Attachments" do+ let(:image_fixture) { UploadedFile.load_from("spec/fixtures/files/image.png") }+ let(:editor) { Components::WysiwygEditor.new }++ current_user { admin }++ before do+ wp_page.visit!+ wp_page.wait_for_activity_tab+ end++ it "can upload an image to a comment via drag & drop in editor" do+ activity_tab.add_comment(text: "Sample text", save: false)++ activity_tab.expect_focus_on_editor++ editor.drag_attachment(image_fixture.path, "An image caption")+ editor.wait_until_upload_progress_toaster_cleared++ click_on "Submit"++ expect(page).to have_content("An image caption")+ end+ endend