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

Fix failing spec

Benjamin Bädorf86cdc2cf5219
diff --git a/spec/features/work_packages/tabs/watcher_tab_spec.rb b/spec/features/work_packages/tabs/watcher_tab_spec.rb
index bcb6cb4a823..d524e6d966b 100644
--- a/spec/features/work_packages/tabs/watcher_tab_spec.rb
+++ b/spec/features/work_packages/tabs/watcher_tab_spec.rb
@@ -91,9 +91,10 @@ describe 'Watcher tab', js: true, selenium: true do
end
it 'escapes the user name' do
- autocomplete = find('.wp-watcher--autocomplete')
+ autocomplete = find('.wp-watcher--autocomplete ng-select')
target_dropdown = search_autocomplete autocomplete,
- query: 'foo'
+ query: 'foo',
+ results_selector: 'body'
expect(target_dropdown).to have_selector(".ng-option", text: html_user.firstname)
expect(target_dropdown).to have_no_selector(".ng-option em")
@@ -150,9 +151,10 @@ describe 'Watcher tab', js: true, selenium: true do
end
it 'does not show the placeholder user as an option' do
- autocomplete = find('.wp-watcher--autocomplete')
+ autocomplete = find('.wp-watcher--autocomplete ng-select')
target_dropdown = search_autocomplete autocomplete,
- query: ''
+ query: '',
+ results_selector: 'body'
expect(target_dropdown).to have_selector(".ng-option", text: user.name)
expect(target_dropdown).to have_no_selector(".ng-option", text: placeholder.name)