Skip to content

225 — should create csv export and check notification

Description

Verifies that a user can export the current Reports view (Time records, Tasks, Projects, or Clients) as a CSV file and that the notifications panel correctly tracks the export from "Generating" through to "Export generated", with the right file name and CSV type.

Preconditions

  • A fresh test tenant is registered and the new user is onboarded; the user is signed in and landed on their organization.
  • Three clients and three projects are seeded; the third project intentionally has no time records to cover the empty case.
  • Three tasks are created (one per project); tagged labels are attached to the first client/project/task.
  • Two employees are created with different billable rates, cost rates and commissions (Employee 1: 250/150/60%, Employee 2: 300/100/30%); each has time records on two different days for two different projects.
  • The user is on the Reports page with the relevant tab open (Time, Tasks, Projects, or Clients) and the corresponding data has been fetched via the API for reference.

Steps

  1. Open the Reports tab for the entity under test (Time records, Tasks, Projects, or Clients). Expected: the grid shows the expected number of items (4 for Time records, 3 for Tasks, Projects, and Clients).
  2. Compare the on-screen summary rows against the values built from the API response for the current week. Expected: every row's summary values (hours, billable hours, costs, revenue, etc., as applicable to the entity) match the values computed from the API data within the current week range.
  3. Click the "Export as CSV" action in the Reports toolbar. Expected: the export options open and "Current view" is offered as a choice.
  4. Click "Current view" to trigger the export. Expected: an export entry appears in the notifications/exports panel.
  5. Verify the notifications panel content. Expected: exactly one export is listed; its status transitions from "Generating export" to "Export generated"; its file name starts with the entity's expected base name (Tracked_Time_Report, Tasks_Portfolio_Summary, Projects_Portfolio_Summary, or Clients_Portfolio_Summary); and its file type is shown as CSV.
  • Spec: playwright/tests/integration/exports.spec.ts (line 294)