569 — Should populate, mirror, and edit several rows of time records, then delete one¶
Description¶
End-to-end verification that the timesheet correctly records, totals, and mirrors a realistic week of work across four differently configured rows — and that deleting one of those rows removes its time records from both the timesheet and the calendar.
Preconditions¶
- Signed-in user on a fresh organization.
- One seeded client, one seeded project, at least two seeded tasks, one seeded label.
- Timesheet is open on the current week.
Steps¶
- Add four rows with the same Client + Project but different combinations of Task / Label / Billable: row 1 = Project + Task + Label, row 2 = Project + Task, row 3 = Project + Label, row 4 = Client + Label only. Expected: total rows = 4 after each save with each row showing its configured fields.
- Enter the following times (each save triggers an "Updated" toast):
- Row 1 (Project + Task + Label): Tuesday 10h 20m, Friday 8h.
- Row 2 (Project + Task): Sunday 10h, Monday 10h.
- Row 3 (Project + Label): Monday 14h.
- Row 4 (Client + Label): Thursday 5h 45m.
- Expected: every per-day column total and every per-row total reflects the sum of those entries.
- Switch to Calendar / Week view. Expected: 6 calendar events for the week, with the right client/project/task/label combination and durations 10:20, 08:00, two events of 10:00, 14:00, and 05:45 — all billable.
- Switch back to Timesheet and delete row 2 (Project + Task, with its two 10:00 entries). Confirm the delete. Expected: "Deleted" toast and total rows = 3.
- Switch to Calendar / Week view again. Expected: 4 calendar events remain — 10:20, 08:00, 14:00, and 05:45 — and both 10:00 events from the deleted row are gone.
Related¶
- Spec:
playwright/tests/integration/timesheet.spec.ts(line 451)