Test Scenarios
25 scenarios proving CAP-CRM-ENT-012; 15 bound to an existing test.
11 Preview: keys, linked contact, sample data, problems as returnspermissionapinegativetest
- Proves
BR-CAP-CRM-ENT-012-11 - Preconditions
- Prepare an organization and contacts tied and not tied to it.
- Steps
- Preview as an administrator with and without the read keys; for a contact not tied; with a broken template; for a compliant organization.
- Expected
- 403 without either read key; 400; 200 with problems; sample violations named.
- Data
- No additional fixtures.
- Bound to
- Source
- services-crm:modules/entities/tests/e2e/email-previews.e2e.spec.js#answers 403 to a caller who may administer types but may not read the records the answer contains
13 Type rules are cleaned and validatedvalidationapinegativetest
- Proves
BR-CAP-CRM-ENT-012-13 INV-DOM-CRM-ENT-002-11 - Preconditions
- No additional setup is required.
- Steps
- Save a type with a rule with neither bound, a rule of an unknown role, a notify switch without its list.
- Expected
- The rule dropped; 409 and nothing saved; 400 naming the field.
- Data
- No additional fixtures.
- Bound to
- Source
- services-crm:modules/entities/tests/e2e/organization-types.e2e.spec.js#answers 409 for a rule of a role the tenant does not have, and saves nothing
14 Compliance template partial changeruleapitest
- Proves
BR-CAP-CRM-ENT-012-15 - Preconditions
- Prepare an organization type and a controllable Platform template service.
- Steps
- Change only one template property, omit the template on another save, then clear it.
- Expected
- Unmentioned template properties remain, omission leaves the template unmodified, and clearing removes the active template.
- Data
- Use a type with a published compliance template.
- Bound to
- Source
- services-crm:modules/entities/services/templates/compliance-notification-template.ts:effectiveTemplateChange
15 Compliance template failure compensationfailureapinegativeproposed
- Proves
BR-CAP-CRM-ENT-012-16 - Preconditions
- Prepare an organization type and a controllable Platform template service.
- Steps
- Submit invalid template content, then simulate an unavailable template service during a valid create and update.
- Expected
- Invalid content causes no type change; a failed create leaves no type, and a failed update restores content but advances the type version.
- Data
- Use a type with a published compliance template.
- Source
- services-crm:modules/entities/services/persistence/organization-types.ts:updateOrganizationType
17 Distinguish empty notice-role selection from all affiliatesedgeapinegativeproposed
- Proves
BR-CAP-CRM-ENT-012-08 - Preconditions
- A notifying type has an explicitly empty notification-role selection and the organization has an eligible affiliate with a primary email.
- Steps
- Enter noncompliance and inspect composed recipients and communication submissions.
- Expected
- The pinned implementation composes no recipients and submits no notice; the planning rule’s all-affiliate fallback remains contradicted.
- Data
- Run-owned records and configuration in an isolated workspace.
- Source
- services-crm:modules/entities/services/organizations/compliance/contact-role-compliance.ts:contactsToNotify; FND-CRM-ENT-043
25 Exercise every declared authority independentlypermissionapinegativeproposed
- Proves
BR-CAP-CRM-ENT-012-11 - 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