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 / Doneworkflow.
Steps¶
- Open Tasks, click Add task and set the title. Expected: the new task's default status is
ToDoand its status menu offers the standardAny statusoptions. - Click Create. Expected: the "Created" toast confirms the task was saved.
- Reopen the task and verify the available next-status menu items are
InPrgandDone; then set status toInPrgand Save. Expected: the "Updated" toast appears. - Open the Task workflow editor and delete the
InPrgstatus. Expected: the editor now shows 2 statuses. - 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.
Related¶
- Spec:
playwright/tests/integration/workflows.spec.ts(line 158)