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

Add debug information about #open_for used elsewhere than list view

Christophe Bliard5f0f2d816495
diff --git a/spec/support/components/work_packages/context_menu.rb b/spec/support/components/work_packages/context_menu.rb
index 8018b25e665..f1a2e3a8b00 100644
--- a/spec/support/components/work_packages/context_menu.rb
+++ b/spec/support/components/work_packages/context_menu.rb
@@ -39,7 +39,13 @@ module Components
sleep 0.5 unless using_cuprite?
if card_view.nil?
- card_view = page.has_selector?('#wp-view-toggle-button', text: 'Cards', wait: 0)
+ view_toggle_button = find_by_id('wp-view-toggle-button', wait: 0)
+ # DEBUG Remove me
+ if view_toggle_button.nil?
+ puts "DEBUG: #{self}#open_for called for a page without a view toggle button. " \
+ "Example is #{RSpec.current_example.location} - #{RSpec.current_example.id}"
+ end
+ card_view = view_toggle_button&.text == 'Cards'
end
if card_view