Skip to content

576 — should delete project with task, and check both were restored

Description

Verifies cascading trash and restore: deleting a project that still contains a task creates a single project trash entry, and restoring that project brings back both the project and its child task together.

Preconditions

  • Signed-in admin owner of a fresh organization with a seeded project containing one task.
  • User is logged into the organization.

Steps

  1. Switch to Projects and click "Delete" on the seeded project, then confirm the move-to-trash modal. Expected: "Moved to trash" toast appears.
  2. Open the Trash page. Expected: Exactly 1 item listed — the project (type "Project", owner name, today's date). The child task does not appear as a separate row.
  3. Trigger "Restore all". Expected: Trash empties.
  4. Switch to Projects. Expected: Exactly 1 project is listed and its name matches the original project title.
  5. Open the restored project and go to the Tasks tab. Expected: Exactly 1 task is listed and its name matches the original task title — confirming the cascading restore.
  • Spec: playwright/tests/integration/trash.spec.ts (line 230)