ATS-CRM-ACT-011Complete, cancel and reopen work with clear attribution: Acceptance Test Set
MarkdownComplete, cancel and reopen work with clear attribution: Acceptance Test Set
Coverage
Bound scenarios identify existing assertions; unbound scenarios remain proposed proof. Static inspection does not establish a passing execution.
Test Scenarios
8 scenarios proving CAP-CRM-ACT-011; 8 bound to an existing test.
01 Evaluate ordinary task status transitionsunitnegativetest
- Proves
BR-CAP-CRM-ACT-011-01 - Preconditions
- All task statuses are available to the lifecycle decision.
- Steps
- Evaluate each possible ordinary edit transition.
- Expected
- Open-to-open transitions succeed and closed-boundary transitions fail.
- Data
- Each run creates and isolates the records it needs.
- Bound to
- Source
- services-crm:modules/tasks/tests/unit/services/tasks/lifecycle.spec.js#allows an open task to move to any of the three open statuses
02 Require explicit closing actionsapinegativetest
- Proves
BR-CAP-CRM-ACT-011-02 - Preconditions
- An open task is saved.
- Steps
- Replace its status with Completed or Cancelled.
- Expected
- The service refuses and names the appropriate action.
- Data
- Each run creates and isolates the records it needs.
- Bound to
- Source
- services-crm:modules/tasks/tests/unit/services/tasks/lifecycle.spec.js#refuses an update that would complete the task, naming the operation that would have worked
03 Attribute closing and clear stamps on reopenapitest
- Proves
BR-CAP-CRM-ACT-011-03 - Preconditions
- An open task can be completed and cancelled.
- Steps
- Complete, reopen and cancel it.
- Expected
- Closing stamps identify actor and time, and reopening clears prior stamps.
- Data
- Each run creates and isolates the records it needs.
- Bound to
- Source
- services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#completes the task, stamping who finished it and when
04 Require reopening between closed statusesunitnegativetest
- Proves
BR-CAP-CRM-ACT-011-04 - Preconditions
- Completed and Cancelled tasks are available.
- Steps
- Cancel the completed task and complete the cancelled task.
- Expected
- Both refuse with reopening guidance.
- Data
- Each run creates and isolates the records it needs.
- Bound to
- Source
- services-crm:modules/tasks/tests/unit/services/tasks/lifecycle.spec.js#refuses a cancelled task, asking for the reopen that would make it possible
07 Prevent ordinary edits to closed workapinegativetest
- Proves
BR-CAP-CRM-ACT-011-07 - Preconditions
- A task is cancelled.
- Steps
- Submit its general replacement.
- Expected
- The response conflicts and requires reopening.
- Data
- Each run creates and isolates the records it needs.
- Bound to
- Source
- services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#answers 409 to replacing a cancelled task, which is reopened first
08 Guard lifecycle actions with the read versionapinegativetest
- Proves
BR-CAP-CRM-ACT-011-08 - Preconditions
- A task was completed after an earlier read.
- Steps
- Reopen with the earlier version and send closing actions without a version.
- Expected
- The stale action conflicts, missing versions fail validation and the saved status remains.
- Data
- Each run creates and isolates the records it needs.
- Bound to
- Source
- services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#answers 409 to the reopen sent at the version the completion moved on from