568 — Should split a ${hours}h time record across consecutive days¶
Description¶
Verifies that when the user enters more than 24 hours into a single timesheet day-cell, the time is automatically split across consecutive calendar days — one or more full-day records plus a final partial-day record — and the calendar reflects that split.
This scenario is parameterized and runs twice: once for 30h (splits into 1 full day of 24h + 6h on the next day) and once for 58h (splits into 2 full days of 24h + 10h on the third day).
Preconditions¶
- Signed-in user on a fresh organization.
- One seeded client.
- Timesheet is open on the current week.
Steps¶
- Add a single row using only the seeded Client (Billable on) and save. Expected: total rows = 1; column totals and the row total are zero.
- Click the Tuesday cell on that row and enter the parameterized duration — 30 hours for the first iteration, 58 hours for the second. Expected: "Updated" toast appears; the column totals and the row total reflect the entered duration.
- Switch to Calendar and choose the Week view. Expected: the calendar contains the parameterized number of events for the week — 2 events for 30h (one full-day chip + one 06:00 chip), 3 events for 58h (two full-day chips + one 10:00 chip), all billable.
- Expected: the partial-day event shows the client name and a duration of 06:00 (for 30h) or 10:00 (for 58h); the full-day chip(s) render with the duration "48:00" (a known display quirk for all-day records — the inclusive end is shown as exclusive, doubling the printed span).
Related¶
- Spec:
playwright/tests/integration/timesheet.spec.ts(line 420)