Skip to content

ATS-CRM-REG-011Apply the current policy across existing records: Acceptance Test Set

Markdown

ATS-CRM-REG-011

Apply the current policy across existing records: Acceptance Test Set

Markdown
  • DocumentProposed

Planning

Proves capability
CAP-CRM-REG-011

KindAcceptance test setProduct areaCRMModuleRegionsRevision2

Read atservices-crm a8d1364freact-console baf6dae3

Test Scenarios

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

01 Start authority uses the admin-tier keyunitnegativetest
Proves
BR-CAP-CRM-REG-011-01
Preconditions
The regional permission catalogue is published.
Steps
Inspect the start requirement and its published tier.
Expected
Starting uses the administrator-tier recalculation permission.
Data
Published operation-access metadata.
Bound to
services-crm:tests/unit/regions-authorization.spec.ts#requires crm.regions.recalculate to start a recalculation
services-crm:tests/unit/regions-authorization.spec.ts#publishes crm.regions.recalculate in the catalog, at tier admin
Source
services-crm:tests/unit/regions-authorization.spec.ts#requires crm.regions.recalculate to start a recalculation
02 Repeated starts return one active runapitest
Proves
BR-CAP-CRM-REG-011-02
Preconditions
The workspace has a running recalculation.
Steps
Request another start twice.
Expected
The requests return the existing run and create no additional run record.
Data
Record volume requiring continuation.
Bound to
services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment.integration.spec.js#a recalculation resumed in batches › answers the running run to a second request instead of starting another
services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment.integration.spec.js#a start request while a run nothing has advanced is in progress › answers the run in progress rather than starting another
Source
services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment.integration.spec.js#a recalculation resumed in batches › answers the running run to a second request instead of starting another
03 Request processing and continuation share the runapitest
Proves
BR-CAP-CRM-REG-011-03
Preconditions
One workspace is small and another needs multiple batches.
Steps
Start work in each with the relevant processing budget.
Expected
The small run can complete in the request; unfinished work remains running and requests continuation.
Data
Two distinct customer workspaces.
Bound to
services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment.integration.spec.js#rule changes and the recalculation › finishes a small tenant within the request
services-crm:modules/regions/tests/e2e/regions.e2e.spec.js#answers the recalculation, completed within the request
services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment.integration.spec.js#a recalculation resumed in batches › answers a run still running after one batch
services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment.integration.spec.js#a recalculation resumed in batches › asks for the next worker by incrementing `continuation`
Source
services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment.integration.spec.js#rule changes and the recalculation › finishes a small tenant within the request
04 Continuation resumes committed progressapitest
Proves
BR-CAP-CRM-REG-011-04
Preconditions
A run has committed its first batch.
Steps
Continue processing until completion.
Expected
The committed traversal advances without repeating already traversed records.
Data
A population beyond the batch boundary.
Bound to
services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment.integration.spec.js#a recalculation resumed in batches › continues from its cursor, never repeating a record
services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment.integration.spec.js#a recalculation resumed in batches › ends completed, with every record examined once
Source
services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment.integration.spec.js#a recalculation resumed in batches › continues from its cursor, never repeating a record
05 Recalculation applies changed coverageapitest
Proves
BR-CAP-CRM-REG-011-05 AS-JNY-CRM-REG-002-01
Preconditions
Saved rules now point to different targets.
Steps
Run recalculation.
Expected
Eligible contacts and organizations receive the new targets.
Data
CRM records with prior regional placements.
Bound to
services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment.integration.spec.js#rule changes and the recalculation › moves a contact to its region under the new rules
services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment.integration.spec.js#rule changes and the recalculation › moves an organization to its region under the new rules
services-crm:modules/regions/tests/e2e/regions.e2e.spec.js#moves the contact to its region under the new rules
services-crm:tests/e2e/dev/regions.dev.spec.ts#moves the contact to its region under the new rules
services-crm:modules/regions/tests/legacy/rolodex-regions/tests/e2e/recalculate-regions.e2e.spec.js#Recalculate Regions (e2e) › organization should have updated the region
Source
services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment.integration.spec.js#rule changes and the recalculation › moves a contact to its region under the new rules
06 Held and never-addressed records remainapitest
Proves
BR-CAP-CRM-REG-011-06 AS-JNY-CRM-REG-002-02
Preconditions
One contact is overridden and another has a manual region with no past deciding address.
Steps
Recalculate the policy.
Expected
Both preserve their existing regions.
Data
A pair of contact records.
Bound to
services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment.integration.spec.js#rule changes and the recalculation › leaves a contact that overrides automatic assignment
services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment.integration.spec.js#rule changes and the recalculation › leaves a contact with no address (nothing decides its region)
Source
services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment.integration.spec.js#rule changes and the recalculation › leaves a contact that overrides automatic assignment
07 Identical-policy repetition changes no placementapitest
Proves
BR-CAP-CRM-REG-011-07 AS-JNY-CRM-REG-002-03
Preconditions
The preceding recalculation completed successfully.
Steps
Start a further run without changing inputs.
Expected
A new run is recorded without changing record placements.
Data
CRM records with prior regional placements.
Bound to
services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment.integration.spec.js#rule changes and the recalculation › starts a new run when asked again after the first finished
services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment.integration.spec.js#rule changes and the recalculation › changes nothing on a second run under the same rules
Source
services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment.integration.spec.js#rule changes and the recalculation › starts a new run when asked again after the first finished
08 Concurrent address editing convergesapitest
Proves
BR-CAP-CRM-REG-011-08
Preconditions
Recalculation is processing a contact.
Steps
Commit a new contact address during its batch.
Expected
Eventual placement corresponds to the newest address.
Data
A contact selected during the concurrent batch.
Bound to
services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment.integration.spec.js#a save racing a recalculation › ends with the region of the newest address
Source
services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment.integration.spec.js#a save racing a recalculation › ends with the region of the newest address
09 Counters distinguish traversal from placement changesapitest
Proves
BR-CAP-CRM-REG-011-10
Preconditions
Five records are traversed and two placements change.
Steps
Finish recalculation and inspect the result.
Expected
Examined includes all traversed records and changed counts the two placement changes.
Data
Five traversed CRM records.
Bound to
services-crm:modules/regions/tests/integration/services/persistence/region-recalculations.queries.integration.spec.js#the record a batch of the run answers › answers the whole record of the run the following batches finished, counting every record it walked
Source
services-crm:modules/regions/tests/integration/services/persistence/region-recalculations.queries.integration.spec.js#the record a batch of the run answers › answers the whole record of the run the following batches finished, counting every record it walked

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.