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 grid adding without toolbar

Oliver Günther58f713d0436d
diff --git a/modules/grids/spec/support/pages/grid.rb b/modules/grids/spec/support/pages/grid.rb
index 370a27dfc5c..06f537d9ea6 100644
--- a/modules/grids/spec/support/pages/grid.rb
+++ b/modules/grids/spec/support/pages/grid.rb
@@ -80,24 +80,15 @@ 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
- add_widget_button = area.find(".grid--widget-add")
+ add_widget_button = area.find(".grid--widget-add", visible: :all)
add_widget_button.click
within(".spot-modal", &)
end
- def enable_add_widget_mode
- within('.toolbar-items') do
- button = find_button "Add widget"
- button.click if button[:class].exclude? "-active"
- end
- end
-
def expect_widget_adding_prohibited_generally(row_number = 1, column_number = 1)
area = area_of(row_number, column_number)
area.hover