Skip to content

ATS-PFM-NOT-015Store notification preferences and channel configuration: Capability Test Specification

Markdown

ATS-PFM-NOT-015

Store notification preferences and channel configuration: 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-076
  • Validation covered
  • Permission not-applicable
  • Edge covered
  • Failure gap: FND-PFM-NOT-076
  • Boundary covered
  • Concurrency covered
  • Invariant covered
  • Interaction covered

Test Scenarios

13 scenarios proving CAP-PFM-NOT-015; 10 bound to an existing test.

01 Validate choices against required deliveryvalidationapinegativetest
Proves
BR-CAP-PFM-NOT-015-02
Preconditions
Prepare registered definitions covering all preference modes.
Steps
Attempt console disablement, mandatory e-mail disablement, complete channel-configurable disablement and a disallowed digest; then retain one permitted channel.
Expected
Each invalid choice leaves preferences unchanged; a valid remaining channel is accepted.
Data
Use only records created and owned by this suite.
Bound to
services-platform:modules/notifications/tests/integration/services/persistence/preferences.integration.spec.js#refuses to leave a channel-configurable definition with every channel off
services-platform:modules/notifications/tests/integration/services/persistence/preferences.integration.spec.js#accepts a channel-configurable definition with one channel on, the negative control of that refusal
Source
services-platform:modules/notifications/tests/integration/services/persistence/preferences.integration.spec.js#refuses to turn the console off
02 Reject missing and stale optimistic versionsconcurrencyapinegativetest
Proves
BR-CAP-PFM-NOT-015-03
Preconditions
Prepare a stored choice, channel setting and personal setting.
Steps
Attempt another write using an outdated version, then omit the required update version.
Expected
Every invalid version update fails and leaves the prior setting intact.
Data
Use only records created and owned by this suite.
Bound to
Source
services-platform:modules/notifications/tests/integration/services/persistence/preferences.integration.spec.js#refuses a stale version with a 409 and leaves the choice as it was
03 Preserve console defaults and channel validationruleapinegativetest
Proves
BR-CAP-PFM-NOT-015-04
Preconditions
Prepare a organization that wrote nothing.
Steps
Retrieve the defaults; switch the console off; set a connection on e-mail; set a fractional ceiling.
Expected
Initial configuration enables console and e-mail and disables chat and text; invalid changes fail.
Data
Use only records created and owned by this suite.
Bound to
services-platform:modules/notifications/tests/integration/services/persistence/channel-settings.integration.spec.js#answers the defaults for a tenant that wrote nothing: the console and e-mail on, chat and SMS off
Source
services-platform:modules/notifications/tests/integration/services/persistence/channel-settings.integration.spec.js#answers the defaults for a tenant that wrote nothing: the console and e-mail on, chat and SMS off
04 Prevent weakening mandatory definitionsvalidationapinegativetest
Proves
BR-CAP-PFM-NOT-015-05
Preconditions
Prepare a mandatory definition.
Steps
Try disabling the mandatory definition, changing its requirement, removing e-mail, adding an unsupported route and excluding console from permitted channels.
Expected
All weakening changes fail, while retaining the original setting succeeds.
Data
Use only records created and owned by this suite.
Bound to
Source
services-platform:modules/notifications/tests/integration/services/persistence/definition-settings.integration.spec.js#refuses to turn a mandatory definition off
05 Validate stored wording overrides without runtime effecttransitionapitest
Proves
BR-CAP-PFM-NOT-015-06
Preconditions
Prepare a definition with English console and e-mail templates.
Steps
Draft text; publish; publish a second; publish text reading an undeclared field or a 141-character title; deactivate.
Expected
At most one stored version is active. Invalid content fails publication; deactivation clears the active override without changing current pipeline wording.
Data
Use only records created and owned by this suite.
Bound to
services-platform:modules/notifications/tests/integration/services/persistence/template-overrides.integration.spec.js#refuses to publish wording that names a field the definition does not declare
services-platform:modules/notifications/tests/integration/services/persistence/template-overrides.integration.spec.js#takes the active version out of use so the product’s wording applies again, and audits it
services-platform:modules/notifications/tests/integration/services/persistence/template-overrides.integration.spec.js#publishes an e-mail override that changes only the subject, the HTML and text inheriting from the product
Source
services-platform:modules/notifications/tests/integration/services/persistence/template-overrides.integration.spec.js#starts a draft at version 1 for the definition, channel and locale
06 Audit successful workspace configuration writesinvariantapitest
Proves
BR-CAP-PFM-NOT-015-07
Preconditions
Prepare a administrator.
Steps
Store a channel setting twice, a notice setting twice and publish text; make a rejected store.
Expected
Creation and update record before-and-after information for every audited family; rejected work adds no audit entry.
Data
Use only records created and owned by this suite.
Bound to
services-platform:modules/notifications/tests/integration/services/persistence/definition-settings.integration.spec.js#audits the first write as a create and the second as an update, with before and after
Source
services-platform:modules/notifications/tests/integration/services/persistence/channel-settings.integration.spec.js#audits the first write as a create and an update with the before and after
07 Validate stored quiet hours and digest timevalidationapinegativetest
Proves
BR-CAP-PFM-NOT-015-08
Preconditions
Prepare a recipient with no settings.
Steps
Retrieve the defaults; store quiet hours with no end, the identical start and end, a weekday 8, a weekday twice.
Expected
Defaults omit quiet hours and select 08:00 digest time; every invalid time or weekday update fails.
Data
Use only records created and owned by this suite.
Bound to
services-platform:modules/notifications/tests/integration/services/persistence/user-settings.integration.spec.js#answers nothing for a person who wrote none, whose defaults are no quiet hours and a digest at eight
Source
services-platform:modules/notifications/tests/integration/services/persistence/user-settings.integration.spec.js#answers nothing for a person who wrote none, whose defaults are no quiet hours and a digest at eight
08 Enforce identity uniqueness and terminal revocationtransitionapinegativetest
Proves
BR-CAP-PFM-NOT-015-09
Preconditions
Prepare a recipient with a linked Slack identity and a pending phone.
Steps
Link a second Slack identity; link a number another person has; verify the phone; revoke; move a revoked identity.
Expected
Duplicate identities fail, verification activates the identity, revocation frees the current channel slot and no transition reopens revoked state.
Data
Use only records created and owned by this suite.
Bound to
services-platform:modules/notifications/tests/integration/services/persistence/identities.integration.spec.js#refuses a phone number that another person already holds, by the table’s own index
services-platform:modules/notifications/tests/integration/services/persistence/identities.integration.spec.js#verifies a pending phone: active, verified now, the failure streak cleared
Source
services-platform:modules/notifications/tests/integration/services/persistence/identities.integration.spec.js#refuses a second current identity on a channel for the same person
09 Expire and exhaust phone challengesboundaryapinegativetest
Proves
BR-CAP-PFM-NOT-015-10
Preconditions
Prepare a open challenge.
Steps
Answer five wrong codes next the right one; response the right code after expiry; open a second challenge for the number.
Expected
Five wrong codes spend the challenge; expired codes fail; a new challenge replaces the earlier one; plaintext codes are never stored.
Data
Use only records created and owned by this suite.
Bound to
services-platform:modules/notifications/tests/integration/services/persistence/identities.integration.spec.js#replaces the person’s earlier challenge for the same number, so one is open at a time
services-platform:modules/notifications/tests/integration/services/persistence/identities.integration.spec.js#spends the challenge after five wrong codes, refusing even the right one
Source
services-platform:modules/notifications/tests/integration/services/persistence/identities.integration.spec.js#opens a challenge holding the digest of the code and never the code
10 Reserve text segments atomically within allowanceconcurrencyapinegativetest
Proves
BR-CAP-PFM-NOT-015-11
Preconditions
Prepare a organization with a ceiling of ten segments.
Steps
Reserve a fitting amount and an excessive amount, race reservations at the limit and repeat with a zero allowance.
Expected
Fitting reservations succeed; over-limit work fails and stamps the ceiling event. Concurrent edge reservations admit only available segments; zero admits none.
Data
Use only records created and owned by this suite.
Bound to
services-platform:modules/notifications/tests/integration/services/persistence/sms-usages.integration.spec.js#refuses a send that would cross the ceiling, leaving the total and stamping when it was stopped
services-platform:modules/notifications/tests/integration/services/persistence/sms-usages.integration.spec.js#reserves nothing for a ceiling of zero, the tenant having asked for no texts
Source
services-platform:modules/notifications/tests/integration/services/persistence/sms-usages.integration.spec.js#reserves segments within the ceiling and answers the month’s total
11 Accept an empty override and a category digest choiceedgeapiproposed
Proves
BR-CAP-PFM-NOT-015-02
Preconditions
A registered channel-configurable definition and a category without a supplied definition row.
Steps
Save the definition preference with no channel switches; save a category-level daily digest; attempt a nonempty override with every supplied switch disabled.
Expected
The empty override and category daily digest are stored; the nonempty all-disabled override is rejected.
Data
Create isolated personal preferences and a registered definition.
Source
services-platform:modules/notifications/services/persistence/preferences.ts:refuseInvalid
12 Stored configuration does not change current rendered deliveryinteractionapiproposed
Proves
BR-CAP-PFM-NOT-015-13
Preconditions
Save personal channel choices, a published wording override and a disabled optional definition setting.
Steps
Process a fresh occurrence and inspect its inbox content and selected channels alongside the stored configuration.
Expected
The stored versions remain available, while the occurrence retains product wording and console-only personal delivery.
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-015-let-the-organization-and-its-people-choose-how-they-hear.md#frontmatter,rhythm-v2-docs:specs/platform/notifications/planning/capabilities/CAP-PFM-NOT-007-deliver-each-notice-on-the-channels-it-may-use.md#frontmatter,rhythm-v2-docs:specs/platform/notifications/planning/capabilities/CAP-PFM-NOT-004-word-each-notice-for-the-person-who-receives-it.md#frontmatter
13 Settle a collected digest window oncetransitionapinegativeproposed
Proves
BR-CAP-PFM-NOT-015-12
Preconditions
Create one open daily window for Jane with two contribution identities; retain another untouched window.
Steps
Begin delivery, record completion and try to settle the same window again. Read both windows and their contribution totals.
Expected
Jane’s first window remains delivered after the repeated settlement; its contributions remain available and the untouched window stays open.
Data
Suite-owned recipient, category and two distinct digest windows.
Source
services-platform:modules/notifications/services/persistence/digests.ts:DIGEST_TRANSITIONS

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.