Skip to content

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

  1. 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.
  2. Expected: the row's approve menu item reads Approve.
  3. Click Approve on the row. Expected: success popup appears; the duration cell shows the "approved" treatment; the menu item now reads Unapprove.
  4. Open the record via the edit pencil. Expected: the modal shows the approved badge and every field is read-only (form disabled).
  5. Close the modal. Switch to the Calendar, hover over the event for the seeded client. Expected: the calendar tooltip shows the record as approved.
  6. 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.
  7. Open the record. Expected: the modal shows no approved badge and the form is editable.
  8. Switch to Calendar, hover the event. Expected: the calendar tooltip shows the record as not approved.
  • Spec: playwright/tests/integration/timerecord.spec.ts (line 724)