003 — should create additional item with unit and non billable¶
Description¶
Verifies that a non-billable additional item that is priced per unit can be created end to end, and that the total price (unit price * amount) is computed correctly and shown in both the modal and the resulting row.
Preconditions¶
- Signed in as the owner of a freshly provisioned organization
- A client and a project (with the project belonging to that client) already exist
- Three labels already exist
- The Additional Items page is open on the "Additional items" tab
Steps¶
- Click "Add additional item" then "Create additional item" to open the create modal.
- Fill the name, switch the unit toggle on, enter unit name, unit price and amount, select the seeded client and project, attach the three labels, pick the 5th day of the current month as the date, set the item to non-billable, and fill the public and internal descriptions. Expected: The modal's total-price field shows unit price * amount rounded to two decimals.
- Click "Save". Expected: A "Created" confirmation popup appears.
- Reveal the hidden columns (date, user, tags, internal description, unit price, amount). Expected: The new row shows the selected date, the current user, the chosen client and project, all three labels, both descriptions, billable = no, the unit price with unit, the amount, the computed total price, and the grid contains exactly 1 additional item.
Related¶
- Spec:
playwright/tests/integration/additionalItem.spec.ts(line 282)