Skip to content

ATS-CRM-ENT-017Configure affiliation types and contact roles

Markdown

ATS-CRM-ENT-017

Configure affiliation types and contact roles

Markdown
  • DocumentProposed

Planning

Proves capability
CAP-CRM-ENT-017

Design

Executed by
TST-CRM-ENT-776, TST-CRM-ENT-786, TST-CRM-ENT-787

KindAcceptance test setProduct areaCRMModuleEntitiesRevision1

Read atservices-crm a8d1364freact-console baf6dae3

Coverage

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

Test Scenarios

19 scenarios proving CAP-CRM-ENT-017; 11 bound to an existing test.

01 Names required and trimmedvalidationapinegativetest
Proves
BR-CAP-CRM-ENT-017-01
Preconditions
No additional setup is required.
Steps
Create a role and a type with an empty name, a name of spaces, a padded name.
Expected
400 naming the field and no record changes; trimmed.
Data
No additional fixtures.
Bound to
Source
services-crm:modules/entities/tests/e2e/affiliation-types.e2e.spec.js#answers 400 naming the field for a create whose name is nothing but spaces
02 Ids follow the grammar and never repeatboundaryapinegativetest
Proves
BR-CAP-CRM-ENT-017-02
Preconditions
No additional setup is required.
Steps
Create without an id; with a space; with 63 and 64 characters; with the reserved prefix; with a used id; change the id.
Expected
Derived; 400; accepted then 400; 400; 400; 400.
Data
No additional fixtures.
Bound to
Source
services-crm:modules/entities/tests/e2e/affiliation-types.e2e.spec.js#answers 400 for an id that is not a configuration id, saying what an id may hold
03 Roles in use cannot be deletedinteractionbrowsernegativetest
Proves
BR-CAP-CRM-ENT-017-03 INV-DOM-CRM-ENT-003-14
Preconditions
Prepare a role retained on an ended affiliation; a role named by a compliance rule; an unused role.
Steps
Delete each.
Expected
409 with the holders' count; 409 naming the types; deleted.
Data
No additional fixtures.
Bound to
Source
services-crm:modules/entities/tests/integration/services/persistence/contact-roles.integration.spec.js#refuses it with the legacy words, naming the organization types whose rules depend on it
04 Deletes are administrators'permissionbrowsernegativetest
Proves
BR-CAP-CRM-ENT-017-04
Preconditions
Prepare a standard user and read-only staff.
Steps
Create, edit, reorder and delete a role and a type.
Expected
The standard user creates, edits and reorders but cannot delete either; read-only staff only read.
Data
Use personas by tier.
Bound to
Source
react-console:acceptance/crm/playwright/journeys/affiliations/CRM-ACC-0196.spec.ts#CRM-ACC-0196
05 Types in use or default cannot be deletedinteractionapinegativetest
Proves
BR-CAP-CRM-ENT-017-05 INV-DOM-CRM-ENT-003-13
Preconditions
Prepare a type a contact's affiliation uses; the default type.
Steps
Delete each; delete after the contact has gone.
Expected
409; 409; deleted.
Data
No additional fixtures.
Bound to
Source
services-crm:modules/entities/tests/e2e/affiliation-types.e2e.spec.js#refuses the delete (409) while an affiliation of a contact is of that type
06 the workspace default typepermissionapinegativetest
Proves
BR-CAP-CRM-ENT-017-06
Preconditions
Prepare a workspace that chose none.
Steps
Read the default; set a workspace type; set one it lacks; change it with only the read key.
Expected
Other; saved and read back; 400 naming the field; 403.
Data
No additional fixtures.
Bound to
Source
services-crm:modules/entities/tests/e2e/affiliation-types.e2e.spec.js#refuses a caller who may only read affiliation types the change of the default (403)
07 Default links are validated and preserved by an omitting replacementboundarybrowsernegativetest
Proves
BR-CAP-CRM-ENT-017-07
Preconditions
No additional setup is required.
Steps
Save mappings of a bad type, an unknown type, one destination twice, 21 mappings; replace without the list; replace with null.
Expected
400 naming the field each; preserved; cleared.
Data
No additional fixtures.
Bound to
Source
services-crm:modules/entities/tests/integration/services/persistence/affiliation-types.integration.spec.js#keeps the mappings, as an omitted collection means unchanged
08 Role reorder is all or nothing and ignores locksfailureapinegativetest
Proves
BR-CAP-CRM-ENT-017-08
Preconditions
Prepare a workspace’s roles, one locked.
Steps
Reorder all; leave one out; name one the workspace lacks; as a read-only caller.
Expected
Numbered 1..n, the locked one moved; 400; 400; 403; the order unmodified after each refusal.
Data
No additional fixtures.
Bound to
Source
services-crm:modules/entities/tests/e2e/contact-roles.e2e.spec.js#answers 400 for a reorder that leaves a role of the tenant out, naming it
09 the journey: configure a type of affiliation and use itinteractionbrowsertest
Proves
AS-JNY-CRM-ENT-004-01 AS-JNY-CRM-ENT-004-02 AS-JNY-CRM-ENT-004-03
Preconditions
Prepare an administrator and a staff member.
Steps
Run JNY-CRM-ENT-004.
Expected
The Organization field uses the default type; delete rejected while used or default; deactivation leaves affiliations unmodified.
Data
No additional fixtures.
Bound to
Source
react-console:acceptance/crm/playwright/journeys/affiliations/CRM-ACC-0199.spec.ts#CRM-ACC-0199
10 Inactive affiliation columns remain availablerulebrowsertest
Proves
BR-CAP-CRM-ENT-017-11
Preconditions
Prepare an active affiliation type with a query column.
Steps
Deactivate the type and read the dataset description again.
Expected
The column is still available and its label includes "(inactive)".
Data
Use a type with an existing affiliation.
Bound to
Source
react-console:acceptance/crm/playwright/journeys/affiliations/CRM-ACC-0199.spec.ts#CRM-ACC-0199
11 A portal reader pages the role catalogueedgeapitest
Proves
BR-CAP-CRM-ENT-017-10
Preconditions
A workspace portal caller has the documented catalogue read access and multiple roles are present.
Steps
Read the first role page and follow its continuation cursor.
Expected
The caller receives the workspace’s role names in the declared order without repeats.
Data
Run-owned records and configuration in an isolated workspace.
Bound to
Source
services-crm:modules/entities/tests/e2e/contact-roles.e2e.spec.js#answers a portal user of the tenant
12 A default mapping supplies a newly effective tieinteractionapiproposed
Proves
BR-CAP-CRM-ENT-006-11 BR-CAP-CRM-ENT-017-07
Preconditions
An affiliation type maps an organization address purpose to an empty person address purpose.
Steps
Add a current affiliation of that type with the mapping selected and read the saved person.
Expected
The new link uses the configured source and destination while preexisting personal values remain.
Data
Run-owned records and configuration in an isolated workspace.
Source
services-crm:modules/entities/tests/integration/services/persistence/contact-information-sources.integration.spec.js#links nothing when the choice is an empty list; services-crm:modules/entities/tests/integration/services/persistence/affiliation-types.integration.spec.js#keeps the mappings, as an omitted collection means unchanged
13 The configured default supplies the Organization commandinteractionapiproposed
Proves
BR-CAP-CRM-ENT-009-11 BR-CAP-CRM-ENT-017-06
Preconditions
An administrator selects a nondefault affiliation type for the workspace.
Steps
Set a person’s primary organization using the Organization command and inspect the created tie.
Expected
The saved relationship uses the selected workspace default type.
Data
Run-owned records and configuration in an isolated workspace.
Source
services-crm:modules/entities/tests/unit/services/persistence/contact-affiliations.spec.js#ends the previous primary the day before the effective date by default, and its open roles with it; services-crm:modules/entities/tests/e2e/affiliation-types.e2e.spec.js#refuses a caller who may only read affiliation types the change of the default (403)
14 Automatic assignment creates a catalogue dependencyinteractionapiproposed
Proves
BR-CAP-CRM-ENT-011-06 BR-CAP-CRM-ENT-017-03
Preconditions
An active catalogue role is automatic and has no holder yet.
Steps
Join an eligible person as primary; try deleting the assigned role.
Expected
The new affiliation holds the role and deletion is refused while that role period remains.
Data
Run-owned records and configuration in an isolated workspace.
Source
services-crm:modules/entities/tests/integration/services/contacts/role-assignment/contact-role-assignment.integration.spec.js#gives the organization's first contact the automatic and first-contact roles, besides the roles it states; services-crm:modules/entities/tests/integration/services/persistence/contact-roles.integration.spec.js#refuses it with the legacy words, naming the organization types whose rules depend on it
15 A policy reference protects its role catalogue entryinteractionapiproposed
Proves
BR-CAP-CRM-ENT-012-13 BR-CAP-CRM-ENT-017-03
Preconditions
A role is referenced by an organization classification’s compliance rule.
Steps
Try deleting that role before and after removing the rule reference.
Expected
The referenced role cannot be deleted; after the reference is removed and no holders remain, deletion succeeds.
Data
Run-owned records and configuration in an isolated workspace.
Source
services-crm:modules/entities/services/persistence/organization-types.ts:organizationTypeProblems; services-crm:modules/entities/tests/integration/services/persistence/contact-roles.integration.spec.js#refuses it with the legacy words, naming the organization types whose rules depend on it
16 Legacy role writes differ from dedicated lock actionsinteractionapiproposed
Proves
BR-CAP-CRM-ENT-015-04 BR-CAP-CRM-ENT-017-04
Preconditions
A role is available for ordinary editing and dedicated lock administration.
Steps
Set a delete lock through the ordinary role write; compare its audit with a later dedicated lock action.
Expected
The ordinary role write retains the documented delete-lock exception; the dedicated action records its own reason and audit.
Data
Run-owned records and configuration in an isolated workspace.
Source
services-crm:modules/entities/tests/e2e/contacts.e2e.spec.js#answers 403 naming sys_locked for a replacement that sets a lock (E-14); react-console:acceptance/crm/playwright/journeys/affiliations/CRM-ACC-0196.spec.ts#CRM-ACC-0196
17 Default mappings retain their contact-point purposesinteractionapiproposed
Proves
BR-CAP-CRM-ENT-017-07 BR-CAP-CRM-ENT-018-03
Preconditions
An affiliation type references address and phone purposes in its default mappings.
Steps
Attempt deletion of a referenced purpose; remove the mapping and retry when no record holds the purpose.
Expected
The reference blocks the first delete; the unused purpose is deletable after the mapping is removed.
Data
Run-owned records and configuration in an isolated workspace.
Source
services-crm:modules/entities/tests/integration/services/persistence/affiliation-types.integration.spec.js#keeps the mappings, as an omitted collection means unchanged; services-crm:modules/entities/tests/e2e/address-types.e2e.spec.js#says which records keep the type when it refuses the delete
18 Settings do not expose the affiliation default through layout-only accessinteractionapiproposed
Proves
BR-CAP-CRM-ENT-017-06 BR-CAP-CRM-ENT-019-01
Preconditions
A caller may read contact layouts but cannot read affiliation types.
Steps
Read settings with that access, then with affiliation-type read added.
Expected
The layout-only response omits the default affiliation type; the additional catalogue authority exposes it.
Data
Run-owned records and configuration in an isolated workspace.
Source
services-crm:modules/entities/tests/e2e/affiliation-types.e2e.spec.js#refuses a caller who may only read affiliation types the change of the default (403); services-crm:modules/entities/tests/e2e/page-layouts.e2e.spec.js#is not answered the section it may not read: it is ABSENT, not null, so "forbidden" and "unset" never look alike
19 Exercise every declared authority independentlypermissionapinegativeproposed
Proves
BR-CAP-CRM-ENT-017-04 BR-CAP-CRM-ENT-017-06 BR-CAP-CRM-ENT-017-10
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/affiliation-types.routes.ts; services-crm:modules/entities/aws/api/contact-roles.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.