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

adapt spec to added ckeditor field

ulfertsd68de4f1bb98
diff --git a/spec/features/projects/projects_custom_fields_spec.rb b/spec/features/projects/projects_custom_fields_spec.rb
index d76a2bafdee..3f9674cce89 100644
--- a/spec/features/projects/projects_custom_fields_spec.rb
+++ b/spec/features/projects/projects_custom_fields_spec.rb
@@ -63,13 +63,13 @@ describe 'Projects custom fields', type: :feature do
scenario 'allows settings the project boolean CF (regression #26313)', js: true do
visit settings_project_path(id: project.id)
- # expect CF and description ckeditor
- expect(page).to have_selector('.op-ckeditor--wrapper', count: 2)
+ # expect CF, description and status description ckeditor
+ expect(page).to have_selector('.op-ckeditor--wrapper', count: 3)
# single hash autocomplete
editor.insert_link 'http://example.org/link with spaces'
- # Save wiki page
+ # Save project settings
click_on 'Save'
expect(page).to have_selector('.flash.notice')
diff --git a/spec/support/components/wysiwyg/wysiwyg_editor.rb b/spec/support/components/wysiwyg/wysiwyg_editor.rb
index 2144552eb26..fa58123d2a0 100644
--- a/spec/support/components/wysiwyg/wysiwyg_editor.rb
+++ b/spec/support/components/wysiwyg/wysiwyg_editor.rb
@@ -117,7 +117,7 @@ module Components
end
def insert_link(link)
- click_toolbar_button 'Link (Ctrl+K)'
+ click_toolbar_button /Link \([^)]+\)/
page.find('.ck-input-text').set link
page.find('.ck-button-save').click
end