Skip to content

ATS-CRM-REG-007Check an address against the saved policy: Acceptance Test Set

Markdown

ATS-CRM-REG-007

Check an address against the saved policy: Acceptance Test Set

Markdown
  • DocumentProposed

Planning

Proves capability
CAP-CRM-REG-007

KindAcceptance test setProduct areaCRMModuleRegionsRevision2

Read atservices-crm a8d1364freact-console baf6dae3

Test Scenarios

5 scenarios proving CAP-CRM-REG-007; 5 bound to an existing test.

01 Preview explains the winning ruleapitest
Proves
BR-CAP-CRM-REG-007-01
Preconditions
Saved postal coverage includes Boston.
Steps
Preview an address within that coverage.
Expected
The answer identifies the region and winning rule with an explanation of its kind and position.
Data
A single policy entry.
Bound to
services-crm:modules/regions/tests/e2e/regions.e2e.spec.js#the preview › answers the region the address would be given and the rule that decides it
services-crm:modules/regions/tests/e2e/regions.e2e.spec.js#the preview › says why, so the console can show it
Source
services-crm:modules/regions/tests/e2e/regions.e2e.spec.js#the preview › answers the region the address would be given and the rule that decides it
02 Preview leaves policy unchangedapitest
Proves
BR-CAP-CRM-REG-007-02 AS-JNY-CRM-REG-001-03
Preconditions
A policy is saved.
Steps
Preview an address and read back the policy.
Expected
The read returns the previous saved policy without changes.
Data
Previously persisted geographic coverage.
Bound to
services-crm:modules/regions/tests/e2e/regions.e2e.spec.js#the preview › writes nothing: the tenant still has the rules it had
Source
services-crm:modules/regions/tests/e2e/regions.e2e.spec.js#the preview › writes nothing: the tenant still has the rules it had
03 Preview is read-authorized workapinegativetest
Proves
BR-CAP-CRM-REG-007-04
Preconditions
One caller has regional read and another has no regional keys.
Steps
Preview the same address as each caller.
Expected
The reader receives a result and the unauthorized caller receives a refusal.
Data
Two identities with distinct authority.
Bound to
services-crm:modules/regions/tests/e2e/regions.e2e.spec.js#the preview › answers 403 to a context carrying no regions permission at all
services-crm:tests/unit/regions-authorization.spec.ts#requires crm.regions.read to preview the region an address would be assigned, because it writes nothing
Source
services-crm:modules/regions/tests/e2e/regions.e2e.spec.js#the preview › answers 403 to a context carrying no regions permission at all
04 An address is required for previewapinegativetest
Proves
BR-CAP-CRM-REG-007-05
Preconditions
Rules have been saved.
Steps
Submit a preview request without its address.
Expected
Validation rejects the request.
Data
No extra fixture records are required.
Bound to
services-crm:modules/regions/tests/e2e/regions.e2e.spec.js#the preview › answers 400 for a body with no address
Source
services-crm:modules/regions/tests/e2e/regions.e2e.spec.js#the preview › answers 400 for a body with no address
05 Preview explains lack of coverageapitest
Proves
BR-CAP-CRM-REG-007-06
Preconditions
The policy has no fallback.
Steps
Preview an uncovered address.
Expected
The response has neither target nor winning rule and explains the absence of a match.
Data
Previously persisted geographic coverage.
Bound to
services-crm:modules/regions/tests/e2e/regions.e2e.spec.js#the preview › answers no region and no rule for an address no rule covers
Source
services-crm:modules/regions/tests/e2e/regions.e2e.spec.js#the preview › answers no region and no rule for an address no rule covers

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.