Skip to content

598 — should not save workflow when deleted status is already used

Description

Verifies that the Task workflow cannot be saved when a status the user is trying to delete is already in use by an existing task; the editor surfaces a "status in use" guard.

Preconditions

  • Signed in as an admin of a freshly seeded organization that already has a default project (seeded via WorkflowApi.setupProjectForWorkflowsTesting).
  • Task workflow editor open on the seeded project at the default ToDo / InPrg / Done workflow.

Steps

  1. Open Tasks, click Add task and set the title. Expected: the new task's default status is ToDo and its status menu offers the standard Any status options.
  2. Click Create. Expected: the "Created" toast confirms the task was saved.
  3. Reopen the task and verify the available next-status menu items are InPrg and Done; then set status to InPrg and Save. Expected: the "Updated" toast appears.
  4. Open the Task workflow editor and delete the InPrg status. Expected: the editor now shows 2 statuses.
  5. Click Save workflow. Expected: the save is blocked and the editor displays the "InPrg is used by existing task" warning so the user cannot remove a status that is referenced by tasks.
  • Spec: playwright/tests/integration/workflows.spec.ts (line 158)