Skip to content

ATS-CRM-ACT-011Complete, cancel and reopen work with clear attribution: Acceptance Test Set

Markdown

ATS-CRM-ACT-011

Complete, cancel and reopen work with clear attribution: Acceptance Test Set

Markdown
  • DocumentProposed

Planning

Proves capability
CAP-CRM-ACT-011

KindAcceptance test setProduct areaCRMModuleActivities, Follow-ups and Task WorkRevision2

Read atservices-crm a8d1364freact-console baf6dae3

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
services-crm:modules/tasks/tests/unit/services/tasks/lifecycle.spec.js#allows an open task to move to any of the three open statuses
services-crm:modules/tasks/tests/unit/services/tasks/lifecycle.spec.js#decides every operation from every status, so no move is left unanswered
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
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
services-crm:modules/tasks/tests/unit/services/tasks/lifecycle.spec.js#refuses an update that would cancel the task the same way
services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#refuses a replacement that would complete the task, naming the operation that would
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
services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#completes the task, stamping who finished it and when
services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#cancels it afterwards, stamping who decided that and when
services-crm:modules/tasks/tests/integration/db/tasks.table.integration.spec.js#refuses a completion stamp on a task that is not completed, so a reopen leaves no trace
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
services-crm:modules/tasks/tests/unit/services/tasks/lifecycle.spec.js#refuses a cancelled task, asking for the reopen that would make it possible
services-crm:modules/tasks/tests/unit/services/tasks/lifecycle.spec.js#refuses a completed task, asking for the reopen that would make it possible
services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#refuses cancelling a completed task, asking for the reopen first
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
05 Reject repeated user completionapinegativetest
Proves
BR-CAP-CRM-ACT-011-05
Preconditions
The task is already completed.
Steps
Complete it again as a person.
Expected
The action returns Conflict.
Data
Each run creates and isolates the records it needs.
Bound to
services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#answers 409 to completing a task that is already completed
Source
services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#answers 409 to completing a task that is already completed
06 Restore Open and remove completion attributionapinegativetest
Proves
BR-CAP-CRM-ACT-011-06
Preconditions
A deferred task was completed.
Steps
Reopen it and separately try reopening an already open task.
Expected
The closed task returns to Open without closing stamps; the other request fails.
Data
Each run creates and isolates the records it needs.
Bound to
services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#reopens it as open, whatever status it was in before it closed
services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#clears the completion stamps on the reopen, so nothing says it is done
services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#answers 409 to reopening a task that is not closed
services-crm:modules/tasks/tests/unit/services/tasks/lifecycle.spec.js#refuses a deferred task too: deferred is still a task somebody will do
Source
services-crm:modules/tasks/tests/integration/services/persistence/tasks.integration.spec.js#reopens it as open, whatever status it was in before it closed
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
services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#answers 409 to replacing a cancelled task, which is reopened first
services-crm:modules/tasks/tests/unit/services/tasks/lifecycle.spec.js#refuses an update of a completed task even where the status is left alone
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
services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#answers 409 to the reopen sent at the version the completion moved on from
services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#answers 400 naming sys_version to a reopen, a cancel and a complete that name no version
services-crm:modules/tasks/tests/unit/api/task-api-mapper.spec.js#refuses a body that names no version, as ObjectInvalid naming sys_version
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

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.