Skip to content

ATS-CRM-REG-002Retire regions while preserving their references: Capability Test Specification

Markdown

ATS-CRM-REG-002

Retire regions while preserving their references: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaCRMModuleRegionsRevision3

Read atservices-crm a8d1364freact-console baf6dae3

Coverage

  • Rule gap: FND-CRM-REG-047
  • Transition covered
  • Validation gap: FND-CRM-REG-047
  • Permission covered
  • Edge covered
  • Failure gap: FND-CRM-REG-047
  • Boundary gap: FND-CRM-REG-047
  • Concurrency gap: FND-CRM-REG-047
  • Invariant covered
  • Interaction covered

Test Scenarios

8 scenarios proving CAP-CRM-REG-002; 4 bound to an existing test.

01 References block removalinvariantapinegativetest
Proves
BR-CAP-CRM-REG-002-01 AS-JNY-CRM-REG-004-01
Preconditions
Separate regions are referenced by a contact, an organization and a rule.
Steps
Attempt deletion of each referenced region.
Expected
Every attempt is refused with its dependency identified, leaving the regions present.
Data
Three regional targets, each with its own reference.
Bound to
Source
services-crm:modules/regions/tests/integration/db/regions.table.integration.spec.js#references › refuses to delete a region a contact is in, naming what uses it
02 Unused regions can be removed permanentlytransitionapitest
Proves
BR-CAP-CRM-REG-002-02
Preconditions
A region has no references.
Steps
Delete it and request it again.
Expected
Deletion succeeds and the subsequent read returns not found.
Data
An unreferenced catalogue entry.
Bound to
Source
services-crm:modules/regions/tests/e2e/regions.e2e.spec.js#deletes a region nothing uses
03 Delete authority is separate from edit authoritypermissionbrowsernegativetest
Proves
BR-CAP-CRM-REG-002-03
Preconditions
A user can create and update regions but cannot delete them.
Steps
Request removal through the service and inspect the region menu.
Expected
Deletion requires the delete key and the menu supplies no usable Delete action.
Data
An ordinary user-tier identity.
Bound to
Source
services-crm:tests/unit/regions-authorization.spec.ts#requires crm.regions.delete to delete a region
04 Ordinary replacement can alter a delete lockedgeapinegativeproposed
Proves
BR-CAP-CRM-REG-002-04
Preconditions
One region has a delete lock and another has a full lock.
Steps
Delete the first, replace the second and replace the first without its lock.
Expected
Deletion and the full-lock update are refused; the ordinary replacement clears the delete lock.
Data
Regional examples with deletion and full locks.
Source
services-crm:modules/regions/services/persistence/regions.ts:updateRegionRow, deleteRegionRow
05 Deactivation distinguishes referenced targetstransitionapiproposed
Proves
BR-CAP-CRM-REG-002-07
Preconditions
Assignment is enabled and the current generation has a successful run.
Steps
Deactivate a target of an enabled rule and read settings; repeat with an unreferenced region.
Expected
The referenced target raises recalculation need and the unrelated deactivation records no policy change.
Data
A pair of regional definitions and one policy entry.
Source
FND-CRM-REG-021
06 Retired targets remain assignablerulebrowsertest
Proves
BR-CAP-CRM-REG-002-08
Preconditions
An enabled state rule points to an inactive region.
Steps
Create a contact in that state and allow assignment to run.
Expected
The contact receives the inactive target region.
Data
Address input in New York.
Bound to
Source
react-console:acceptance/crm/playwright/journeys/configuration/CRM-ACC-0361.spec.ts#CRM-ACC-0361
07 Retirement affects policy currency without disabling matchinginteractionapiproposed
Proves
BR-CAP-CRM-REG-002-07 BR-CAP-CRM-REG-002-08 BR-CAP-CRM-REG-006-01 BR-CAP-CRM-REG-010-03
Preconditions
A region has an enabled rule and a current successful recalculation.
Steps
Retire the definition through catalogue editing, read policy currency, then preview a matching address.
Expected
The region remains readable, recalculation is outstanding and the enabled rule still supplies the retired target.
Data
A region has an enabled rule and a current successful recalculation.
Source
WF-CRM-REG-004
08 Retired definitions can return to use without another policy stamptransitionapiproposed
Proves
BR-CAP-CRM-REG-002-02 BR-CAP-CRM-REG-002-06 BR-CAP-CRM-REG-002-07
Preconditions
An unused inactive definition and an active definition referenced by an enabled rule exist.
Steps
Edit the inactive definition while retaining retirement, reactivate it, retire the referenced definition, then clear its dependencies and delete it.
Expected
Reads show each availability change; reactivation leaves generation unchanged and removal becomes possible only after dependencies are gone.
Data
An unused inactive definition and an active definition referenced by an enabled rule exist.
Source
STATE-CRM-REG-001

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.