Skip to content

ATS-CRM-REG-001Maintain the region catalogue: Capability Test Specification

Markdown

ATS-CRM-REG-001

Maintain the region catalogue: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaCRMModuleRegionsRevision3

Read atservices-crm a8d1364freact-console baf6dae3

Coverage

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

Test Scenarios

11 scenarios proving CAP-CRM-REG-001; 7 bound to an existing test.

01 Identifier validation preserves the legacy grammarvalidationapinegativetest
Proves
BR-CAP-CRM-REG-001-01
Preconditions
Regional creation is authorized.
Steps
Submit an identifier with a space and another combining permitted punctuation.
Expected
The invalid identifier receives a field-specific refusal; the valid identifier is accepted.
Data
An invalid spaced identifier and valid identifiers covering the accepted grammar.
Bound to
Source
services-crm:modules/regions/tests/e2e/regions.e2e.spec.js#answers 400 for an id with a space, naming the characters an id may hold
02 Blank names prevent creationvalidationapinegativetest
Proves
BR-CAP-CRM-REG-001-02
Preconditions
The caller can create regions.
Steps
Submit creation without a name and with a name containing only spaces.
Expected
Both requests fail name validation and persist nothing.
Data
The authorized workspace requires no additional records.
Bound to
Source
services-crm:modules/regions/tests/e2e/regions.e2e.spec.js#answers 400 for a body with no name
03 Generated and duplicate identifiers have distinct outcomesedgeapinegativetest
Proves
BR-CAP-CRM-REG-001-03 BR-CAP-CRM-REG-001-04
Preconditions
A named region already exists.
Steps
Create without an identifier, then attempt another creation using the existing identifier.
Expected
The first receives a generated identifier and defaults active; the duplicate is rejected without modifying the original.
Data
A previously saved regional definition.
Bound to
Source
services-crm:modules/regions/tests/integration/services/persistence/regions.integration.spec.js#generates an id when the client names none
04 Replacement requires a current versionconcurrencyapinegativeproposed
Proves
BR-CAP-CRM-REG-001-05
Preconditions
The saved region has version two.
Steps
Replace using version one, omit the version, then use version two.
Expected
The requests respectively conflict, fail validation and save at version three.
Data
A regional definition with an intervening edit.
Source
FND-CRM-REG-022
05 Replacement removes omitted fieldsruleapitest
Proves
BR-CAP-CRM-REG-001-06
Preconditions
The region has a description and external identifier.
Steps
Replace the region with its required name and current version while omitting those fields.
Expected
The omitted values clear and the version increases.
Data
A region carrying explanatory text.
Bound to
Source
services-crm:modules/regions/tests/integration/services/persistence/regions.queries.integration.spec.js#the record a replace left › answers the whole record as the replace left it: the fields it did not state cleared, the version bumped
06 Pagination preserves identifier orderboundaryapitest
Proves
BR-CAP-CRM-REG-001-07
Preconditions
Region identifiers include different letter cases.
Steps
Read small pages and continue from each returned position.
Expected
All records appear once in byte order, and the final page has no continuation.
Data
Five catalogue entries whose identifiers mix letter case.
Bound to
Source
services-crm:modules/regions/tests/integration/services/persistence/regions.integration.spec.js#lists the tenant's regions in id order by bytes, a page at a time
07 Reads are workspace-specificboundaryapinegativetest
Proves
BR-CAP-CRM-REG-001-08
Preconditions
A caller can access two workspaces.
Steps
Read and list one workspace’s region through the other workspace.
Expected
The single read returns not found and the list excludes the foreign region.
Data
Two distinct customer workspaces.
Bound to
Source
services-crm:modules/regions/tests/e2e/regions.e2e.spec.js#the regions › answers 404 for this tenant's region read in another tenant, to a context that covers both
08 An ambiguous create response does not duplicate the regionfailureunittest
Proves
BR-CAP-CRM-REG-001-10
Preconditions
The drawer already chose the creation identifier.
Steps
Lose the first response and retry creation.
Expected
Lookup recovers the original region and no duplicate is created.
Data
A request double that loses the initial response.
Bound to
Source
react-console:lib/configuration/regions.test.ts#the regions api writes (D-05, D-35, D-43) › creates a region under the id the drawer chose and finds it when the answer was lost
09 Unchanged replacement still advances the versiontransitionapiproposed
Proves
BR-CAP-CRM-REG-001-12
Preconditions
The region stands at version two.
Steps
Replace it with the same fields and version.
Expected
The fields remain but the saved version becomes three.
Data
A single regional definition.
Source
services-crm:modules/regions/services/persistence/regions.ts:updateRegionRow
10 A shared catalogue survives import and retirementinteractionapiproposed
Proves
BR-CAP-CRM-REG-001-08 BR-CAP-CRM-REG-002-06 BR-CAP-CRM-REG-013-05 BR-CAP-CRM-REG-014-03 BR-CAP-CRM-REG-015-02
Preconditions
An authorized importer has a file defining one region and an administrator can maintain the catalogue.
Steps
Apply the file, read and rename its region, retire it, then export the saved catalogue; repeat the write requests as a reader.
Expected
The same regional identity appears through maintenance and export, retirement retains it, and the reader cannot change it.
Data
An authorized importer has a file defining one region and an administrator can maintain the catalogue.
Source
WF-CRM-REG-005
11 Regional identity remains local across competing referencesinvariantapinegativeproposed
Proves
INV-DOM-CRM-REG-001-01 INV-DOM-CRM-REG-001-03 INV-DOM-CRM-REG-001-04
Preconditions
Two workspaces each have a region with the same identifier.
Steps
Create local references, attempt a foreign-only reference and remove each referenced definition.
Expected
Local references resolve to their own definition and foreign or dangling references do not commit.
Data
Two workspaces each have a region with the same identifier.
Source
DOM-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.