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

Change spec now that space selects an autocomplete item

Oliver Günther7d042838b0c4
diff --git a/spec/features/work_packages/details/inplace_editor/shared_examples.rb b/spec/features/work_packages/details/inplace_editor/shared_examples.rb
index 5b152ca4e10..b7c77b26b24 100644
--- a/spec/features/work_packages/details/inplace_editor/shared_examples.rb
+++ b/spec/features/work_packages/details/inplace_editor/shared_examples.rb
@@ -145,20 +145,18 @@ shared_examples 'a principal autocomplete field' do
it 'autocompletes links to user profiles' do
field.activate!
field.clear with_backspace: true
- field.input_element.set(" @lau")
+ field.input_element.send_keys(" @lau")
expect(page).to have_selector('.mention-list-item', text: mentioned_user.name)
expect(page).to have_selector('.mention-list-item', text: mentioned_group.name)
expect(page).not_to have_selector('.mention-list-item', text: user.name)
# Close the autocompleter
field.input_element.send_keys :escape
+ field.ckeditor.clear
- # Clear the field
- sleep(0.01)
- field.clear with_backspace: true
- sleep(0.01)
+ sleep 2
- field.input_element.set(" @Laura Fo")
+ field.ckeditor.type_slowly '@Laura'
expect(page).to have_selector('.mention-list-item', text: mentioned_user.name)
expect(page).not_to have_selector('.mention-list-item', text: mentioned_group.name)
expect(page).not_to have_selector('.mention-list-item', text: user.name)