Skip to content

226 — should create multiple csv exports and check notification

Description

Verifies that running the CSV export twice in a row from the same Reports view (Time records, Tasks, Projects, or Clients) produces two separate, correctly named CSV entries in the notifications panel, each finishing with status "Export generated".

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 match the values computed from the API data within the current week range.
  3. Click "Export as CSV" and then "Current view" to trigger the first export, then press Escape to dismiss the popover. Expected: the first export is queued in the notifications panel.
  4. Click "Export as CSV" and then "Current view" again to trigger a second export. Expected: a second export entry is queued in the notifications panel.
  5. Inspect the notifications panel. Expected: exactly two exports are listed.
  6. Verify the first export entry. Expected: its status is "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 CSV.
  7. Verify the second export entry. Expected: its status is "Export generated", its file name starts with the same expected base name, and its file type is CSV.
  • Spec: playwright/tests/integration/exports.spec.ts (line 310)