477 — should show warning when I set time in the future¶
Description¶
Verifies that the stopwatch refuses to start when the start time is set in the future and surfaces validation errors on both the date and time fields.
Preconditions¶
- Signed-in owner user.
- Calendar opened in Week view on the current week with no active timer running.
Steps¶
- Open the stopwatch widget and switch to detailed view.
- Compute the target start as one datetime: now + 1 hour (between 23:00 and midnight this lands on tomorrow — the date and time must come from the same rolled datetime, see issue #1332).
- Open the Start Date picker and pick the target's calendar day, then open the Start Time picker, set the target's time and close it.
- Click Start. Expected: the stopwatch does not start running.
- Expected: the Start Date field shows a validation error indicating the start cannot be in the future.
- Expected: the Start Time field shows the corresponding future-time validation error.
Related¶
- Spec:
playwright/tests/integration/stopwatch.spec.ts(line 290) - Page objects:
datepicker.component.ts(calculateDateTimeWithOffset,setTime,setDatepicker),stopwatch.component.ts