Skip to content

ATS-CRM-REG-006Determine an address’s geographic region: Capability Test Specification

Markdown

ATS-CRM-REG-006

Determine an address’s geographic region: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaCRMModuleRegionsRevision3

Read atservices-crm a8d1364freact-console baf6dae3

Coverage

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

Test Scenarios

15 scenarios proving CAP-CRM-REG-006; 12 bound to an existing test.

01 Ordering resolves overlapping criteriaruleunittest
Proves
BR-CAP-CRM-REG-006-01
Preconditions
Two enabled rules both cover the address.
Steps
Evaluate that address.
Expected
The earlier rule’s target wins.
Data
Prepared geographic coverage examples.
Bound to
Source
services-crm:modules/regions/tests/unit/region-matching.spec.js#region_for_address › answers the first rule that matches when several would
02 Fallback is deferred and the final enabled fallback winsedgeunittest
Proves
BR-CAP-CRM-REG-006-02
Preconditions
A fallback precedes geographic coverage and another fallback appears later.
Steps
Evaluate a covered and an uncovered address.
Expected
The geographic target wins for coverage and the later enabled fallback wins otherwise.
Data
Prepared geographic coverage examples.
Bound to
Source
services-crm:modules/regions/tests/unit/region-matching.spec.js#region_for_address › tries the rest-of-the-world rule last wherever it sits in the order
03 Disabled coverage contributes no resultedgeapitest
Proves
BR-CAP-CRM-REG-006-03
Preconditions
A disabled match precedes enabled coverage, and another policy has only a disabled fallback.
Steps
Assign addressed contacts with each policy.
Expected
The enabled coverage wins in the first policy and no region results from the second.
Data
Two independently prepared geographic policies.
Bound to
Source
services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment-rules.integration.spec.js#a rule staff turned off › skips the disabled rule and answers the next rule that matches
04 Text intervals include their endpointsboundaryunitnegativetest
Proves
BR-CAP-CRM-REG-006-04
Preconditions
Postal coverage spans the configured five-digit interval.
Steps
Evaluate both endpoints, an interior ZIP+4 and the next uncovered code.
Expected
The endpoints and interior value match while the uncovered code does not.
Data
Postal inputs spanning the relevant boundary cases.
Bound to
Source
services-crm:modules/regions/tests/unit/region-matching.spec.js#region_for_address › compares postal codes as strings, so a ZIP+4 code inside the range matches
05 Postal-country restrictions distinguish otherwise equal codesboundaryapinegativetest
Proves
BR-CAP-CRM-REG-006-05
Preconditions
Postal coverage is restricted to the United States.
Steps
Evaluate the same code with US, Canadian and omitted country values.
Expected
US and omitted country match; Canada does not.
Data
Three contrasting address inputs.
Bound to
Source
services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment-rules.integration.spec.js#a postal code rule confined to a country › matches an address in the country the rule names
06 State matching preserves case sensitivityedgeunitnegativetest
Proves
BR-CAP-CRM-REG-006-06
Preconditions
A rule lists an uppercase state code.
Steps
Evaluate the upper- and lowercase versions.
Expected
Only the uppercase value matches.
Data
Two contrasting address inputs.
Bound to
Source
services-crm:modules/regions/tests/unit/region-matching.spec.js#region_for_address › matches states exactly, so a lower-case state is not the upper-case one
07 Country matching supplies the legacy defaultedgeunittest
Proves
BR-CAP-CRM-REG-006-07
Preconditions
Coverage includes the United States in lowercase.
Steps
Evaluate uppercase, lowercase, blank and missing country values.
Expected
All four inputs match US coverage.
Data
Four address examples for the comparison.
Bound to
Source
services-crm:modules/regions/tests/unit/region-matching.spec.js#region_for_address › matches the country whatever the case of the address or the rule
08 Uncovered addresses can remain unplacedruleunittest
Proves
BR-CAP-CRM-REG-006-09
Preconditions
The policy contains no fallback.
Steps
Evaluate an address outside its geographic rules.
Expected
The matcher returns no region.
Data
Prepared geographic coverage examples.
Bound to
Source
services-crm:modules/regions/tests/unit/region-matching.spec.js#region_for_address › answers no region when nothing matches and there is no rest-of-the-world rule
09 An absent address cannot use fallbackedgeunittest
Proves
BR-CAP-CRM-REG-006-10
Preconditions
The policy includes a fallback.
Steps
Evaluate absent and entirely empty address inputs.
Expected
Neither input receives a region.
Data
Prepared geographic coverage examples.
Bound to
Source
services-crm:modules/regions/tests/unit/region-matching.spec.js#region_for_address › answers no region for no address even with a rest-of-the-world rule
10 Saved matching is shared by preview and placementinteractionapiproposed
Proves
BR-CAP-CRM-REG-006-01 BR-CAP-CRM-REG-007-01 BR-CAP-CRM-REG-008-01
Preconditions
Two active regions have overlapping coverage and automatic placement is enabled.
Steps
Save the geographic policy, preview an address, create a contact with that deciding address and deliver assignment; reverse the coverage order and repeat with a new contact.
Expected
Each preview and corresponding new placement select the same first matching target in the saved order.
Data
Two active regions have overlapping coverage and automatic placement is enabled.
Source
WF-CRM-REG-001
11 Unsupported criteria fail instead of choosing a targetfailureunitnegativetest
Proves
BR-CAP-CRM-REG-004-01
Preconditions
A direct matcher caller supplies a rule kind outside the supported set.
Steps
Evaluate a nonempty address against that rule.
Expected
Evaluation throws an unsupported-kind error and supplies no regional result.
Data
A direct matcher caller supplies a rule kind outside the supported set.
Bound to
Source
services-crm:modules/regions/tests/unit/region-matching.spec.js#refuses a rule type it does not know
12 Nongeographic recognized input establishes fallback eligibilityedgeapiproposed
Proves
BR-CAP-CRM-REG-006-11
Preconditions
A saved policy has one geographic rule and one enabled fallback.
Steps
Evaluate an address containing only a street line, then an address containing only unrelated properties and finally an empty address.
Expected
The street-only input receives fallback; unrelated-only and empty input receive no match.
Data
A saved policy has one geographic rule and one enabled fallback.
Source
services-crm:modules/regions/services/region-assignment/region-matching.ts:hasAddress, geographicAddressOf, matchRegionRule
13 A saved reversed interval supplies no matchboundarybrowsertest
Proves
BR-CAP-CRM-REG-006-12
Preconditions
A saved postal rule has its end lexically before its start and no fallback is enabled.
Steps
Save that interval and preview a code between its reversed bounds.
Expected
Saving succeeds and preview returns no regional match.
Data
A saved postal rule has its end lexically before its start and no fallback is enabled.
Bound to
Source
react-console:acceptance/crm/playwright/journeys/configuration/CRM-ACC-0358.spec.ts#CRM-ACC-0358
14 Save-time geographic cleaning feeds matchingruleapitest
Proves
BR-CAP-CRM-REG-006-08
Preconditions
Enabled state and country rules target local regions.
Steps
Save a contact address with its state written as a supported full name, deliver assignment and repeat with a supported full country name.
Expected
The cleaned address codes select the expected geographic targets.
Data
Enabled state and country rules target local regions.
Bound to
Source
services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment.integration.spec.js#normalized address variants (the save-time cleaning, docs/migrations/contact-and-organization-cleaning/) › matches a state rule from the state written out in full
15 Retired targets remain consistent across preview and traversalinteractionapiproposed
Proves
BR-CAP-CRM-REG-002-08 BR-CAP-CRM-REG-006-01 BR-CAP-CRM-REG-011-05
Preconditions
An enabled rule targets a retired definition and an eligible addressed contact has an older placement.
Steps
Preview the contact’s deciding address, run recalculation and read its final placement and the retained definition.
Expected
Preview and recalculation both select the enabled rule’s retired target while its definition remains readable.
Data
An enabled rule targets a retired definition and an eligible addressed contact has an older placement.
Source
ADR-CRM-REG-005

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.