018 — should create new full filled additional item template with unit, and then use it in additional items¶
Description¶
Verifies the same template-reuse flow as scenario 017 but with a unit-priced template: unit name, unit price and amount are saved on the template, the computed total price equals unit price * amount, and applying the template later pre-fills the unit fields on the new additional item.
Preconditions¶
- Signed in as the owner of a freshly provisioned organization
- A client, a project and three labels already exist
- The Additional Items page is open on the "Additional item templates" tab
Steps¶
- Click "Add template", enter a template name and description, advance to the additional-item step.
- Fill the template's additional item: name, unit on with unit name, unit price and amount, client, project, all three labels, billable on, public and internal descriptions. Expected: The total-price field shows unit price * amount rounded to two decimals.
- Click "Save". Expected: A "Created" popup appears and a template card with the entered name and description is shown.
- Switch to the "Additional items" tab, click "Add additional item" then "Create from template", and select the template by name. Expected: The create modal opens with unit on, the current user pre-filled, the saved client, project, labels, descriptions, billable on, the saved unit price and amount, and the computed total price.
- Open the date picker, pick the 5th day of the current month, then click "Save". Expected: A "Created" popup appears and the new row in the grid shows the selected date, the current user, all saved values including unit price + unit, amount and the computed total price, with the grid containing exactly 1 additional item.
Related¶
- Spec:
playwright/tests/integration/additionalItem.spec.ts(line 586)