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
Retry month setting in case datepicker is redrawn
Oliver Günther794b1d90077e
diff --git a/spec/support/components/datepicker/work_package_datepicker.rb b/spec/support/components/datepicker/work_package_datepicker.rbindex 8d9fef4102b..aaa14ace7b4 100644--- a/spec/support/components/datepicker/work_package_datepicker.rb+++ b/spec/support/components/datepicker/work_package_datepicker.rb@@ -6,17 +6,19 @@ module Components# Select month from datepickerdef select_month(month)month = Date::MONTHNAMES.index(month) if month.is_a?(String)- current_month = Date::MONTHNAMES.index(flatpickr_container.first('.cur-month').text)-- if current_month < month- while current_month < month- flatpickr_container.find('.flatpickr-next-month').click- current_month = Date::MONTHNAMES.index(flatpickr_container.first('.cur-month').text)- end- elsif current_month > month- while current_month > month- flatpickr_container.find('.flatpickr-prev-month').click- current_month = Date::MONTHNAMES.index(flatpickr_container.first('.cur-month').text)+ retry_block do+ current_month = Date::MONTHNAMES.index(flatpickr_container.first('.cur-month').text)++ if current_month < month+ while current_month < month+ flatpickr_container.find('.flatpickr-next-month').click+ current_month = Date::MONTHNAMES.index(flatpickr_container.first('.cur-month').text)+ end+ elsif current_month > month+ while current_month > month+ flatpickr_container.find('.flatpickr-prev-month').click+ current_month = Date::MONTHNAMES.index(flatpickr_container.first('.cur-month').text)+ endendendend