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

Remove unnecessary argument from Pages::Grid#enabld_add_widget_mode

Dombi Attilaca286b4975ed
diff --git a/modules/grids/spec/support/pages/grid.rb b/modules/grids/spec/support/pages/grid.rb
index c9fab0c6636..370a27dfc5c 100644
--- a/modules/grids/spec/support/pages/grid.rb
+++ b/modules/grids/spec/support/pages/grid.rb
@@ -80,18 +80,18 @@ module Pages
private
def within_add_widget_modal(row_number, column_number, location, &)
+ enable_add_widget_mode
+
area = area_of(row_number, column_number, location)
area.hover
- enable_add_widget_mode_for(area)
-
add_widget_button = area.find(".grid--widget-add")
add_widget_button.click
within(".spot-modal", &)
end
- def enable_add_widget_mode_for(area)
+ def enable_add_widget_mode
within('.toolbar-items') do
button = find_button "Add widget"
button.click if button[:class].exclude? "-active"