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

Use close button instead of hacking a way out of the modal

Aaron Contreras9c5275d2ccb6
diff --git a/spec/support/components/work_packages/share_modal.rb b/spec/support/components/work_packages/share_modal.rb
index 64592933f33..216dba6d78e 100644
--- a/spec/support/components/work_packages/share_modal.rb
+++ b/spec/support/components/work_packages/share_modal.rb
@@ -80,13 +80,10 @@ module Components
end
end
- # Typing +:escape+ when the auto-completer is in focus doesn't exit the modal
- # as the auto-completer doesn't seem to allow losing focus from itself with +:escape+
- # Obtaining focus on the modal itself and then and then sending +:escape+ does the
- # trick but this feels buggy.
def close
- modal_element.click
- modal_element.send_keys(:escape)
+ within modal_element do
+ click_button 'Close'
+ end
end
def expect_shared_with(user, role_name = nil, position: nil, editable: true)