Skip to content

313 — should add and edit linked additional items on an item

Description

Verifies that an invoice item can have one expense linked, then be reopened to link a second one, and the item price and final price track the sum of the linked expenses.

Preconditions

  • Signed-in tenant with Client 01, two billable expenses for that client (expense1 €500, expense2 €200), and the user on the new invoice form past the client step.

Steps

  1. Click Add item, type the item name, open the Additional items link picker. Expected: 2 unselected and 0 selected expenses.
  2. Check expense2. Expected: the selection bar reads 1 selected | €200.00. Click Add selected, save the picker.
  3. Expected: the additional-items link count is 1, expense total reads 200.00, item price 200, final price 200.
  4. Reopen the picker. Expected: 1 unselected and 1 selected. Check expense1. Expected: the selection bar reads 1 selected | €500.00. Click Add selected, save the picker.
  5. Expected: the additional-items link count is 2, expense total reads 700.00, item price 700, final price 700.
  • Spec: playwright/tests/integration/invoice.spec.ts (line 412)