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

Longer wait times for ckeditor to be initialized

Oliver Günther4eabc0ceba69
diff --git a/modules/documents/spec/features/attachment_upload_spec.rb b/modules/documents/spec/features/attachment_upload_spec.rb
index 42079f6772a..ebf3a5d730e 100644
--- a/modules/documents/spec/features/attachment_upload_spec.rb
+++ b/modules/documents/spec/features/attachment_upload_spec.rb
@@ -52,9 +52,7 @@ describe 'Upload attachment to documents', js: true do
it 'can upload an image' do
visit new_project_document_path(project)
- # Give the page time to initialize
- sleep(0.3)
-
+ expect(page).to have_selector('#new_document', wait: 10)
select(category.name, from: 'Category')
fill_in "Title", with: 'New documentation'
diff --git a/spec/support/components/wysiwyg/wysiwyg_editor.rb b/spec/support/components/wysiwyg/wysiwyg_editor.rb
index 4d26764f255..6debbe98348 100644
--- a/spec/support/components/wysiwyg/wysiwyg_editor.rb
+++ b/spec/support/components/wysiwyg/wysiwyg_editor.rb
@@ -10,11 +10,11 @@ module Components
end
def container
- page.find("#{context_selector} .op-ckeditor--wrapper")
+ page.find("#{context_selector} .op-ckeditor--wrapper", wait: 10)
end
def editor_element
- page.find "#{context_selector} #{input_selector}"
+ page.find("#{context_selector} #{input_selector}", wait: 10)
end
def in_editor