Skip to content

ATS-CRM-REG-003Configure automatic placement and its address sources: Acceptance Test Set

Markdown

ATS-CRM-REG-003

Configure automatic placement and its address sources: Acceptance Test Set

Markdown
  • DocumentProposed

Planning

Proves capability
CAP-CRM-REG-003

KindAcceptance test setProduct areaCRMModuleRegionsRevision2

Read atservices-crm a8d1364freact-console baf6dae3

Test Scenarios

7 scenarios proving CAP-CRM-REG-003; 7 bound to an existing test.

01 Unsaved configuration returns defaultsapitest
Proves
BR-CAP-CRM-REG-003-01
Preconditions
The workspace has never saved regional settings.
Steps
Request the assignment settings.
Expected
Assignment is disabled, both kinds are selected, preferred and Main sources apply, and no policy or recalculation need exists.
Data
A workspace without prior regional configuration.
Bound to
services-crm:modules/regions/tests/integration/services/persistence/region-assignment-settings.integration.spec.js#the capability › answers assignment off, the legacy defaults and no rules for a tenant that saved none
services-crm:modules/regions/tests/e2e/regions.e2e.spec.js#answers assignment off and no rules before the tenant saves any
services-crm:modules/regions/tests/integration/services/persistence/region-assignment-settings.queries.integration.spec.js#a tenant that has saved no settings › answers assignment off, the legacy defaults and no rules, with no system properties at all
Source
services-crm:modules/regions/tests/integration/services/persistence/region-assignment-settings.integration.spec.js#the capability › answers assignment off, the legacy defaults and no rules for a tenant that saved none
02 Assignment can start with empty coverageapitest
Proves
BR-CAP-CRM-REG-003-02
Preconditions
The workspace has no rules.
Steps
Enable assignment with an empty list and create an addressed contact.
Expected
The saved switch is on but the contact receives no region.
Data
A single contact record.
Bound to
services-crm:modules/regions/tests/e2e/regions.e2e.spec.js#switches assignment on with an empty rule list, and reads back on with no rules
services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment-rules.integration.spec.js#assignment on with no rule at all › gives the contact no region, because the tenant has no enabled rule to match
Source
services-crm:modules/regions/tests/e2e/regions.e2e.spec.js#switches assignment on with an empty rule list, and reads back on with no rules
03 Record-kind selection limits placementapitest
Proves
BR-CAP-CRM-REG-003-03
Preconditions
Only organizations participate and coverage includes the test address.
Steps
Create a contact and an organization using that address.
Expected
The organization is placed and the contact is skipped.
Data
A policy entry with contact and organization examples.
Bound to
services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment.integration.spec.js#assignment switched off › gives a contact created while only organizations are assigned no region
services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment-rules.integration.spec.js#assignment for contacts only › leaves the organization unassigned, though its address is the one the contact was assigned from
services-crm:modules/regions/tests/legacy/rolodex-regions/tests/unit/logic/assign-region.unit.spec.js#Address Region › Assign Region › should do nothing if assignment is disabled for contacts
Source
services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment.integration.spec.js#assignment switched off › gives a contact created while only organizations are assigned no region
04 Typed sources require a typeapinegativetest
Proves
BR-CAP-CRM-REG-003-04
Preconditions
Workspace address types are available.
Steps
Save a typed contact source without a type, then a preferred source with a type supplied.
Expected
The missing type fails validation and the preferred source discards the supplied type.
Data
Baseline address-purpose definitions.
Bound to
services-crm:modules/regions/tests/integration/services/persistence/region-assignment-settings.integration.spec.js#the capability › refuses the type setting with no contact address type id
services-crm:modules/regions/tests/integration/services/persistence/region-assignment-settings.integration.spec.js#the capability › drops the contact address type id unless the type is `type`, as the console did with the other address type
services-crm:modules/regions/tests/integration/db/region-assignment-settings.table.integration.spec.js#settings constraints › refuses deciding by a type with no address type named
services-crm:modules/regions/tests/integration/db/region-assignment-settings.table.integration.spec.js#settings constraints › refuses an address type named while deciding by the preferred address
Source
services-crm:modules/regions/tests/integration/services/persistence/region-assignment-settings.integration.spec.js#the capability › refuses the type setting with no contact address type id
05 Existence governs service address-type choicesapinegativetest
Proves
BR-CAP-CRM-REG-003-05
Preconditions
Billing exists but is labelled for organizations.
Steps
Save an unknown contact source type, then select Billing for contacts.
Expected
The unknown type is refused against its field and the existing Billing type is accepted.
Data
Baseline address-purpose definitions.
Bound to
services-crm:modules/regions/tests/integration/services/persistence/region-assignment-settings.integration.spec.js#the capability › refuses a contact address type id the tenant has no address type for
services-crm:modules/regions/tests/integration/services/persistence/region-assignment-settings.integration.spec.js#the capability › refuses an organization address type the tenant has no address type for
services-crm:modules/regions/tests/integration/services/persistence/region-assignment-settings.integration.spec.js#the capability › takes a contact address type marked for organizations, applies_to being a guide and not a rule
services-crm:modules/regions/tests/integration/db/region-assignment-settings.table.integration.spec.js#settings constraints › refuses a contact address type the tenant does not have
Source
services-crm:modules/regions/tests/integration/services/persistence/region-assignment-settings.integration.spec.js#the capability › refuses a contact address type id the tenant has no address type for
06 Versionless settings writes bypass conflict checksapinegativetest
Proves
BR-CAP-CRM-REG-003-08
Preconditions
Settings currently have version three.
Steps
Submit version two, then omit the version.
Expected
The older version conflicts and the versionless replacement is accepted.
Data
An existing assignment configuration.
Bound to
Source
services-crm:modules/regions/tests/integration/services/persistence/region-assignment-settings.integration.spec.js#the capability › refuses a save from a stale read
07 Collected validation errors preserve the policyapinegativetest
Proves
BR-CAP-CRM-REG-003-09
Preconditions
Settings retain two valid rules.
Steps
Submit an empty state criterion and a missing required address type together.
Expected
The refusal identifies both validation problems and the existing rules survive.
Data
A policy retaining two entries.
Bound to
services-crm:modules/regions/tests/integration/services/persistence/region-assignment-settings.integration.spec.js#the capability › leaves the saved rules as they were when a save is refused
Source
services-crm:modules/regions/tests/integration/services/persistence/region-assignment-settings.integration.spec.js#the capability › leaves the saved rules as they were when a save is refused

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.