Test Scenarios
24 scenarios proving CAP-CRM-ACT-011; 9 bound to an existing test.
01 Evaluate ordinary task status transitionstransitionunitnegativetest
- 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 actionsvalidationapinegativetest
- 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 reopeninvariantapitest
- 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 statusestransitionunitnegativetest
- 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
05 Reject repeated user completionedgeapinegativetest
- 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
- Source
- services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#answers 409 to completing a task that is already completed
07 Prevent ordinary edits to closed workfailureapinegativetest
- 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 versionconcurrencyapinegativetest
- 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
10 Persist task from Open to Waiting for someone elsetransitionapiproposed
- Proves
INV-DOM-CRM-ACT-003-02 INV-DOM-CRM-ACT-003-10 INV-DOM-CRM-ACT-003-12 - Preconditions
- Run-owned task has Open standing. The task is unfinished, updates are unlocked and the read version matches.
- Steps
- An ordinary edit selects another unfinished-work status. Read the resulting record and affected projections after commit.
- Expected
- The resulting task has Waiting for someone else standing. Enabled attention refreshes an overdue item within the task transaction.
- Data
- Run-owned records in an isolated workspace; fixed clock for calendar checks.
- 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
11 Persist task from Waiting for someone else to Deferredtransitionapiproposed
- Proves
INV-DOM-CRM-ACT-003-02 INV-DOM-CRM-ACT-003-10 INV-DOM-CRM-ACT-003-12 - Preconditions
- Run-owned task has Waiting for someone else standing. The task is unfinished, updates are unlocked and the read version matches.
- Steps
- An ordinary edit selects another unfinished-work status. Read the resulting record and affected projections after commit.
- Expected
- The resulting task has Deferred standing. Enabled attention refreshes an overdue item within the task transaction.
- Data
- Run-owned records in an isolated workspace; fixed clock for calendar checks.
- 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
12 Persist task from Deferred to Opentransitionapiproposed
- Proves
INV-DOM-CRM-ACT-003-02 INV-DOM-CRM-ACT-003-10 INV-DOM-CRM-ACT-003-12 - Preconditions
- Run-owned task has Deferred standing. The task is unfinished, updates are unlocked and the read version matches.
- Steps
- An ordinary edit selects another unfinished-work status. Read the resulting record and affected projections after commit.
- Expected
- The resulting task has Open standing. Enabled attention refreshes an overdue item within the task transaction.
- Data
- Run-owned records in an isolated workspace; fixed clock for calendar checks.
- 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
13 Persist task from Open to Completedtransitionapiproposed
- Proves
INV-DOM-CRM-ACT-003-02 INV-DOM-CRM-ACT-003-10 INV-DOM-CRM-ACT-003-12 - Preconditions
- Run-owned task has Open standing. Updates are unlocked and the task is unfinished; the public action also requires the current read version.
- Steps
- The dedicated completion action is invoked. Read the resulting record and affected projections after commit.
- Expected
- The resulting task has Completed standing. The completion actor and instant are recorded while routing is retained. Enabled attention resolves an overdue item as completed in the same transaction.
- Data
- Run-owned records in an isolated workspace; fixed clock for calendar checks.
- Source
- services-crm:modules/tasks/tests/e2e/tasks.e2e.spec.js#completes the task, stamping who finished it and when
14 Persist task from Open to Cancelledtransitionapiproposed
- Proves
INV-DOM-CRM-ACT-003-02 INV-DOM-CRM-ACT-003-10 INV-DOM-CRM-ACT-003-12 - Preconditions
- Run-owned task has Open standing. Updates are unlocked and the task is unfinished; the public action also requires the current read version.
- Steps
- The dedicated cancellation action is invoked. Read the resulting record and affected projections after commit.
- Expected
- The resulting task has Cancelled standing. The cancellation actor and instant are recorded while routing is retained. Enabled attention resolves an overdue item as cancelled in the same transaction.
- Data
- Run-owned records in an isolated workspace; fixed clock for calendar checks.
- Source
- services-crm:modules/tasks/services/persistence/tasks.ts:closeTask
15 Persist task from Waiting for someone else to Completedtransitionapiproposed
- Proves
INV-DOM-CRM-ACT-003-02 INV-DOM-CRM-ACT-003-10 INV-DOM-CRM-ACT-003-12 - Preconditions
- Run-owned task has Waiting for someone else standing. Updates are unlocked and the task is unfinished; the public action also requires the current read version.
- Steps
- The dedicated completion action is invoked. Read the resulting record and affected projections after commit.
- Expected
- The resulting task has Completed standing. The completion actor and instant are recorded while routing is retained. Enabled attention resolves an overdue item as completed in the same transaction.
- Data
- Run-owned records in an isolated workspace; fixed clock for calendar checks.
- Source
- services-crm:modules/tasks/services/tasks/lifecycle.ts:taskTransitionRefusal
16 Persist task from Deferred to Cancelledtransitionapiproposed
- Proves
INV-DOM-CRM-ACT-003-02 INV-DOM-CRM-ACT-003-10 INV-DOM-CRM-ACT-003-12 - Preconditions
- Run-owned task has Deferred standing. Updates are unlocked and the task is unfinished; the public action also requires the current read version.
- Steps
- The dedicated cancellation action is invoked. Read the resulting record and affected projections after commit.
- Expected
- The resulting task has Cancelled standing. The cancellation actor and instant are recorded while routing is retained. Enabled attention resolves an overdue item as cancelled in the same transaction.
- Data
- Run-owned records in an isolated workspace; fixed clock for calendar checks.
- Source
- services-crm:modules/tasks/services/tasks/lifecycle.ts:taskTransitionRefusal
17 Persist task from Completed to Opentransitionapiproposed
- Proves
INV-DOM-CRM-ACT-003-02 INV-DOM-CRM-ACT-003-10 INV-DOM-CRM-ACT-003-12 - Preconditions
- Run-owned task has Completed standing. The task is closed, updates are unlocked and the required read version matches.
- Steps
- The dedicated reopening action is invoked. Read the resulting record and affected projections after commit.
- Expected
- The resulting task has Open standing. Both closing stamp pairs are cleared and the status becomes Open regardless of the earlier unfinished status. Enabled attention publishes again if the reopened work is overdue.
- Data
- Run-owned records in an isolated workspace; fixed clock for calendar checks.
- 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
18 Persist task from Cancelled to Opentransitionapiproposed
- Proves
INV-DOM-CRM-ACT-003-02 INV-DOM-CRM-ACT-003-10 INV-DOM-CRM-ACT-003-12 - Preconditions
- Run-owned task has Cancelled standing. The task is closed, updates are unlocked and the required read version matches.
- Steps
- The dedicated reopening action is invoked. Read the resulting record and affected projections after commit.
- Expected
- The resulting task has Open standing. Both closing stamp pairs are cleared and the status becomes Open regardless of the earlier unfinished status. Enabled attention publishes again if the reopened work is overdue.
- Data
- Run-owned records in an isolated workspace; fixed clock for calendar checks.
- Source
- services-crm:modules/tasks/services/persistence/tasks.ts:reopenTask
19 Persist task from Open to Deferredtransitionapiproposed
- Proves
INV-DOM-CRM-ACT-003-02 INV-DOM-CRM-ACT-003-10 INV-DOM-CRM-ACT-003-12 - Preconditions
- Run-owned task has Open standing. The task is unfinished, updates are unlocked and the read version matches.
- Steps
- An ordinary edit selects another unfinished-work status. Read the resulting record and affected projections after commit.
- Expected
- The resulting task has Deferred standing. Enabled attention refreshes an overdue item within the task transaction.
- Data
- Run-owned records in an isolated workspace; fixed clock for calendar checks.
- Source
- services-crm:modules/tasks/services/tasks/lifecycle.ts:taskTransitionRefusal
20 Persist task from Waiting for someone else to Opentransitionapiproposed
- Proves
INV-DOM-CRM-ACT-003-02 INV-DOM-CRM-ACT-003-10 INV-DOM-CRM-ACT-003-12 - Preconditions
- Run-owned task has Waiting for someone else standing. The task is unfinished, updates are unlocked and the read version matches.
- Steps
- An ordinary edit selects another unfinished-work status. Read the resulting record and affected projections after commit.
- Expected
- The resulting task has Open standing. Enabled attention refreshes an overdue item within the task transaction.
- Data
- Run-owned records in an isolated workspace; fixed clock for calendar checks.
- Source
- services-crm:modules/tasks/services/tasks/lifecycle.ts:taskTransitionRefusal
21 Persist task from Deferred to Waiting for someone elsetransitionapiproposed
- Proves
INV-DOM-CRM-ACT-003-02 INV-DOM-CRM-ACT-003-10 INV-DOM-CRM-ACT-003-12 - Preconditions
- Run-owned task has Deferred standing. The task is unfinished, updates are unlocked and the read version matches.
- Steps
- An ordinary edit selects another unfinished-work status. Read the resulting record and affected projections after commit.
- Expected
- The resulting task has Waiting for someone else standing. Enabled attention refreshes an overdue item within the task transaction.
- Data
- Run-owned records in an isolated workspace; fixed clock for calendar checks.
- Source
- services-crm:modules/tasks/services/tasks/lifecycle.ts:taskTransitionRefusal
22 Persist task from Waiting for someone else to Cancelledtransitionapiproposed
- Proves
INV-DOM-CRM-ACT-003-02 INV-DOM-CRM-ACT-003-10 INV-DOM-CRM-ACT-003-12 - Preconditions
- Run-owned task has Waiting for someone else standing. Updates are unlocked and the task is unfinished; the public action also requires the current read version.
- Steps
- The dedicated cancellation action is invoked. Read the resulting record and affected projections after commit.
- Expected
- The resulting task has Cancelled standing. The cancellation actor and instant are recorded while routing is retained. Enabled attention resolves an overdue item as cancelled in the same transaction.
- Data
- Run-owned records in an isolated workspace; fixed clock for calendar checks.
- Source
- services-crm:modules/tasks/services/tasks/lifecycle.ts:taskTransitionRefusal
23 Persist task from Deferred to Completedtransitionapiproposed
- Proves
INV-DOM-CRM-ACT-003-02 INV-DOM-CRM-ACT-003-10 INV-DOM-CRM-ACT-003-12 - Preconditions
- Run-owned task has Deferred standing. Updates are unlocked and the task is unfinished; the public action also requires the current read version.
- Steps
- The dedicated completion action is invoked. Read the resulting record and affected projections after commit.
- Expected
- The resulting task has Completed standing. The completion actor and instant are recorded while routing is retained. Enabled attention resolves an overdue item as completed in the same transaction.
- Data
- Run-owned records in an isolated workspace; fixed clock for calendar checks.
- Source
- services-crm:modules/tasks/services/tasks/lifecycle.ts:taskTransitionRefusal