382 — should check when user have client Expense basic permission¶
Description¶
Verifies that an employee with the "Expense basic" client role (scoped to one client) can see — read-only — every expense on that client (including ones belonging to other users), but invoices remain hidden.
Preconditions¶
- A signed-in owner who will create the client role, plus an invited employee who will be added as a member of the first client with that role.
- Seed data: two clients, expenses for both owner and employee on the first client.
Steps¶
- As the owner, go to Roles → Client roles, add a client role with the test title, toggle "Expense basic" on, then save. Expected: the new role exists.
- Add the employee to the first client with the new role via API. Expected: the member is added with the matching role id.
- Reset the session and sign in as the employee. Open Additional Items. Expected: "Additional items", "Flat rates", "Templates" tabs are shown and both the owner's and the employee's expenses on that client are listed (2 rows).
- Open the employee's own expense. Expected: the form opens in read-only state. Press Escape to close.
- Navigate to Finance → Invoices. Expected: the Finance area shows only "Billing statements" and "Invoices" tabs and the invoice list is empty.
Related¶
- Spec:
playwright/tests/integration/permissions.spec.ts(line 648)