Skip to content

531 — should compute percentage when billable clock is lower than duration

Description

Verifies that after stretching the duration to 3:00 in the new-time-record modal (Table view), dragging the Billable time clock below the worked duration computes a 33.33% billable percentage (1 h of 3 h), does not keep decrementing on repeat drags, and persists correctly in the saved row (Billable time 1:00).

Preconditions

  • Signed in to a seeded test organization.
  • Time Records page open in the Table view.

Steps

  1. Click Create time record and switch to Detailed view. Expected: duration 1:00, start time "now − 1 h", end time "now".
  2. Click the Duration clock and drag +2 hours via the arrows, press Escape. Expected: duration is 3:00, billable duration is 3:00, end shifts by +2 h, start time stays anchored.
  3. Click the Billable time clock, drag −2 hours, press Escape. Expected: billable duration is 1:00 and billable percentage is 33.33%.
  4. Repeat the −2 h drag once more. Expected: billable duration stays 1:00 and percentage stays 33.33%.
  5. Click Create. Expected: the new row shows the captured start/end timestamps, duration 3:00, Client/Project/Task = "-", Labels = "No label", Internal/Client descriptions = "-", Billable time = 1:00, Billable cost = "-".
  • Spec: playwright/tests/integration/timerecord.spec.ts (line 650)