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
next attempt to stablize the document attachments upload spec
ulferts0abd5f6db5fa
diff --git a/modules/documents/spec/features/attachment_upload_spec.rb b/modules/documents/spec/features/attachment_upload_spec.rbindex fec56aa24b7..9ed28af513d 100644--- a/modules/documents/spec/features/attachment_upload_spec.rb+++ b/modules/documents/spec/features/attachment_upload_spec.rb@@ -62,6 +62,7 @@ describe 'Upload attachment to documents', js: true doclick_on 'Create'+ # Expect it to be present on the index pageexpect(page).to have_selector('.document-category-elements--header', text: 'New documentation')expect(page).to have_selector('#content img', count: 1)expect(page).to have_content('Image uploaded on creation')@@ -69,8 +70,13 @@ describe 'Upload attachment to documents', js: true dodocument = ::Document.lastexpect(document.title).to eq 'New documentation'+ # Expect it to be present on the show pagefind('.document-category-elements--header a', text: 'New documentation').clickexpect(page).to have_current_path "/documents/#{document.id}", wait: 10+ expect(page).to have_selector('#content img', count: 1)+ expect(page).to have_content('Image uploaded on creation')++ # Adding a second imagefind('.toolbar-items .button', text: 'Edit').clickexpect(page).to have_current_path "/documents/#{document.id}/edit", wait: 10@@ -79,6 +85,7 @@ describe 'Upload attachment to documents', js: true doclick_on 'Save'+ # Expect both images to be present on the show pageexpect(page).to have_selector('#content img', count: 2)expect(page).to have_content('Image uploaded on creation')expect(page).to have_content('Image uploaded the second time')