533 — should approve and unapprove a time record¶
Description¶
Verifies the Approve / Unapprove workflow for a billable time record (Table view): after approval the row, the edit modal, and the calendar tooltip all show an approved state and the form becomes read-only; after unapproval everything returns to the editable, unapproved state.
Preconditions¶
- Signed in to a seeded test organization.
- Time Records page open in the Table view.
- Seeded client, project, and task (from the stopwatch fixture).
Steps¶
- Click Create time record and switch to Detailed view. Set Client/Project/Task, add an Internal description and a Client description, toggle Billable on. Click Create. Expected: "Created" popup appears, the row shows captured start/end and the 1 h duration.
- Expected: the row's approve menu item reads Approve.
- Click Approve on the row. Expected: success popup appears; the duration cell shows the "approved" treatment; the menu item now reads Unapprove.
- Open the record via the edit pencil. Expected: the modal shows the approved badge and every field is read-only (form disabled).
- Close the modal. Switch to the Calendar, hover over the event for the seeded client. Expected: the calendar tooltip shows the record as approved.
- Return to the Table view and click Unapprove on the row. Expected: success popup appears, the duration cell loses the approved treatment, and the menu item reads Approve again.
- Open the record. Expected: the modal shows no approved badge and the form is editable.
- Switch to Calendar, hover the event. Expected: the calendar tooltip shows the record as not approved.
Related¶
- Spec:
playwright/tests/integration/timerecord.spec.ts(line 724)