Skip to content

ATS-CRM-ACT-001Log one interaction for all related people and organizations: Capability Test Specification

Markdown

ATS-CRM-ACT-001

Log one interaction for all related people and organizations: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaCRMModuleActivities, Follow-ups and Task WorkRevision3

Read atservices-crm a8d1364freact-console baf6dae3rhythm-v2-docs 18a49edf

Coverage

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

Test Scenarios

16 scenarios proving CAP-CRM-ACT-001; 13 bound to an existing test.

01 Reject invalid activity link setsvalidationapinegativetest
Proves
BR-CAP-CRM-ACT-001-01
Preconditions
Workspace contact and organization fixtures are available.
Steps
Submit empty, ambiguous, repeated and 201-entry link sets.
Expected
Each request identifies invalid links and leaves no activity.
Data
Each run creates and isolates the records it needs.
Bound to
Source
services-crm:modules/activities/tests/integration/services/persistence/activities.integration.spec.js#refuses an activity linked to nothing
02 Default a primary link and reject competing primariesruleapinegativetest
Proves
BR-CAP-CRM-ACT-001-02
Preconditions
Two workspace contacts can be linked.
Steps
Save with neither primary, then with both marked primary.
Expected
The first link becomes primary in the valid save; the conflicting save fails.
Data
Each run creates and isolates the records it needs.
Bound to
Source
services-crm:modules/activities/tests/integration/services/persistence/activities.integration.spec.js#makes the first link the primary one when none says it is
03 Inspect primary selection and persist an API correctioninteractionbrowsertest
Proves
BR-CAP-CRM-ACT-001-02
Preconditions
A contact has an organization available for linking.
Steps
Inspect the form primary controls, then select the organization through the API and inspect stored links.
Expected
The API correction makes the organization primary; the historical browser assertion separately checks whether the form exposes that choice.
Data
Each run creates and isolates the records it needs.
Bound to
react-console:lib/activities/links.test.ts#makes a chosen contact or organization the one primary link
Source
react-console:lib/activities/links.test.ts#makes a chosen contact or organization the one primary link
04 Reject unavailable types for new interactionsvalidationapinegativetest
Proves
BR-CAP-CRM-ACT-001-03
Preconditions
An activity type is inactive.
Steps
Create an activity with that type.
Expected
The service identifies the unavailable type and refuses creation.
Data
Each run creates and isolates the records it needs.
Bound to
Source
services-crm:modules/activities/tests/integration/services/persistence/activities.integration.spec.js#refuses an inactive type for a new activity
05 Apply field modes without forbidding hidden attendee linksvalidationunitnegativetest
Proves
BR-CAP-CRM-ACT-001-04 BR-CAP-CRM-ACT-001-16
Preconditions
Types cover hidden and required modes.
Steps
Evaluate hidden values, absent required values, a scheduled call and contacts with attendees hidden.
Expected
Invalid details fail; the scheduled call needs no completed-result fields and hidden attendee links remain valid.
Data
Each run creates and isolates the records it needs.
Bound to
services-crm:modules/activities/tests/unit/services/activities/field-modes.spec.js#refuses a required outcome that a completed activity lacks
services-crm:modules/activities/tests/unit/services/activities/field-modes.spec.js#asks a scheduled activity for no required outcome or duration, those being what came of it
services-crm:modules/activities/tests/e2e/activities.e2e.spec.js#refuses a hidden field the type does not take: 400 naming it
services-crm:modules/activities/tests/unit/services/activities/field-modes.spec.js#refuses nothing about the links when attendees are hidden
Source
services-crm:modules/activities/tests/unit/services/activities/field-modes.spec.js#refuses a hidden direction that is present
06 Require an additional contact attendeevalidationapinegativetest
Proves
BR-CAP-CRM-ACT-001-05
Preconditions
The chosen type requires attendees.
Steps
Log an activity with only a primary contact.
Expected
The request identifies the missing attendee links.
Data
Each run creates and isolates the records it needs.
Bound to
services-crm:modules/activities/tests/integration/services/persistence/activities.integration.spec.js#asks for an attendee besides the primary record when the type requires attendees
Source
services-crm:modules/activities/tests/integration/services/persistence/activities.integration.spec.js#asks for an attendee besides the primary record when the type requires attendees
07 Validate outcomes against type and active selectionvalidationapinegativetest
Proves
BR-CAP-CRM-ACT-001-06
Preconditions
Two types and a deactivated outcome exist.
Steps
Try a foreign outcome and an inactive outcome, then retain a prior inactive selection.
Expected
New invalid selections fail while an existing inactive outcome can remain.
Data
Each run creates and isolates the records it needs.
Bound to
services-crm:modules/activities/tests/integration/db/activities.table.integration.spec.js#refuses an outcome of another type, by the three-column key
Source
services-crm:modules/activities/tests/integration/services/persistence/activities.integration.spec.js#refuses an outcome of another type
08 Report time and numeric boundary failuresboundaryapinegativetest
Proves
BR-CAP-CRM-ACT-001-07
Preconditions
A valid active type is available.
Steps
Send an earlier end, durations outside zero to 1,440 and a 501-character subject.
Expected
Each refusal names the relevant field.
Data
Each run creates and isolates the records it needs.
Bound to
Source
services-crm:modules/activities/tests/integration/services/persistence/activities.integration.spec.js#refuses an end before the start
09 Clean note content and reject excessive retained textboundaryunitnegativetest
Proves
BR-CAP-CRM-ACT-001-08
Preconditions
The sanitizer and a valid activity fixture are available.
Steps
Supply unsafe markup, empty markup and more than 100,000 retained characters.
Expected
Unsafe content disappears, empty content becomes empty, and excessive content fails by field.
Data
Each run creates and isolates the records it needs.
Bound to
services-crm:modules/activities/tests/unit/services/activities/activity-body.spec.js#answers null for a body of nothing but markup and whitespace
services-crm:modules/activities/tests/integration/services/persistence/activities.integration.spec.js#refuses a body over 100000 characters once sanitised, naming body, and writes nothing
services-crm:modules/activities/tests/e2e/activities.e2e.spec.js#refuses a body over 100000 characters once sanitised: 400 naming body
Source
services-crm:modules/activities/tests/unit/services/activities/activity-body.spec.js#drops a script and its content
10 Apply defaults for person and machine callersruleapitest
Proves
BR-CAP-CRM-ACT-001-09
Preconditions
A type declares a default duration.
Steps
Create with only required details as a user and as a job.
Expected
Type and clock defaults apply; the job-created activity has no default user owner.
Data
Each run creates and isolates the records it needs.
Bound to
services-crm:modules/activities/tests/integration/services/persistence/activities.integration.spec.js#defaults the status, the time and the owner from the type, the clock and the caller
Source
services-crm:modules/activities/tests/integration/services/persistence/activities.integration.spec.js#defaults the status, the time and the owner from the type, the clock and the caller
11 Recover one activity from repeated creationconcurrencyapinegativetest
Proves
BR-CAP-CRM-ACT-001-11
Preconditions
A client selects a valid time-ordered activity identifier.
Steps
Repeat identical creates, race them, and submit different content under the same identifier.
Expected
Identical deliveries retain one activity and follow-up; differing content conflicts.
Data
Each run creates and isolates the records it needs.
Bound to
services-crm:modules/activities/tests/integration/services/persistence/activities.create-retries.integration.spec.js#answers the retry with the activity the first attempt made, as a read answers it
Source
services-crm:modules/activities/tests/integration/services/persistence/activities.create-retries.integration.spec.js#makes one activity
12 Retain import attribution and unique external referencesinvariantapinegativetest
Proves
BR-CAP-CRM-ACT-001-12
Preconditions
An import origin and external reference are supplied.
Steps
Create an imported activity, repeat its external reference and edit the original.
Expected
Origin persists and duplicate external references fail.
Data
Each run creates and isolates the records it needs.
Bound to
services-crm:modules/activities/tests/integration/db/activities.table.integration.spec.js#refuses a second activity of the tenant under the same external id
Source
services-crm:modules/activities/tests/integration/services/persistence/activities.integration.spec.js#records sys_origin and sys_external_id from the source it is given
13 Reject activity custom field valuesvalidationapinegativetest
Proves
BR-CAP-CRM-ACT-001-13
Preconditions
An active type permits a valid activity.
Steps
Include custom field values in the save.
Expected
The API rejects the unsupported custom-field property.
Data
Each run creates and isolates the records it needs.
Bound to
services-crm:modules/activities/tests/e2e/activities.e2e.spec.js#refuses a custom field value, an activity having no custom fields (R2-ARCH-001): 400 naming custom_fields
services-crm:modules/activities/tests/e2e/activities.e2e.spec.js#answers an activity with no custom_fields property
Source
services-crm:modules/activities/tests/e2e/activities.e2e.spec.js#refuses a custom field value, an activity having no custom fields (R2-ARCH-001): 400 naming custom_fields
14 Shared logging survives correction and creates one follow-upinteractionapiproposed
Proves
BR-CAP-CRM-ACT-001-02 BR-CAP-CRM-ACT-002-09 BR-CAP-CRM-ACT-003-04 BR-CAP-CRM-ACT-005-05
Preconditions
Two contacts and an organization are linked to one interaction; the type suggests follow-up work.
Steps
Log with a follow-up, then correct the primary selection and remove one secondary link. Read both remaining timelines, the removed timeline and the task.
Expected
The remaining records show the corrected shared entry once, the removed context omits it, and the original follow-up remains a single task.
Data
Run-owned records in an isolated workspace; fixed clock for calendar checks.
Source
services-crm:modules/activities/tests/integration/services/persistence/activities.integration.spec.js#makes the first link the primary one when none says it is; services-crm:modules/activities/tests/integration/services/persistence/activities.integration.spec.js#writes nothing when the follow-up task is refused; services-crm:modules/activities/tests/integration/services/persistence/activities.integration.spec.js#replaces the links as a set on update, keeping the row of a record still linked; services-crm:modules/activities/tests/integration/services/persistence/activities.queries.integration.spec.js#shows the activity linked to three contacts and an organization once on each of the four timelines
15 Clear ownership after the creation defaultruleapiproposed
Proves
BR-CAP-CRM-ACT-001-17
Preconditions
A user can create and update an activity.
Steps
Create once with ownership omitted and once with empty ownership; edit each to clear ownership and read back.
Expected
Both initial records name the caller as owner; the later edits retain empty ownership.
Data
Run-owned records in an isolated workspace; fixed clock for calendar checks.
Source
services-crm:modules/activities/services/persistence/activities.ts:activityValuesOf
16 Collect field problems and keep both records absentfailureapiproposed
Proves
BR-CAP-CRM-ACT-001-15 BR-CAP-CRM-ACT-002-09
Preconditions
The type requires direction and outcome; a follow-up is requested.
Steps
Submit completed work missing both required details and inspect validation and database counts.
Expected
The refusal identifies both fields and neither activity nor task is retained.
Data
Run-owned records in an isolated workspace; fixed clock for calendar checks.
Source
services-crm:modules/activities/services/persistence/activities.ts:saveNewActivity

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.