Skip to content

ATS-PFM-NOT-016Author and publish association e-mail content: Capability Test Specification

Markdown

ATS-PFM-NOT-016

Author and publish association e-mail content: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaPlatformModuleStaff Notifications and Association CommunicationsRevision2

Read atservices-platform ad3f6a65react-console baf6dae3

Coverage

  • Rule covered
  • Transition gap: FND-PFM-NOT-077
  • Validation covered
  • Permission covered
  • Edge covered
  • Failure covered
  • Boundary covered
  • Concurrency covered
  • Invariant covered
  • Interaction covered

Test Scenarios

18 scenarios proving CAP-PFM-NOT-016; 17 bound to an existing test.

01 Block Platform-rendered mail without publicationfailureapinegativetest
Proves
BR-CAP-PFM-NOT-016-01
Preconditions
Prepare a purpose with starter text and a record that owns no template.
Steps
Submit the owning record's workflow e-mail request.
Expected
The missing-template request is blocked, and starter content is not submitted to the provider.
Data
Use only records created and owned by this suite.
Bound to
services-platform:modules/communications/tests/integration/lifecycle/contact-role-compliance-communication.integration.spec.js#stores configuration_blocked behind the queue, naming the purpose and the record that owns no template
Source
services-platform:modules/communications/tests/integration/lifecycle/contact-role-compliance-communication.integration.spec.js#offers starter text that the purpose itself never sends
02 Expose only association-editable purposesboundaryapinegativetest
Proves
BR-CAP-PFM-NOT-016-02 INV-DOM-PFM-NOT-004-03
Preconditions
Prepare a Platform-rendered, a caller-rendered and an owned-template purpose.
Steps
Retrieve the list of purposes; create, preview, test-send and check readiness for the other two.
Expected
Only the Platform-rendered purpose is listed; all template paths reject the other purpose types by name.
Data
Use only records created and owned by this suite.
Bound to
services-platform:modules/communications/tests/e2e/templates.e2e.spec.js#does not offer a purpose its caller renders, which has no template to edit
services-platform:modules/communications/tests/e2e/templates.e2e.spec.js#describes the records the purpose offers a template, from the registry
Source
services-platform:modules/communications/tests/e2e/templates.e2e.spec.js#does not offer a purpose its caller renders, which has no template to edit
03 Validate template fields while retaining unfinished draftsvalidationapinegativetest
Proves
BR-CAP-PFM-NOT-016-03
Preconditions
Prepare a association administrator.
Steps
Create templates with no name, an unrecognized purpose, a bad reply-to, eleven copies, repeated copies; next a draft that does not validate.
Expected
Invalid fields produce specific rejections, copies are canonical and distinct, and unfinished content saves with validation findings.
Data
Use only records created and owned by this suite.
Bound to
services-platform:modules/communications/tests/e2e/templates.e2e.spec.js#refuses a purpose Rhythm does not know as 400, naming it
services-platform:modules/communications/tests/e2e/templates.e2e.spec.js#saves a draft that does not validate, recording why it cannot be published
Source
services-platform:modules/communications/tests/e2e/templates.e2e.spec.js#refuses a body with no name as 400
04 Count only active templates toward the purpose limitboundaryapinegativetest
Proves
BR-CAP-PFM-NOT-016-04 INV-DOM-PFM-NOT-004-07
Preconditions
Prepare a purpose filled to its limit with archived templates.
Steps
Create within the allowance, populate all active slots and attempt a further creation.
Expected
Creation within the allowance succeeds; exceeding it rejects the write and stores no template.
Data
Use only records created and owned by this suite.
Bound to
services-platform:modules/communications/tests/integration/services/persistence/templates.integration.spec.js#writes nothing when it refuses, so the purpose holds what it held before
Source
services-platform:modules/communications/tests/integration/services/persistence/templates.integration.spec.js#creates a template for a purpose whose cap is filled with archived ones
05 Reject stale drafts and archived editsconcurrencyapinegativetest
Proves
BR-CAP-PFM-NOT-016-05
Preconditions
Prepare a template edited by two administrators.
Steps
Replace the draft at the version read; replace it a second time at the old version; edit and publish an archived template.
Expected
The first valid edit succeeds; its stale competitor and both archived operations fail.
Data
Use only records created and owned by this suite.
Bound to
Source
services-platform:modules/communications/tests/e2e/templates.e2e.spec.js#refuses a stale version as 409
06 Report unsafe and invalid content locationsvalidationapinegativetest
Proves
BR-CAP-PFM-NOT-016-06 INV-DOM-PFM-NOT-004-02
Preconditions
Prepare content containing undeclared fields, template inclusion, Handlebars syntax and a script element.
Steps
Run validation and rendering preview for every content fixture.
Expected
Every content problem includes its location, and invalid content is not rendered.
Data
Use only records created and owned by this suite.
Bound to
Source
services-platform:modules/communications/tests/integration/lifecycle/contact-role-compliance-communication.integration.spec.js#refuses content that reads an undeclared variable and includes a file
07 Freeze published content across later editsinvariantapitest
Proves
BR-CAP-PFM-NOT-016-07 INV-DOM-PFM-NOT-004-01
Preconditions
Prepare a valid draft.
Steps
Publish; edit the draft; publish a second time; publish an invalid draft.
Expected
Version one and its hash stay immutable; later draft editing leaves it unchanged; publication makes version two current; invalid publication fails.
Data
Use only records created and owned by this suite.
Bound to
services-platform:modules/communications/tests/e2e/templates.e2e.spec.js#froze the draft as version 1, with the content hash and the variables it reads
services-platform:modules/communications/tests/e2e/templates.e2e.spec.js#answers 200 for the second publish, numbering it 2
services-platform:modules/communications/tests/e2e/templates.e2e.spec.js#points the template at the version published last
services-platform:modules/communications/tests/e2e/templates.e2e.spec.js#leaves the published version untouched when the draft changes afterwards
services-platform:modules/communications/tests/e2e/templates.e2e.spec.js#refuses publishing a draft that does not validate as 400
services-platform:modules/communications/tests/integration/services/persistence/templates.integration.spec.js#leaves neither the version nor the pointer behind when the transaction it ran in rolls back
Source
services-platform:modules/communications/tests/e2e/templates.e2e.spec.js#froze the draft as version 1, with the content hash and the variables it reads
08 Save one record-owned template with partial updatesinteractionapitest
Proves
BR-CAP-PFM-NOT-016-09 INV-DOM-PFM-NOT-004-04
Preconditions
Prepare a organization type that owns no template.
Steps
Save its first template; save part of it; save the identical content; save invalid content; dry-run; clear twice; save from two screens at once.
Expected
Initial save publishes version one; a changed partial save preserves other fields and publishes version two. Identical, invalid and dry-run saves add nothing. Clearing archives once, and concurrent creation yields one template.
Data
Use only records created and owned by this suite.
Bound to
services-platform:modules/communications/tests/integration/services/templates/owned-templates.integration.spec.js#ends with one template for the owner, because the unique index refuses the second insert
Source
services-platform:modules/communications/tests/integration/services/templates/owned-templates.integration.spec.js#creates the record’s template and publishes version 1
09 Preserve owned-template purpose and ownerinvariantapitest
Proves
BR-CAP-PFM-NOT-016-10 INV-DOM-PFM-NOT-004-05
Preconditions
Prepare a template a record owns.
Steps
Attempt owner and purpose changes through ordinary template editing, then archive through that interface.
Expected
Edits retain both identity fields; archiving clears the owning record's active content.
Data
Use only records created and owned by this suite.
Bound to
services-platform:modules/communications/tests/integration/services/templates/owned-templates.integration.spec.js#drops the purpose and the owner from the body before the operation sees them
Source
services-platform:modules/communications/tests/integration/services/templates/owned-templates.integration.spec.js#drops the purpose and the owner from the body before the operation sees them
10 Keep Marketing-version content immutable and hiddeninvariantapinegativetest
Proves
BR-CAP-PFM-NOT-016-11 INV-DOM-PFM-NOT-004-08
Preconditions
Prepare a Marketing message version.
Steps
Store its template; store the identical content; store different content; list staff templates.
Expected
Initial storage publishes one version, repetition returns it, changed published content fails and staff lists omit it.
Data
Use only records created and owned by this suite.
Bound to
services-platform:modules/communications/tests/integration/services/templates/message-version-templates.integration.spec.js#refuses different content for a message version that is published, as an illegal operation
Source
services-platform:modules/communications/tests/integration/services/templates/message-version-templates.integration.spec.js#creates the template for the message version and publishes its version
11 Preview through the delivery renderer without sendingruleapitest
Proves
BR-CAP-PFM-NOT-016-12
Preconditions
Prepare a published template and the message delivery rendered from it.
Steps
Preview with the identical data; preview content with a problem; count the rows and the queue.
Expected
Subject and bodies match delivery output. Findings and empty fields are returned without rows, queue work or dispatch nudges.
Data
Use only records created and owned by this suite.
Bound to
services-platform:modules/communications/tests/e2e/templates.e2e.spec.js#rendered the draft rather than a version, with sample data
Source
services-platform:modules/communications/tests/integration/services/templates/render-preview.integration.spec.js#renders the same subject, character for character
12 Restrict marked test delivery destinationspermissionapinegativetest
Proves
BR-CAP-PFM-NOT-016-13
Preconditions
Prepare a author with the test-send permission.
Steps
Submit marked tests to the requesting author's address, a test mailbox and a colleague's address.
Expected
Author and test-mailbox targets queue [TEST] messages; a colleague target is rejected.
Data
Use only records created and owned by this suite.
Bound to
services-platform:modules/communications/tests/e2e/templates.e2e.spec.js#refuses an address that is neither a test mailbox nor the caller’s own as 403
services-platform:modules/communications/tests/integration/services/requests/handle-invocation.integration.spec.js#marks the subject [TEST] and renders the registry’s sample values for the record it names
Source
services-platform:modules/communications/tests/e2e/templates.e2e.spec.js#refuses an address that is neither a test mailbox nor the caller’s own as 403
13 Render declared records and custom fieldsedgeapitest
Proves
BR-CAP-PFM-NOT-016-15
Preconditions
Prepare a contact custom field defined by the association; a contact that omits a described field.
Steps
Publish content referencing both fields and process a message from that version.
Expected
Custom-field values render, omitted fields render empty and references unavailable to the record type are rejected.
Data
Use only records created and owned by this suite.
Bound to
services-platform:modules/communications/tests/integration/services/requests/record-merge-fields.integration.spec.js#refuses the same template for a tenant that has not defined the field, naming the path it reads
Source
services-platform:modules/communications/tests/integration/services/requests/record-merge-fields.integration.spec.js#renders the contact's value for the custom field into the stored HTML body
14 Require publication before workflow deliveryinteractionapinegativetest
Proves
AS-JNY-PFM-NOT-006-01
Preconditions
Prepare a organization type that owns no template.
Steps
Submit the workflow's notification e-mail.
Expected
The request records a blocked outcome and no mail is sent.
Data
The lifecycle suite's organization type, contacts and recording provider.
Bound to
services-platform:modules/communications/tests/integration/lifecycle/contact-role-compliance-communication.integration.spec.js#stores configuration_blocked behind the queue, naming the purpose and the record that owns no template
Source
services-platform:modules/communications/tests/integration/lifecycle/contact-role-compliance-communication.integration.spec.js#sends nothing at all
15 Publication controls acceptance and later message historyinteractionapiproposed
Proves
BR-CAP-PFM-NOT-016-07
Preconditions
Use one record-owned draft and two recipients; retain the initial published snapshot when one becomes available.
Steps
Submit before publication, publish corrected content, submit again, edit the draft and inspect request and message history.
Expected
The first request is blocked. The later request pins the published version; draft editing does not rewrite its retained message content.
Data
A suite-owned workspace, named staff accounts and unique occurrence keys; external adapters record attempts without shared writes.
Source
rhythm-v2-docs:specs/platform/notifications/planning/capabilities/CAP-PFM-NOT-016-compose-the-e-mails-an-association-sends.md#frontmatter,rhythm-v2-docs:specs/platform/notifications/planning/capabilities/CAP-PFM-NOT-017-ask-platform-to-send-an-association-e-mail.md#frontmatter,rhythm-v2-docs:specs/platform/notifications/planning/capabilities/CAP-PFM-NOT-019-record-what-became-of-each-e-mail.md#frontmatter
16 Preview record-owned content and retain the saved versioninteractionbrowsertest
Proves
BR-CAP-PFM-NOT-016-12
Preconditions
Create an organization type with saved compliance content and a contact used for preview.
Steps
Preview the selected organization and contact, add an unavailable field to the unsaved draft and preview again.
Expected
The preview shows recipient values and a located validation problem; the saved content does not acquire the invalid field.
Data
Dev fixture staff and unique records created by the browser suite.
Bound to
Source
react-console:e2e/dev/organization-types.dev.spec.ts
17 Select published scheduled-report content during schedule setupinteractionbrowsertest
Proves
BR-CAP-PFM-NOT-016-01
Preconditions
Use a dev administrator and deployed schedule routes; run both with an existing publication and with none.
Steps
Open schedule setup; when no publication exists, create and publish report content, then choose the template and run the schedule.
Expected
Setup selects published content. The fallback creation and publication return success when needed; run history reaches Sent, Failed or Skipped, so this case does not establish provider delivery.
Data
Dev fixture staff and unique records created by the browser suite.
Bound to
Source
react-console:e2e/dev/query-schedules.dev.spec.ts
18 Distinguish empty preview values from zero and falseedgeunittest
Proves
BR-CAP-PFM-NOT-016-12
Preconditions
Prepare declared paths whose values include text, zero, false, whitespace, null and absent properties, plus lists with mixed values.
Steps
Calculate empty fields for scalar paths and paths crossing lists.
Expected
Zero, false, whitespace and populated paths stay outside the empty-field result. Missing values are named, and a list path appears once only when every matching value is empty.
Data
Pure scalar and list inputs in one process.
Bound to
Source
services-platform:modules/communications/tests/unit/services/templates/empty-merge-fields.spec.js#names only the empty ones, in the order the paths were given

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.