Skip to content

ATS-CRM-ENT-005Maintain reliable contact points

Markdown

ATS-CRM-ENT-005

Maintain reliable contact points

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaCRMModuleEntitiesRevision1

Read atservices-crm a8d1364freact-console baf6dae3

Coverage

  • Rule covered
  • Transition covered
  • Validation covered
  • Permission covered
  • Edge covered
  • Failure covered
  • Boundary covered
  • Concurrency gap: FND-CRM-ENT-053
  • Invariant covered
  • Interaction covered

Test Scenarios

18 scenarios proving CAP-CRM-ENT-005; 9 bound to an existing test.

01 Three canonical e-mail slotsboundarybrowsernegativetest
Proves
BR-CAP-CRM-ENT-005-01 INV-DOM-CRM-ENT-001-06
Preconditions
No additional setup is required.
Steps
Save four addresses; save "Ada@Example.com "; save an invalid one; save a blank one.
Expected
Fourth rejected; stored canonical; invalid rejected; blank dropped.
Data
No additional fixtures.
Bound to
Source
services-crm:modules/entities/tests/integration/services/persistence/contacts.integration.spec.js#refuses a fourth e-mail address
02 One primary e-mail per active contact; released by inactive and deceasedinvariantbrowsernegativetest
Proves
BR-CAP-CRM-ENT-005-02 INV-DOM-CRM-ENT-001-05
Preconditions
Prepare contacts holding primary and secondary addresses in several statuses.
Steps
Write a second primary; a secondary copy; take a deceased contact's address; reactivate the deceased.
Expected
Rejected; accepted; accepted; rejected naming the address.
Data
No additional fixtures.
Bound to
Source
services-crm:modules/entities/tests/integration/db/contact-email-addresses.table.integration.spec.js#refuses to make an inactive contact active while another contact holds its primary address
03 One phone per type, one preferred, default by the workspace’s ordervalidationapinegativetest
Proves
BR-CAP-CRM-ENT-005-03 INV-DOM-CRM-ENT-001-07
Preconditions
No additional setup is required.
Steps
Save two numbers of a type; two preferred; none preferred.
Expected
Rejected; rejected; first in order preferred.
Data
No additional fixtures.
Bound to
Source
services-crm:modules/entities/tests/integration/services/persistence/contacts.integration.spec.js#refuses two numbers of the same type
04 US numbers formatted, others preserved, blanks droppedruleapitest
Proves
BR-CAP-CRM-ENT-005-04
Preconditions
No additional setup is required.
Steps
Save "202-555-0143", a UK number and a blank number.
Expected
Formatted; as typed; dropped.
Data
No additional fixtures.
Bound to
Source
services-crm:modules/entities/tests/integration/services/persistence/contacts.integration.spec.js#formats a valid US number, drops a blank one and marks the default preferred number
05 Addresses: one per type, one preferred, never seasonal, promotedtransitionapinegativetest
Proves
BR-CAP-CRM-ENT-005-05
Preconditions
No additional setup is required.
Steps
Save addresses with none marked; a preferred seasonal one; remove an organization's preferred address.
Expected
First non-seasonal preferred; rejected; next promoted.
Data
No additional fixtures.
Bound to
Source
services-crm:modules/entities/tests/integration/services/persistence/contacts.integration.spec.js#marks the first address of the tenant’s display order as preferred, never one with a seasonal period
06 Countries cleaned or rejected; coordinates boundedboundaryapinegativetest
Proves
BR-CAP-CRM-ENT-005-06
Preconditions
No additional setup is required.
Steps
Save country "america", country "Earth", latitude 91.
Expected
"US"; 400 naming country; 400 naming latitude.
Data
No additional fixtures.
Bound to
Source
services-crm:modules/entities/tests/integration/services/persistence/contacts.field-rules.integration.spec.js#refuses an unknown country, naming the address’s country
07 Organizations-only types rejected on a contactedgeapinegativetest
Proves
BR-CAP-CRM-ENT-005-07 INV-DOM-CRM-ENT-001-13
Preconditions
Prepare an address type and a phone type marked for organizations.
Steps
Add an address and a phone of those types to a contact; save a contact whose stored address type became organizations-only.
Expected
400 naming the type field each; the second saved.
Data
No additional fixtures.
Bound to
Source
services-crm:modules/entities/tests/integration/services/persistence/contacts.field-rules.integration.spec.js#refuses a new address of an address type marked for organizations only, naming its type field
08 Seasons are recurring month and day, inclusive, never overlappingboundarybrowsernegativetest
Proves
BR-CAP-CRM-ENT-005-08 INV-DOM-CRM-ENT-001-08
Preconditions
No additional setup is required.
Steps
Save 12-01..03-31; a calendar date; Feb 29; two seasons sharing a day.
Expected
Accepted crossing the year; rejected; accepted; rejected naming both.
Data
No additional fixtures.
Bound to
Source
services-crm:modules/entities/tests/unit/services/contacts/seasonal-addresses.spec.js#refuses overlapping seasons naming both addresses
09 the mailing address follows the season only when markedruleapitest
Proves
BR-CAP-CRM-ENT-005-09
Preconditions
Prepare a contact with a preferred and a seasonal address.
Steps
Read the mailing address in and out of season, marked and unmarked.
Expected
The seasonal one only in season and marked; else the preferred.
Data
Use workspace date in and out of season.
Bound to
Source
services-crm:modules/entities/tests/e2e/contacts.e2e.spec.js#answers the seasonal address in season when the contact marks it, with the workspace date
10 Reject a conflicting primary email without saving other changesfailureapinegativeproposed
Proves
BR-CAP-CRM-ENT-005-02 BR-CAP-CRM-ENT-004-07
Preconditions
Two active people reserve different primary addresses.
Steps
Change the second person’s primary address to the first person’s address while also changing its notes.
Expected
The refusal leaves the second person’s address and notes as previously saved.
Data
Run-owned records and configuration in an isolated workspace.
Source
services-crm:modules/entities/tests/integration/db/contact-email-addresses.table.integration.spec.js#refuses to make an inactive contact active while another contact holds its primary address
11 Keep a corrected contact point under its existing identityinvariantapiproposed
Proves
BR-CAP-CRM-ENT-005-10 BR-CAP-CRM-ENT-004-05
Preconditions
A person has one typed address and one typed phone.
Steps
Correct each value using its current element identity; read both collections.
Expected
The corrected values are returned under the original element identities.
Data
Run-owned records and configuration in an isolated workspace.
Source
services-crm:modules/entities/tests/integration/services/persistence/contacts.integration.spec.js#moves the second address into the type the first left, and the preferred flag with it
12 Create a person with usable contact pointsinteractionapiproposed
Proves
BR-CAP-CRM-ENT-001-01 BR-CAP-CRM-ENT-005-01
Preconditions
A valid name and three distinct email values are prepared.
Steps
Create the person with all three addresses and read the ordered collection.
Expected
The contact is created once and the saved contact points retain their declared order.
Data
Run-owned records and configuration in an isolated workspace.
Source
services-crm:modules/entities/tests/e2e/contacts-names.e2e.spec.js#answers 400 for a contact with neither a first nor a last name, naming the rule; services-crm:modules/entities/tests/integration/services/persistence/contacts.integration.spec.js#refuses a fourth e-mail address
13 Save organizational contact points with the bodyinteractionapiproposed
Proves
BR-CAP-CRM-ENT-002-01 BR-CAP-CRM-ENT-005-03
Preconditions
A named organization has two usable phone purposes.
Steps
Create it with one phone in each purpose and read its contact points.
Expected
The organization and its typed phones are readable as one saved aggregate.
Data
Run-owned records and configuration in an isolated workspace.
Source
services-crm:modules/entities/tests/integration/services/persistence/organizations.field-rules.integration.spec.js#refuses a name of 201 characters, naming name; services-crm:modules/entities/tests/integration/services/persistence/contacts.integration.spec.js#refuses two numbers of the same type
14 Correct a contact point without replacing its identityinteractionapiproposed
Proves
BR-CAP-CRM-ENT-004-05 BR-CAP-CRM-ENT-005-10
Preconditions
A person’s address has a known element identity and version.
Steps
Patch its city and read the collection and record version.
Expected
The city changes under the original element identity and the aggregate advances once.
Data
Run-owned records and configuration in an isolated workspace.
Source
services-crm:modules/entities/tests/integration/services/persistence/contacts.integration.spec.js#moves the second address into the type the first left, and the preferred flag with it; services-crm:docs/milestones/CRM-M1-contacts-and-organizations.plan.md#A9
15 Source removal leaves a person’s detail for reviewinteractionapiproposed
Proves
BR-CAP-CRM-ENT-005-10 BR-CAP-CRM-ENT-006-06
Preconditions
A person’s work address is linked to an organization address.
Steps
Remove the source address and read the person’s address and version.
Expected
The person retains the last value as disconnected information needing verification and its version advances.
Data
Run-owned records and configuration in an isolated workspace.
Source
services-crm:docs/milestones/CRM-M1-contacts-and-organizations.plan.md#A9; services-crm:modules/entities/tests/integration/services/persistence/contact-information-sources.integration.spec.js#turns the linked work address into a disconnected row holding its last value, not a copy (D-25)
16 Retain a held purpose after its applicability changesinteractionapiproposed
Proves
BR-CAP-CRM-ENT-005-07 BR-CAP-CRM-ENT-018-05
Preconditions
A person holds an address purpose that currently applies to people.
Steps
Change the purpose to organizations only; save the person with its existing address; try assigning that purpose to another person.
Expected
The held address remains saveable; the new person assignment is refused.
Data
Run-owned records and configuration in an isolated workspace.
Source
services-crm:modules/entities/tests/integration/services/persistence/contacts.field-rules.integration.spec.js#leaves a contact saveable after the type of an address it holds became organizations-only; services-crm:modules/entities/tests/e2e/phone-number-types.e2e.spec.js#answers only the types usable on organizations when the query asks for them
17 Remove an owned contact point explicitlytransitionapiproposed
Proves
BR-CAP-CRM-ENT-004-05 BR-CAP-CRM-ENT-005-05
Preconditions
A person has an unlocked preferred address and another nonseasonal address.
Steps
Submit the address collection without the preferred entry and read it again.
Expected
The omitted address is removed and the surviving eligible address supplies the preferred choice.
Data
Run-owned records and configuration in an isolated workspace.
Source
services-crm:modules/entities/tests/integration/services/persistence/contacts.integration.spec.js#empties the collection
18 Exercise every declared authority independentlypermissionapinegativeproposed
Proves
BR-CAP-CRM-ENT-003-07 BR-CAP-CRM-ENT-003-09
Preconditions
An eligible record and configuration fixture exist for each operation; the caller can reach only the run’s workspace.
Steps
For each declared permission, execute its matching operation with that permission, then without it while retaining the other required grants. Read affected records after every refused mutation.
Expected
The authorized case reaches the operation; the missing-grant case is refused and preserves saved data. Record access alone does not authorize the other declared actions.
Data
Run-owned records and configuration in an isolated workspace.
Source
services-crm:aws/crm.service.ts:ApplicationPermissions; services-crm:modules/entities/aws/api/entities.routes.ts

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.