From 42212653b96f16b8c85ebce4de4ca65c0cd9c641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Mon, 22 Aug 2022 15:32:57 +0200 Subject: [PATCH] Remove test case 5a as separated into test case 15 --- .../datepicker/datepicker_logic_spec.rb | 27 ------------------- .../datepicker/work_package_datepicker.rb | 8 ++++++ 2 files changed, 8 insertions(+), 27 deletions(-) diff --git a/spec/features/work_packages/datepicker/datepicker_logic_spec.rb b/spec/features/work_packages/datepicker/datepicker_logic_spec.rb index f113d727de..6fe2c9a8f6 100644 --- a/spec/features/work_packages/datepicker/datepicker_logic_spec.rb +++ b/spec/features/work_packages/datepicker/datepicker_logic_spec.rb @@ -206,33 +206,6 @@ describe 'Datepicker modal logic test cases (WP #43539)', end end - describe 'when all values set and include NWD, reduce duration (test case 5a)' do - let(:current_attributes) do - { - start_date: Date.parse('2021-02-08'), - due_date: Date.parse('2021-02-22'), - duration: 11, - ignore_non_working_days: true - } - end - - it 'sets the duration to 10' do - datepicker.expect_start_date '2021-02-08' - datepicker.expect_due_date '2021-02-22' - datepicker.expect_duration 11 - - datepicker.set_duration 10 - - datepicker.expect_start_date '2021-02-08' - datepicker.expect_due_date '2021-02-21' - datepicker.expect_duration 10 - - apply_and_expect_saved duration: 12, - start_date: Date.parse('2021-02-08'), - due_date: Date.parse('2021-02-21') - end - end - describe 'when all values set, remove duration (test case 6)' do let(:current_attributes) do { diff --git a/spec/support/components/datepicker/work_package_datepicker.rb b/spec/support/components/datepicker/work_package_datepicker.rb index 641bf9c7cf..83dc80a214 100644 --- a/spec/support/components/datepicker/work_package_datepicker.rb +++ b/spec/support/components/datepicker/work_package_datepicker.rb @@ -89,6 +89,14 @@ module Components start_date_field.click end + def ignore_non_working_days(val) + if val + container.click_on 'Include non-working days' + else + container.click_on 'Working days only' + end + end + def clear_duration duration = find_field 'duration' duration.click