Skip to content

374 — should check when user does not have any role

Description

Verifies that an invited employee with no global role still has the personal-scope defaults on Finance pages: they can manage only their own additional items, cannot see anyone else's invoices, and cannot view hourly rate or price on their own time records.

Preconditions

  • A signed-in invited employee in the test organization who has not been granted any user role.
  • Seed data created by the owner: bank account, client, two expenses (one assigned to the owner, one to the employee), two invoice drafts, one issued invoice with one extra line item, hourly rates and expense templates for both users, plus two projects each with a task and one time record on each project.
  • Permissions tests use a fresh tenant per run and clean up afterwards.

Steps

  1. Sign in as the invited employee and open the Additional Items page. Expected: the page shows three tabs — "Additional items", "Flat rates", "Templates".
  2. Stay on the Additional items tab. Expected: only the expense assigned to the employee is listed (1 row, titled with the employee's expense).
  3. Open the employee's own additional item. Expected: the form opens in read-only state. Cancel out.
  4. Click "Add additional item", then "Create additional item", enter a title, and save. Expected: a "Created" confirmation popup appears (users can always create their own items).
  5. Navigate to Finance → Invoices. Expected: the Finance area shows only the "Billing statements" and "Invoices" tabs, and the invoice list is empty.
  6. Navigate to Time tracking → Time entries and open the first time record. Expected: the time record modal opens for the employee. Hourly rate and price fields are hidden.
  • Spec: playwright/tests/integration/permissions.spec.ts (line 309)