Skip to content

ATS-PFM-NOT-002Publish a notification with its business change: Capability Test Specification

Markdown

ATS-PFM-NOT-002

Publish a notification with its business change: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaPlatformModuleStaff Notifications and Association CommunicationsRevision2

Read atservices-platform ad3f6a65react-console baf6dae3

Coverage

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

Test Scenarios

9 scenarios proving CAP-PFM-NOT-002; 8 bound to an existing test.

01 Tie publication to business commitinvariantapitest
Proves
BR-CAP-PFM-NOT-002-01 INV-DOM-PFM-NOT-003-01
Preconditions
Prepare a producer transaction that publishes.
Steps
Roll the transaction back; next commit it.
Expected
Rollback leaves no claimable work; commit leaves exactly one queue entry.
Data
Use only records created and owned by this suite.
Bound to
services-platform:modules/notifications/tests/integration/services/dispatch/dispatch-notifications.integration.spec.js#leaves nothing to claim when the producer’s transaction rolled back, and one row when it committed
services-platform:modules/notifications/tests/integration/db/notification-submissions.table.integration.spec.js#accepts the caller’s columns into its own tenant, the negative control of the refusals
Source
services-platform:modules/notifications/tests/integration/services/dispatch/dispatch-notifications.integration.spec.js#leaves nothing to claim when the producer’s transaction rolled back, and one row when it committed
02 Restrict producer access to insertionpermissionapinegativetest
Proves
BR-CAP-PFM-NOT-002-02
Preconditions
Prepare the capability role, unable to log in and bound by row-level security.
Steps
Insert into another organization; with no organization set; store the claim and order columns; read, change or delete a row; read another notification table.
Expected
Forbidden role operations all fail. Inserting permitted fields in the caller's workspace succeeds.
Data
Use only records created and owned by this suite.
Bound to
Source
services-platform:modules/notifications/tests/integration/db/notification-submissions.table.integration.spec.js#is refused a row in another tenant by the policy, not by the grant
03 Deduplicate publication receiptsinvariantapitest
Proves
BR-CAP-PFM-NOT-002-03 INV-DOM-PFM-NOT-003-02
Preconditions
Prepare a publish already submitted.
Steps
Submit it a second time with the identical idempotency key.
Expected
The repeated key returns the original request identifier and duplicate indicator, with one queued entry.
Data
Use only records created and owned by this suite.
Bound to
services-platform:modules/notifications/tests/integration/db/notification-submissions.table.integration.spec.js#refuses a second row for the same submitter, key and kind as a duplicate, which is how a retried transaction asks once
Source
services-platform:modules/notifications/tests/integration/services/requests/submit-notification-request.integration.spec.js#answers the same request id and a duplicate for a repeat, writing one row
04 Apply queue constraints to all writersboundaryapinegativetest
Proves
BR-CAP-PFM-NOT-002-04
Preconditions
Prepare a writable queue table.
Steps
Insert rows with a non-version-5 id, a bad submitter, an unrecognized kind, a two-word key, a non-object payload, a 33 KB payload; next a cancel beside its publish.
Expected
Invalid entries fail at persistence; cancellation is a separate entry sharing the publication identifier.
Data
Use only records created and owned by this suite.
Bound to
services-platform:modules/notifications/tests/integration/db/notification-submissions.table.integration.spec.js#writes a cancel of the same occurrence as a row of its own, under the same derived id
Source
services-platform:modules/notifications/tests/integration/db/notification-submissions.table.integration.spec.js#refuses an id that is not a UUID version 5
05 Reject invalid envelopes before insertionvalidationapinegativetest
Proves
BR-CAP-PFM-NOT-002-05
Preconditions
Prepare the system door.
Steps
Submit a invalidly structured envelope; an unrecognized field; a reason of 201 characters; a reason with a line break.
Expected
Each invalid field is identified and the queue remains unchanged.
Data
Use only records created and owned by this suite.
Bound to
services-platform:modules/notifications/tests/integration/services/requests/submit-notification-request.integration.spec.js#refuses a malformed envelope naming each path, with nothing written and nobody nudged
services-platform:modules/notifications/tests/integration/services/requests/submit-notification-request.integration.spec.js#refuses an audience reason of more than 200 characters or with a line break, with nothing written
services-platform:modules/notifications/tests/e2e/notifications.e2e.spec.js#refuses a malformed envelope with a 400 and an unknown field with a 400
Source
services-platform:modules/notifications/tests/integration/services/requests/submit-notification-request.integration.spec.js#refuses a malformed envelope naming each path, with nothing written and nobody nudged
06 Require system publication accesspermissionapinegativetest
Proves
BR-CAP-PFM-NOT-002-06
Preconditions
Prepare a console caller with every platform key; a system caller with the publish permission.
Steps
Submit publication from each caller type.
Expected
Console access fails; the authorized system caller receives a receipt whose processing creates a notice.
Data
Use only records created and owned by this suite.
Bound to
services-platform:modules/notifications/tests/e2e/notifications.e2e.spec.js#refuses the system door and Rhythm HQ’s routes to a console caller, even one holding every platform key
services-platform:modules/notifications/tests/e2e/notifications.e2e.spec.js#writes the publish and answers the receipt, which the pipeline then turns into a notification
services-platform:modules/notifications/tests/unit/permissions.spec.js#makes publish staff-only, so only a system route may require it, and gives it to the Rhythm Administrator role
Source
services-platform:modules/notifications/tests/e2e/notifications.e2e.spec.js#refuses the system door and Rhythm HQ’s routes to a console caller, even one holding every platform key
07 Require a known cancellation target and reasonvalidationapinegativetest
Proves
BR-CAP-PFM-NOT-002-08
Preconditions
Prepare the system door.
Steps
Cancel an unrecognized id; cancel without a reason.
Expected
Unknown targets return not found; missing reasons return validation rejection.
Data
Use only records created and owned by this suite.
Bound to
services-platform:modules/notifications/tests/e2e/notifications.e2e.spec.js#answers a cancel of an unknown request 404 and one without a reason 400
Source
services-platform:modules/notifications/tests/e2e/notifications.e2e.spec.js#answers a cancel of an unknown request 404 and one without a reason 400
08 Deduplicate repeated publication end to endinvariantapitest
Proves
AS-JNY-PFM-NOT-005-02
Preconditions
Prepare a producer transaction.
Steps
Submit an event and repeat its publication.
Expected
Only a single recipient notice is created.
Data
The journey's own personas and Northeast unit.
Bound to
Source
react-console:acceptance/notifications/playwright/journeys/pipeline/NT-ACC-0200.spec.ts#NT-ACC-0200
09 Committed publication survives dispatch recovery and withdrawalinteractionapiproposed
Proves
BR-CAP-PFM-NOT-002-01
Preconditions
Use one responsibility audience and suite-owned request keys.
Steps
Publish in a rolled-back transaction, then in a committed transaction; interrupt dispatch after queue acknowledgement, replay the item and withdraw the accepted occurrence.
Expected
Only the committed occurrence has a request. Replay adds no recipient notice, and withdrawal removes the notice from applicable unread results.
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-002-tell-people-that-something-happened-with-one-call.md#frontmatter,rhythm-v2-docs:specs/platform/notifications/planning/capabilities/CAP-PFM-NOT-003-reach-the-right-people-and-only-people-of-the-organization.md#frontmatter,rhythm-v2-docs:specs/platform/notifications/planning/capabilities/CAP-PFM-NOT-006-withdraw-or-expire-a-notice-that-no-longer-applies.md#frontmatter,rhythm-v2-docs:specs/platform/notifications/planning/capabilities/CAP-PFM-NOT-008-keep-notifications-whole-when-part-of-the-pipeline-fails.md#frontmatter

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.