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

actually fix milestone spec

Oliver Günther70144ec50f4c
diff --git a/spec/features/work_packages/table/milestones_spec.rb b/spec/features/work_packages/table/milestones_spec.rb
index 08db442bfa2..ee4ca73fce6 100644
--- a/spec/features/work_packages/table/milestones_spec.rb
+++ b/spec/features/work_packages/table/milestones_spec.rb
@@ -39,7 +39,7 @@ describe 'Inline editing milestones', js: true do
start_date.expect_active!
# Open second date, closes first
- due_date.activate!
+ scroll_to_and_click(due_date.display_element)
due_date.expect_active!
# Close with escape
diff --git a/spec/support/components/datepicker/work_package_datepicker.rb b/spec/support/components/datepicker/work_package_datepicker.rb
index 6481d76a34a..1867c5cd085 100644
--- a/spec/support/components/datepicker/work_package_datepicker.rb
+++ b/spec/support/components/datepicker/work_package_datepicker.rb
@@ -16,12 +16,12 @@ module Components
month = Date::MONTHNAMES.index(month) if month.is_a?(String)
retry_block do
# This is for a double-month datepicker
- current_month_element = flatpickr_container.first('.cur-month', between: 0..1)
- if current_month_element != nil
- current_month = Date::MONTHNAMES.index(current_month_element.text)
- else
+ current_month_element = flatpickr_container.all('.cur-month', wait: 0).first
+ if current_month_element == nil
# This is for a single-month datepicker
current_month = flatpickr_container.first('.flatpickr-monthDropdown-months').value.to_i + 1
+ else
+ current_month = Date::MONTHNAMES.index(current_month_element.text)
end
if current_month < month