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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Fix datepicker spec for both multi and single month datepickers
Benjamin Bädorf07bf01c432c1
diff --git a/spec/support/components/datepicker/work_package_datepicker.rb b/spec/support/components/datepicker/work_package_datepicker.rbindex ba59e6141da..8f07313cfaa 100644--- a/spec/support/components/datepicker/work_package_datepicker.rb+++ b/spec/support/components/datepicker/work_package_datepicker.rb@@ -15,7 +15,13 @@ module Componentsdef select_month(month)month = Date::MONTHNAMES.index(month) if month.is_a?(String)retry_block do- current_month = flatpickr_container.first('.flatpickr-monthDropdown-months').value.to_i + 1+ # This is for a double-month datepicker+ current_month = Date::MONTHNAMES.index(flatpickr_container.first('.cur-month').text)+ if current_month == nil+ # This is for a single-month datepicker+ current_month = flatpickr_container.first('.flatpickr-monthDropdown-months').value.to_i + 1+ end+if current_month < monthwhile current_month < month