Skip to content

ATS-CRM-REG-005Maintain individual rules alongside the shared policy: Capability Test Specification

Markdown

ATS-CRM-REG-005

Maintain individual rules alongside the shared policy: Capability Test Specification

Markdown
  • DocumentProposed

Planning

Proves capability
CAP-CRM-REG-005

Design

Executed by
TST-CRM-REG-047, TST-CRM-REG-050

KindAcceptance test setProduct areaCRMModuleRegionsRevision3

Read atservices-crm a8d1364freact-console baf6dae3

Coverage

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

Test Scenarios

9 scenarios proving CAP-CRM-REG-005; 6 bound to an existing test.

01 Insertion supports append and earlier placementruleapitest
Proves
BR-CAP-CRM-REG-005-01
Preconditions
Two rules occupy consecutive positions.
Steps
Create without a position and then create at the first position.
Expected
The first appends; the second precedes the others, which retain a consecutive order.
Data
A two-entry assignment policy.
Bound to
Source
services-crm:modules/regions/tests/e2e/regions.e2e.spec.js#appends a created rule at the end of the order
02 Individual editing checks its versionconcurrencyapinegativeproposed
Proves
BR-CAP-CRM-REG-005-02
Preconditions
A rule has version two.
Steps
Replace with version one, omit the replacement version and patch with the current version test.
Expected
The stale and missing versions are rejected while the current patch succeeds.
Data
A single policy entry.
Source
FND-CRM-REG-022
03 Deletion closes the position gapinvariantapitest
Proves
BR-CAP-CRM-REG-005-04
Preconditions
The policy contains two rules.
Steps
Remove the first rule.
Expected
The retained rule occupies the first position.
Data
A two-entry assignment policy.
Bound to
Source
services-crm:modules/regions/tests/e2e/regions.e2e.spec.js#deletes a rule
04 Reorder requires the complete distinct setvalidationapinegativetest
Proves
BR-CAP-CRM-REG-005-05
Preconditions
Two identified rules exist.
Steps
Submit incomplete, duplicate and unknown-containing orders, then the valid reversed order.
Expected
Invalid orders identify their problems and preserve order; the valid order reverses the sequence.
Data
A two-entry assignment policy.
Bound to
Source
services-crm:modules/regions/tests/e2e/regions.e2e.spec.js#answers 400 for an order that does not name every rule of the tenant
05 Individual writes invalidate older policy draftsconcurrencyapinegativetest
Proves
BR-CAP-CRM-REG-005-06
Preconditions
A client reads settings at version four.
Steps
Create a rule and submit the older whole-list draft.
Expected
The settings version advances and the older draft conflicts without dropping the new rule.
Data
An existing assignment configuration.
Bound to
Source
services-crm:modules/regions/tests/integration/services/persistence/region-assignment-settings.integration.spec.js#rules written one at a time, beside a settings save › moves the settings’ version once for each rule written, as a settings save does
06 Enabled assignment tolerates removal of its final ruleedgeapitest
Proves
BR-CAP-CRM-REG-005-09
Preconditions
The policy has one enabled rule.
Steps
Disable and then remove that rule.
Expected
The requests succeed and assignment remains enabled with no rules.
Data
A single policy entry.
Bound to
Source
services-crm:modules/regions/tests/e2e/regions.e2e.spec.js#the last enabled rule while assignment is on › disables it, leaving the tenant assignment on with nothing to match
07 Rule reads cannot cross workspacesboundaryapinegativetest
Proves
BR-CAP-CRM-REG-005-11
Preconditions
Separate workspaces hold rules.
Steps
List through the other workspace and request an unknown rule.
Expected
No foreign rule appears and the unknown read returns not found.
Data
Two distinct customer workspaces.
Bound to
Source
services-crm:modules/regions/tests/e2e/regions.e2e.spec.js#the rules, one at a time › answers none of this tenant's rules to another tenant's list
08 A single-rule edit changes matching and invalidates bulk currencyinteractionapiproposed
Proves
BR-CAP-CRM-REG-005-05 BR-CAP-CRM-REG-005-06 BR-CAP-CRM-REG-006-01 BR-CAP-CRM-REG-010-03
Preconditions
An enabled policy has a completed current-generation run and two overlapping rules.
Steps
Read a whole-policy draft, reorder rules individually, preview the overlap, inspect need and attempt to save the old draft.
Expected
The reordered first match supplies the result, another recalculation is needed and the stale whole-policy save conflicts.
Data
An enabled policy has a completed current-generation run and two overlapping rules.
Source
WF-CRM-REG-004
09 The first individual rule initializes disabled settingstransitionapiproposed
Proves
BR-CAP-CRM-REG-005-08 BR-CAP-CRM-REG-005-04
Preconditions
A workspace has never saved settings and has one local target region.
Steps
Create its first rule, read settings, delete that rule and read settings again.
Expected
The first write creates disabled defaults; deletion leaves saved disabled settings and an empty order.
Data
A workspace has never saved settings and has one local target region.
Source
services-crm:modules/regions/services/persistence/region-assignment-settings.ts:lockSettingsRowForRuleWrite

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.