381 — should check when user have client Invoice ultimate permission¶
Description¶
Verifies that an employee with the "Invoice ultimate" client role (scoped to a single client) can fully edit that client's invoices with all row actions enabled, but does not gain the Finance settings tab.
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 with 2 invoices each (4 total) plus the standard Finance seed.
Steps¶
- As the owner, go to Roles → Client roles, add a client role with the test title, toggle "Invoice ultimate" on, then save. Expected: the new role exists.
- Add the employee to the first client with this 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 only the employee's own additional item is listed (1 row).
- Open Settings. Expected: the Settings tabs are "Teams", "Time Tracking", "Quick filters", "Personal" (no Finance — client-scoped invoice ultimate doesn't grant global Finance settings).
- Navigate to Finance → Invoices. Expected: the Finance area shows only "Billing statements" and "Invoices" tabs and only the 2 invoices for the first client are visible.
- Inspect the row actions. Expected: the row-action button is visible on both invoices (2 of 2).
- Open invoice
YYYY-0001. Expected: the invoice detail opens in fully editable state.
Related¶
- Spec:
playwright/tests/integration/permissions.spec.ts(line 606)