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 16
Oliver Günther931122eb094c
diff --git a/frontend/src/app/spot/components/toggle/toggle.component.html b/frontend/src/app/spot/components/toggle/toggle.component.htmlindex 2f489d444c0..54244706aaa 100644--- a/frontend/src/app/spot/components/toggle/toggle.component.html+++ b/frontend/src/app/spot/components/toggle/toggle.component.html@@ -2,6 +2,7 @@*ngFor="let option of options"[ngClass]="{ 'button': true, 'form--field-inline-button': true, '-active': value === option.value }"data-qa-selector="spot-toggle--option"+ [attr.data-qa-active-toggle]="value === option.value"><inputclass="spot-toggle--option-input"diff --git a/spec/features/work_packages/datepicker/datepicker_logic_spec.rb b/spec/features/work_packages/datepicker/datepicker_logic_spec.rbindex 1bb2c3697c1..09bb7c387a1 100644--- a/spec/features/work_packages/datepicker/datepicker_logic_spec.rb+++ b/spec/features/work_packages/datepicker/datepicker_logic_spec.rb@@ -381,4 +381,29 @@ describe 'Datepicker modal logic test cases (WP #43539)',datepicker.expect_duration 4endend++ describe 'when all values set and include NWD true, changing include NWD to false (Scenario 16)' do+ let(:current_attributes) do+ {+ start_date: Date.parse('2021-02-11'),+ due_date: Date.parse('2021-02-14'),+ duration: 4,+ ignore_non_working_days: true+ }+ end++ it 'sets the finish date to 16th' do+ datepicker.expect_start_date '2021-02-11'+ datepicker.expect_due_date '2021-02-14'+ datepicker.expect_duration 4+ datepicker.expect_ignore_non_working_days true++ datepicker.ignore_non_working_days false++ datepicker.expect_ignore_non_working_days false+ datepicker.expect_start_date '2021-02-11'+ datepicker.expect_due_date '2021-02-16'+ 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 e07eaf169ca..809b3b77137 100644--- a/spec/support/components/datepicker/work_package_datepicker.rb+++ b/spec/support/components/datepicker/work_package_datepicker.rb@@ -89,19 +89,29 @@ module Componentsstart_date_field.clickend+ def expect_ignore_non_working_days(val)+ text = ignore_non_working_days_option(val)++ container+ .find('[data-qa-selector="spot-toggle--option"][data-qa-active-toggle]', text: text)+ end+def ignore_non_working_days(val)- text =- if val- 'Include non-working days'- else- 'Working days only'- end+ text = ignore_non_working_days_option(val)container.find('[data-qa-selector="spot-toggle--option"]', text: text).clickend+ def ignore_non_working_days_option(val)+ if val+ 'Include non-working days'+ else+ 'Working days only'+ end+ end+def clear_durationduration = find_field 'duration'duration.click