Skip to content

578 — should create client, fully fill him and then check if it was restored correctly

Description

Verifies that a fully-populated client — covering Client Info (email, website, ownership, employees, industry, type of need, Czech phone) and Billing Details (VAT ID, business ID, full address) — survives a trash + restore round-trip with every field, the "since" date, and the city/country display preserved exactly.

Preconditions

  • Signed-in admin owner of a fresh organization (one existing client from setup).
  • User is logged into the organization.

Steps

  1. Open Clients and click "Add client". Set title, code prefix, and start date = today −5 days. Expected: Form accepts all values.
  2. On the Client Info tab fill: email, website, type of ownership, number of users/employees, industry, type of need, phone country flag "Czechia", and phone "777555666". Expected: All fields accept input.
  3. On the Billing Details tab fill: VAT ID, business ID, a random country (selected by its first three letters), city, street (firstLine), secondLine, thirdLine, postcode, state, and other address details. Expected: All address fields accept input.
  4. Click "Create". Expected: "Created" toast appears and the Clients page shows 2 clients.
  5. Click "Delete" on the new client, confirm the move-to-trash. Expected: "Moved to trash" toast appears.
  6. Open the Trash page. Expected: Exactly 1 item listed — the new client, type "Client", owner name, today's date.
  7. Trigger "Restore all". Expected: Trash empties.
  8. Return to Clients and open the restored client. Expected: All previously-entered values are preserved exactly — email, website, ownership type, employee count, industry, type of need, Czech phone flag, formatted Czech phone number, VAT ID, business ID, country, city, street, second line, third line, postcode, state, address details, the "since" date matching the original start date, and the header city/country display ("city, country") and client name in the detail header.
  • Spec: playwright/tests/integration/trash.spec.ts (line 285)