Skip to content

177 — should create two clients and delete one of them

Description

Verifies that two clients can be created, one of them moved to the trash, and that the deleted client disappears from the active list while appearing in the trash with the correct entity type ("Client") and today's delete date.

Preconditions

  • Signed-in user inside a freshly registered organization
  • Browser is on the Clients overview page

Steps

  1. Create the first client with the generated title and code, then click Create. Expected: a "created" confirmation toast appears.
  2. Create a second client named "Client 2" with a different code, then click Create. Expected: a second "created" toast appears.
  3. Verify the list. Expected: both client names appear and the total client count is 2.
  4. Click the row-level Delete action on "Client 2" and confirm in the Move to trash modal. Expected: a "moved to trash" confirmation toast appears.
  5. Reload. Expected: the active list shows only 1 client, which is the original one.
  6. Switch to Trash. Expected: "Client 2" appears in trash with entity type Client and today's date in the Deleted column.
  • Spec: playwright/tests/integration/client.spec.ts (line 261)