|
|
@ -293,4 +293,26 @@ describe 'Datepicker modal logic test cases (WP #43539)', |
|
|
|
datepicker.expect_duration 4 |
|
|
|
datepicker.expect_duration 4 |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
describe 'when only due date set, set start date (test case 10)' do |
|
|
|
|
|
|
|
let(:current_attributes) do |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
start_date: nil, |
|
|
|
|
|
|
|
due_date: Date.parse('2021-02-11'), |
|
|
|
|
|
|
|
duration: nil |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it 'derives the duration' do |
|
|
|
|
|
|
|
datepicker.expect_start_date '' |
|
|
|
|
|
|
|
datepicker.expect_due_date '2021-02-11' |
|
|
|
|
|
|
|
datepicker.expect_duration '' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
datepicker.set_start_date '2021-02-09' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
datepicker.expect_start_date '2021-02-09' |
|
|
|
|
|
|
|
datepicker.expect_due_date '2021-02-11' |
|
|
|
|
|
|
|
datepicker.expect_duration 3 |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|