ATS-CRM-REG-004 Build the geographic assignment policy: Capability Test Specification
Markdown Design / CRM / Regions / Geographic Assignment Policy / Capability Test Specification Build the geographic assignment policy: Capability Test Specification Coverage Each row links a required rule to its authored proof. A covered category records a specification; executable and remaining variant gaps stay in the finding register.
Whole-policy replacement changes individual reads and preview. The interaction scenario connects configure automatic placement and its address sources, maintain individual rules alongside the shared policy, determine an address’s geographic region, check an address against the saved policy with this capability. Cross-workflow expectations are proposed where no executable binding is present.
Show evidence (sources, provenance, origins, pinned commits)Coverage Rule covered Transition gap: FND-CRM-REG-049 Validation covered Permission gap: FND-CRM-REG-049 Edge gap: FND-CRM-REG-049 Failure gap: FND-CRM-REG-049 Boundary covered Concurrency covered Invariant covered Interaction covered Test Scenarios 11 scenarios proving CAP-CRM-REG-004 ; 7 bound to an existing test.
02 Criteria lists require valid bounded content boundary api negative test
Proves BR-CAP-CRM-REG-004-02 Preconditions The workspace contains a target region. Steps Submit missing postal ranges, empty states or countries, too many states and a range with a blank endpoint. Expected Each invalid list is refused and no replacement policy is committed. Data Criteria lists constructed at the required boundary sizes. Bound to Source services-crm:modules/regions/tests/e2e/regions.e2e.spec.js #answers 400 for a postal code rule with no ranges 03 Rule normalization removes unrelated criteria rule api test
Proves BR-CAP-CRM-REG-004-03 Preconditions A target region exists. Steps Create a state rule also carrying a country restriction and postal ranges. Expected Only the state criteria remain on the saved rule. Data A single regional definition. Bound to Source services-crm:modules/regions/tests/e2e/regions.e2e.spec.js #drops a country given on a rule that is not a postal code rule, as it drops the other types’ lists 04 Postal restrictions use valid country codes validation api negative test
Proves BR-CAP-CRM-REG-004-04 Preconditions A target region exists. Steps Create postal rules with a lowercase two-letter code and an invalid three-letter code. Expected The valid code is stored in capitals and the invalid code is refused. Data A single regional definition. Bound to Source services-crm:modules/regions/tests/e2e/regions.e2e.spec.js #answers 400 for a country that is not an ISO 3166-1 alpha-2 code 09 Whole-policy replacement changes individual reads and preview interaction api proposed
Proves BR-CAP-CRM-REG-004-09 BR-CAP-CRM-REG-005-03 BR-CAP-CRM-REG-006-01 BR-CAP-CRM-REG-007-01 Preconditions A policy has two distinguishable overlapping rules and saved assignment choices. Steps Save both rules in the opposite order, read each through individual-rule operations and preview an overlapping address. Expected Individual reads reflect the saved order and preview identifies the first matching geographic rule. Data A policy has two distinguishable overlapping rules and saved assignment choices. Source ADR-CRM-REG-006 10 Whole-list save admits an old version-one individual edit concurrency api negative proposed
Proves BR-CAP-CRM-REG-004-14 Preconditions A saved rule is read at its initial version and a full-policy draft retains its identifier. Steps Change that rule through whole-list replacement, then send the earlier individual replacement at version one. Expected The recreated rule starts at version one and the older individual edit passes its version check, exposing the documented concurrency weakness. Data A saved rule is read at its initial version and a full-policy draft retains its identifier. Source services-crm:modules/regions/services/persistence/region-assignment-settings.ts:saveRegionAssignmentSettings, insertRule, updateRegionAssignmentRule 11 Enabled draft issues prevent submission at the relevant controls validation api proposed
Proves BR-CAP-CRM-REG-004-12 Preconditions A policy editor stages an enabled rule with no target and incomplete criteria plus a typed source with no address type. Steps Attempt Save and reveal each reported issue, then disable automatic assignment and review draft issues. Expected The enabled draft identifies the affected controls and does not submit; disabling suppresses those editor checks without promising backend acceptance. Data A policy editor stages an enabled rule with no target and incomplete criteria plus a typed source with no address type. Source react-console:components/regions/__tests__/assignment-draft.test.ts ← Previous Capability Test Specification ATS-CRM-REG-003 · Configure automatic placement and its address sources: Capability Test Specification Next Capability Test Specification → ATS-CRM-REG-005 · Maintain individual rules alongside the shared policy: Capability Test Specification