Skip to content

019 — should fill additional item and save it as template

Description

Verifies the "Save as template" shortcut on the additional-item create modal: a user can fill the create form, save the entered values as a template without first creating an additional item, and then reopen the new template with every field (including the current user) populated as entered.

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

Steps

  1. Switch to the "Additional items" tab, click "Add additional item" and "Create additional item".
  2. Fill the create form: name, no unit, total price, client, project, all three labels, the 5th day of the current month as the date, billable on, public and internal descriptions.
  3. Click "Save as template", enter a template name, then click "Save". Expected: A "Saved" popup appears.
  4. Click "Cancel" to close the additional-item modal, then switch to the "Additional item templates" tab. Expected: The templates list contains exactly 1 template.
  5. Open the new template and advance to the additional-item step. Expected: The modal shows unit off, the current user pre-filled, the saved client, project, labels, descriptions, billable on, and the entered total price.
  • Spec: playwright/tests/integration/additionalItem.spec.ts (line 625)