377 — should check when user have Expense ultimate permission¶
Description¶
Verifies that an employee with the "Expense ultimate" user role can see and edit every additional item in the organization (not just their own), but still has no visibility into invoices.
Preconditions¶
- A signed-in owner who will create the role, plus an invited employee who will receive it.
- Seed data: bank account, two clients, three expenses (one per user across the two clients), invoice drafts and an issued invoice, plus expense templates.
Steps¶
- As the owner, go to Roles → User roles, add a user role with the test title, toggle "Expense ultimate" on, then save. Expected: the new role appears in the user roles list.
- Assign the role to the invited employee via API and reset the session.
- Sign in as the employee and open Additional Items. Expected: the page shows the "Additional items", "Flat rates", "Templates" tabs and the Finance area shows only "Billing statements" and "Invoices" (no Dashboard).
- Inspect the additional items list. Expected: all three seeded expenses (the owner's two and the employee's one) are visible, totalling 3 rows.
- Click Edit on the owner's expense, rename it to "Test" and save. Expected: an "Updated" confirmation popup appears and the renamed item shows in the list — proving cross-user edit is allowed.
- Navigate to Finance → Invoices. Expected: the invoice list is empty (Expense ultimate does not grant invoice visibility).
Related¶
- Spec:
playwright/tests/integration/permissions.spec.ts(line 427)