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
Add scenario 15
Oliver Güntherafffa030c87d
diff --git a/spec/features/work_packages/datepicker/datepicker_logic_spec.rb b/spec/features/work_packages/datepicker/datepicker_logic_spec.rbindex 838e2ee76b0..1bb2c3697c1 100644--- a/spec/features/work_packages/datepicker/datepicker_logic_spec.rb+++ b/spec/features/work_packages/datepicker/datepicker_logic_spec.rb@@ -359,4 +359,26 @@ describe 'Datepicker modal logic test cases (WP #43539)',datepicker.expect_duration 7endend++ describe 'when all values set, changing include NWD to true (Scenario 15)' do+ let(:current_attributes) do+ {+ start_date: Date.parse('2021-02-11'),+ due_date: Date.parse('2021-02-16'),+ duration: 4+ }+ end++ it 'sets the finish date to 14th' do+ datepicker.expect_start_date '2021-02-11'+ datepicker.expect_due_date '2021-02-16'+ datepicker.expect_duration 4++ datepicker.ignore_non_working_days true++ datepicker.expect_start_date '2021-02-11'+ datepicker.expect_due_date '2021-02-14'+ datepicker.expect_duration 4+ end+ endenddiff --git a/spec/support/components/datepicker/work_package_datepicker.rb b/spec/support/components/datepicker/work_package_datepicker.rbindex 83dc80a214c..e07eaf169ca 100644--- a/spec/support/components/datepicker/work_package_datepicker.rb+++ b/spec/support/components/datepicker/work_package_datepicker.rb@@ -90,11 +90,16 @@ module Componentsenddef ignore_non_working_days(val)- if val- container.click_on 'Include non-working days'- else- container.click_on 'Working days only'- end+ text =+ if val+ 'Include non-working days'+ else+ 'Working days only'+ end++ container+ .find('[data-qa-selector="spot-toggle--option"]', text: text)+ .clickenddef clear_duration