Time Tracking Tests
Dashboard (/business/apps/timetracking)
Section titled “Dashboard (/business/apps/timetracking)”Timer Actions
Section titled “Timer Actions”| Test ID | Description | Preconditions | Steps | Expected Result | Priority |
|---|---|---|---|---|---|
| TT-001 | Start timer | No timer currently running | 1. Navigate to /business/apps/timetracking. 2. Optionally select a project and customer. 3. Enter a description. 4. Submit start-timer action. | Timer starts. started: true returned. Timer state shows as running on page reload. | P0 |
| TT-002 | Start timer with project and customer | Projects and customers exist | 1. Select a project from dropdown. 2. Select a customer. 3. Add description “Working on feature X”. 4. Start timer. | Timer starts with project_id, customer_id, and description associated. | P0 |
| TT-003 | Pause timer | Timer is running | 1. Submit pause-timer action. | Timer pauses. paused: true returned. Elapsed time freezes. | P0 |
| TT-004 | Resume timer | Timer is paused | 1. Submit resume-timer action. | Timer resumes. resumed: true returned. Elapsed time continues from where it paused. | P0 |
| TT-005 | Stop timer | Timer is running or paused | 1. Submit stop-timer action. | Timer stops. stopped: true returned. A time entry is created from the timer session. Entry appears in today’s entries. | P0 |
| TT-006 | Discard timer | Timer is running or paused | 1. Submit discard-timer action. | Timer is discarded. discarded: true returned. No time entry is created. | P1 |
| TT-007 | Start timer while another is running | Timer is already running | 1. Submit start-timer action. | Returns 500 with error message (cannot start a second timer). Existing timer is not affected. | P1 |
| TT-008 | Unauthenticated timer action | Not signed in | 1. Submit any timer action without auth. | Returns 401. | P0 |
Dashboard Data
Section titled “Dashboard Data”| Test ID | Description | Preconditions | Steps | Expected Result | Priority |
|---|---|---|---|---|---|
| TT-010 | Dashboard loads all data | User has entries and active timer | 1. Navigate to /business/apps/timetracking. | Page displays: current timer state, today’s entries, weekly summary, projects list, customers list, and manual entry form. | P0 |
| TT-011 | Weekly summary uses correct week start | Settings have week_start set to Monday (1) | 1. Navigate to dashboard. | Weekly summary aggregates entries starting from Monday of the current week. | P1 |
| TT-012 | Dashboard empty state | New user, no data | 1. Navigate to dashboard. | All sections show empty/default state. No errors. Timer shows as inactive. | P1 |
Manual Entry
Section titled “Manual Entry”| Test ID | Description | Preconditions | Steps | Expected Result | Priority |
|---|---|---|---|---|---|
| TT-015 | Create manual entry | None | 1. Fill entry form (date, duration_minutes, project, description). 2. Submit create-entry action. | Entry created. Success message “Entry added!” displayed. | P0 |
| TT-016 | Create entry with default date | None | 1. Submit create-entry without specifying a date. | Entry is created with today’s date as default. | P1 |
| TT-017 | Create entry with invalid data | None | 1. Submit create-entry with negative duration or missing required fields. | Returns 400 with form validation errors. | P1 |
Entries (/business/apps/timetracking/entries)
Section titled “Entries (/business/apps/timetracking/entries)”| Test ID | Description | Preconditions | Steps | Expected Result | Priority |
|---|---|---|---|---|---|
| TT-020 | List all entries | User has time entries | 1. Navigate to /business/apps/timetracking/entries. | All entries displayed with date, duration, project, customer, description, and invoiced status. | P0 |
| TT-021 | Filter by project | Entries across multiple projects | 1. Select a project from the filter dropdown. | Only entries for that project are shown. URL updates with ?project={id}. | P1 |
| TT-022 | Filter by customer | Entries across multiple customers | 1. Select a customer filter. | Only entries for that customer are shown. | P1 |
| TT-023 | Filter by date range | Entries across date range | 1. Set from and to date filters. | Only entries within the date range are shown. | P1 |
| TT-024 | Filter by invoiced status | Entries with mixed invoiced status | 1. Set ?invoiced=true or ?invoiced=false. | Only entries matching the invoiced flag are shown. | P2 |
| TT-025 | Search entries | User has entries | 1. Enter search term. | Matching entries are displayed. | P1 |
| TT-026 | Create entry from entries page | None | 1. Fill entry form on entries page. 2. Submit create-entry. | Entry created. Default hourly rate pre-filled from settings. | P1 |
| TT-027 | Delete entry | Entry exists | 1. Submit delete-entry action with entry id. | Entry deleted. deleted: true returned. Entry removed from list. | P0 |
| TT-028 | Combined filters | Diverse entry data | 1. Apply project, customer, date range, and search simultaneously. | Results reflect all applied filters. | P2 |
Projects (/business/apps/timetracking/projects)
Section titled “Projects (/business/apps/timetracking/projects)”| Test ID | Description | Preconditions | Steps | Expected Result | Priority |
|---|---|---|---|---|---|
| TT-030 | List projects | User has projects | 1. Navigate to /business/apps/timetracking/projects. | All projects displayed (including inactive). Customer associations shown. | P0 |
| TT-031 | Create project | None | 1. Fill project form (name, customer, hourly rate, color, billable flag). 2. Submit create action. | Project created. Success message “Project created!” displayed. | P0 |
| TT-032 | Create project with defaults | None | 1. Submit create with only name provided. | Project created with default color #6366f1, hourly_rate 0, is_billable true. | P1 |
| TT-033 | Create project with validation errors | None | 1. Submit create with empty name. | Returns 400 with validation errors. | P1 |
| TT-034 | Update project | Project exists | 1. Submit update action with modified name, customer, rate, billable, active, and color fields. | Project updated. updated: true returned. | P1 |
| TT-035 | Toggle project active status | Project exists | 1. Submit update with is_active=false. | Project marked inactive. | P1 |
| TT-036 | Delete project | Project exists with no entries | 1. Submit delete action with project id. | Project deleted. deleted: true returned. | P1 |
| TT-037 | Delete project with entries | Project has associated time entries | 1. Submit delete action. | Returns 500 with error (or cascades, depending on business rules). Verify expected behavior. | P2 |
Reports (/business/apps/timetracking/reports)
Section titled “Reports (/business/apps/timetracking/reports)”| Test ID | Description | Preconditions | Steps | Expected Result | Priority |
|---|---|---|---|---|---|
| TT-040 | Load reports with default filters | User has entries in the last 30 days | 1. Navigate to /business/apps/timetracking/reports. | Report data loaded for last 30 days, grouped by customer. Unbilled summary displayed. | P0 |
| TT-041 | Group by project | User has entries | 1. Set ?group_by=project. | Report data is grouped by project. | P1 |
| TT-042 | Group by day | User has entries | 1. Set ?group_by=day. | Report data is grouped by date. | P1 |
| TT-043 | Custom date range | User has entries | 1. Set from and to parameters. | Report reflects only entries in the specified date range. | P1 |
| TT-044 | Generate invoice from unbilled time | User has unbilled entries for a customer | 1. Submit generate-invoice action with customer_id. | Invoice is created in the invoicing app. User is redirected to /business/apps/invoicing/invoices/{invoice_id}. Entries are marked as invoiced. | P0 |
| TT-045 | Generate invoice without customer | None | 1. Submit generate-invoice without customer_id. | Returns 400 “Customer is required”. | P1 |
| TT-046 | Generate invoice with no unbilled time | Customer has no unbilled entries | 1. Submit generate-invoice with a customer who has zero unbilled entries. | Returns 500 with appropriate error message. | P1 |
| TT-047 | Unbilled summary accuracy | Mix of billed and unbilled entries | 1. Load reports page. | Unbilled summary reflects only non-invoiced entries grouped by customer. | P1 |
Settings (/business/apps/timetracking/settings)
Section titled “Settings (/business/apps/timetracking/settings)”| Test ID | Description | Preconditions | Steps | Expected Result | Priority |
|---|---|---|---|---|---|
| TT-050 | Load settings | Settings exist | 1. Navigate to /business/apps/timetracking/settings. | Form pre-populated with current default_hourly_rate, rounding_increment, and week_start. | P0 |
| TT-051 | Update settings | None | 1. Modify hourly rate, rounding, and week start day. 2. Submit update-settings action. | Settings saved. Success message “Settings saved!” displayed. | P0 |
| TT-052 | Update settings with invalid data | None | 1. Submit update-settings with invalid hourly rate (e.g., negative). | Returns 400 with validation errors. | P1 |
| TT-053 | Settings load error graceful fallback | Settings service throws error | 1. Simulate settings load failure. | Page loads with null settings and empty form. No crash. | P2 |