Skip to content

ATS-MBR-MEM-014Alert staff to memberships about to expire: Capability Test Specification

Markdown

ATS-MBR-MEM-014

Alert staff to memberships about to expire: Capability Test Specification

Markdown
  • DocumentProposed

Planning

Proves capability
CAP-MBR-MEM-014

Design

Executed by
TST-MBR-MEM-025, TST-MBR-MEM-033

KindAcceptance test setProduct areaMembershipModuleMemberships, Applications and Membership BillingRevision2

Read atservices-membership 5994c270react-console baf6dae3

Coverage

  • Rule covered
  • Transition gap: FND-MBR-MEM-096
  • Validation gap: FND-MBR-MEM-096
  • Permission gap: FND-MBR-MEM-096
  • Edge gap: FND-MBR-MEM-096
  • Failure covered
  • Boundary covered
  • Concurrency gap: FND-MBR-MEM-096
  • Invariant gap: FND-MBR-MEM-096
  • Interaction covered

Test Scenarios

16 scenarios proving CAP-MBR-MEM-014; 7 bound to an existing test.

01 Only unrenewed principal terms ending inside the horizon are expiringruleapitest
Proves
BR-CAP-MBR-MEM-014-01
Preconditions
The well-known FAA workspace fixtures, or a workspace the test builds from them.
Steps
[ { "do": "Sweep with terms ending inside and outside the horizon, a renewed one, and with a wider workspace horizon.", "expect": "Items open only for unrenewed terms inside the horizon; the wider horizon reaches further.", "provenance": "test", "source": [ "services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#publishes an open item for a membership whose term ends inside the horizon", "services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#publishes nothing for a term that ends outside the horizon", "services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#publishes nothing for a term that already has a successor", "services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#publishes a term the tenant’s wider horizon reaches" ] } ]
Expected
Items open only for unrenewed terms inside the horizon; the wider horizon reaches further.
Data
FAA programs, packages, units and members from the integration seed.
Bound to
Source
services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#publishes an open item for a membership whose term ends inside the horizon
02 The horizon is the workspace's own business datesboundaryunittest
Proves
BR-CAP-MBR-MEM-014-02
Preconditions
The well-known FAA workspace fixtures, or a workspace the test builds from them.
Steps
[ { "do": "Compute the window across a year end and either side of the workspace's midnight.", "expect": "Both ends included, on the workspace's dates, moving at its midnight.", "provenance": "test", "source": [ "services-membership:modules/memberships/tests/unit/expiring-memberships.spec.ts#is the business date through the date plus the horizon, both inclusive", "services-membership:modules/memberships/tests/unit/expiring-memberships.spec.ts#crosses a year end", "services-membership:modules/memberships/tests/unit/expiring-memberships.spec.ts#starts on the tenant’s business date, not the UTC date", "services-membership:modules/memberships/tests/unit/expiring-memberships.spec.ts#moves to the next day once the tenant’s midnight passes" ] } ]
Expected
Both ends included, on the workspace's dates, moving at its midnight.
Data
FAA programs, packages, units and members from the integration seed.
Bound to
Source
services-membership:modules/memberships/tests/unit/expiring-memberships.spec.ts#is the business date through the date plus the horizon, both inclusive
03 Each alert is labelled, carries its facts and goes to the renewals responsibilityruleunittest
Proves
BR-CAP-MBR-MEM-014-03
Preconditions
The well-known FAA workspace fixtures, or a workspace the test builds from them.
Steps
[ { "do": "Build the item for a named member and for one CRM names no one for.", "expect": "Keyed by the membership, labelled by name or number, with the declared facts, addressed to the default responsibility.", "provenance": "test", "source": [ "services-membership:modules/memberships/tests/unit/expiring-memberships.spec.ts#is keyed by the membership and about it, labelled with the member’s name", "services-membership:modules/memberships/tests/unit/expiring-memberships.spec.ts#carries the declared facts", "services-membership:modules/memberships/tests/unit/expiring-memberships.spec.ts#is labelled by the membership number when CRM names no one", "services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#addresses the item to membership.renewals, the definition’s default" ] } ]
Expected
Keyed by the membership, labelled by name or number, with the declared facts, addressed to the default responsibility.
Data
FAA programs, packages, units and members from the integration seed.
Bound to
Source
services-membership:modules/memberships/tests/unit/expiring-memberships.spec.ts#is keyed by the membership and about it, labelled with the member’s name
04 Alerts are scoped by the member's units, then the workspaceruleapitest
Proves
BR-CAP-MBR-MEM-014-04
Preconditions
The well-known FAA workspace fixtures, or a workspace the test builds from them.
Steps
[ { "do": "Publish items for a chapter member and a member of no unit.", "expect": "The chapter member's item is scoped chapter, zone, region, then workspace; the other by the workspace alone.", "provenance": "test", "source": [ "services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#scopes the item by the membership’s chapter and its ancestors, most specific first, then the tenant", "services-membership:modules/memberships/tests/unit/expiring-memberships.spec.ts#is scoped by the tenant alone when the membership has no unit" ] } ]
Expected
The chapter member's item is scoped chapter, zone, region, then workspace; the other by the workspace alone.
Data
FAA programs, packages, units and members from the integration seed.
Bound to
Source
services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#scopes the item by the membership’s chapter and its ancestors, most specific first, then the tenant
05 An alert is due on the last day and expires thirty days laterboundaryapitest
Proves
BR-CAP-MBR-MEM-014-05
Preconditions
The well-known FAA workspace fixtures, or a workspace the test builds from them.
Steps
[ { "do": "Publish an item and read its instants.", "expect": "Due at the start of the term's last day in the workspace's zone; expiring thirty days later.", "provenance": "test", "source": [ "services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#is due at the start of the term’s last day and expires thirty days after it" ] } ]
Expected
Due at the start of the term's last day in the workspace's zone; expiring thirty days later.
Data
FAA programs, packages, units and members from the integration seed.
Bound to
Source
services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#is due at the start of the term’s last day and expires thirty days after it
06 The daily sweep refreshes and clears its alertstransitionapitest
Proves
BR-CAP-MBR-MEM-014-06
Preconditions
The well-known FAA workspace fixtures, or a workspace the test builds from them.
Steps
[ { "do": "Run two passes, the second after the term leaves the horizon.", "expect": "The second pass refreshes the same item, then clears it; each pass is stamped.", "provenance": "test", "source": [ "services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#refreshes the same item’s facts on the next pass rather than opening another", "services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves the item cleared on the next pass once its term leaves the horizon", "services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#stamps the pass with what it published" ] } ]
Expected
The second pass refreshes the same item, then clears it; each pass is stamped.
Data
FAA programs, packages, units and members from the integration seed.
Bound to
Source
services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#refreshes the same item’s facts on the next pass rather than opening another
07 Renewal and termination resolve the alert in their own transactionsinteractionapitest
Proves
BR-CAP-MBR-MEM-014-07
Preconditions
The well-known FAA workspace fixtures, or a workspace the test builds from them.
Steps
[ { "do": "Renew one expiring member and terminate another.", "expect": "The first item is resolved renewed and the second terminated, in the writes' transactions.", "provenance": "test", "source": [ "services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves the item renewed in the staff renewal’s transaction", "services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves the item terminated in the termination’s transaction" ] } ]
Expected
The first item is resolved renewed and the second terminated, in the writes' transactions.
Data
FAA programs, packages, units and members from the integration seed.
Bound to
Source
services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves the item renewed in the staff renewal’s transaction
08 A refused alert fails its business write, and nothing is published while switched offfailureapinegativeproposed
Proves
BR-CAP-MBR-MEM-014-09
Preconditions
The well-known FAA workspace fixtures, or a workspace the test builds from them.
Steps
[ { "do": "Switch publishing off and renew; switch it on with an unregistered definition and renew.", "expect": "Off: the renewal succeeds and nothing is published. On and refused: the renewal fails with the refusal.", "provenance": "proposed", "source": "services-membership:docs/attention.md#3. When items are published and resolved" } ]
Expected
Off: the renewal succeeds and nothing is published. On and refused: the renewal fails with the refusal.
Data
FAA programs, packages, units and members from the integration seed.
Source
services-membership:docs/attention.md#3. When items are published and resolved
09 Resolve expiry attention through staff renewalinteractionapiproposed
Proves
BR-CAP-MBR-MEM-002-02 BR-CAP-MBR-MEM-014-07
Preconditions
Publication is enabled and an expiring member has an open item.
Steps
[ { "do": "Add a staff renewal and inspect the term and the attention item in the committed result.", "expect": "The new term exists and the original item is resolved as renewed.", "provenance": "proposed", "source": [ "services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#adds a renewal continuing the latest term when no dates are given", "services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves the item renewed in the staff renewal’s transaction" ] } ]
Expected
The new term exists and the original item is resolved as renewed.
Data
An isolated workspace with the specified membership, package, chapter and partner-port fixtures.
Source
services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#adds a renewal continuing the latest term when no dates are given,services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves the item renewed in the staff renewal’s transaction
10 Resolve expiry attention through staff closureinteractionapiproposed
Proves
BR-CAP-MBR-MEM-003-06 BR-CAP-MBR-MEM-014-07
Preconditions
Publication is enabled and a started period has an expiry item.
Steps
[ { "do": "Terminate the period and inspect its last day and attention outcome after commit.", "expect": "The period is closed and its existing item is resolved as terminated.", "provenance": "proposed", "source": [ "services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#terminates a term from the effective date, with the reason, and the status follows", "services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves the item renewed in the staff renewal’s transaction" ] } ]
Expected
The period is closed and its existing item is resolved as terminated.
Data
An isolated workspace with the specified membership, package, chapter and partner-port fixtures.
Source
services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#terminates a term from the effective date, with the reason, and the status follows,services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves the item renewed in the staff renewal’s transaction
11 Keep fan-out and alert resolution in the source saveinteractionapiproposed
Proves
BR-CAP-MBR-MEM-006-07 BR-CAP-MBR-MEM-014-07
Preconditions
Publication is enabled for an expiring organizational membership with children.
Steps
[ { "do": "Renew the organization and inspect renewed source coverage, derived periods and the original alert.", "expect": "The committed source renewal supplies the linked periods and resolves the original alert; a refused save leaves the prior state.", "provenance": "proposed", "source": [ "services-membership:modules/memberships/tests/integration/services/organization-children.integration.spec.ts#re-mirrors the children when the parent’s end is corrected: a child never outlasts the parent", "services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves the item renewed in the staff renewal’s transaction" ] } ]
Expected
The committed source renewal supplies the linked periods and resolves the original alert; a refused save leaves the prior state.
Data
An isolated workspace with the specified membership, package, chapter and partner-port fixtures.
Source
services-membership:modules/memberships/tests/integration/services/organization-children.integration.spec.ts#re-mirrors the children when the parent’s end is corrected: a child never outlasts the parent,services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves the item renewed in the staff renewal’s transaction
12 Scope expiry attention through current chaptersinteractionapiproposed
Proves
BR-CAP-MBR-MEM-007-12 BR-CAP-MBR-MEM-014-04
Preconditions
Publication is enabled for a member with two chapters sharing ancestors.
Steps
[ { "do": "Sweep for approaching expiry and inspect the published item scope.", "expect": "The item reaches the selected chapters and their ancestors before the workspace scope.", "provenance": "proposed", "source": [ "services-membership:tests/e2e/s05-multiple-chapters.e2e.spec.ts#returns Jo in the Atlanta and in the Savannah roster", "services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#scopes the item by the membership’s chapter and its ancestors, most specific first, then the tenant" ] } ]
Expected
The item reaches the selected chapters and their ancestors before the workspace scope.
Data
An isolated workspace with the specified membership, package, chapter and partner-port fixtures.
Source
services-membership:tests/e2e/s05-multiple-chapters.e2e.spec.ts#returns Jo in the Atlanta and in the Savannah roster,services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#scopes the item by the membership’s chapter and its ancestors, most specific first, then the tenant
13 Resolve expiry attention at purchase fulfilmentinteractionapiproposed
Proves
BR-CAP-MBR-MEM-009-12 BR-CAP-MBR-MEM-014-07
Preconditions
Publication is enabled and an expiring member has a placed renewal purchase.
Steps
[ { "do": "Inspect attention before fulfilment, then fulfil the renewal and inspect the committed item.", "expect": "The pending purchase has not committed renewal rights; completed renewal resolves the existing item.", "provenance": "proposed", "source": [ "services-membership:modules/commerce-participant/tests/integration/participant.integration.spec.ts#fulfils: committed with its authorization, numbered, its chapter written with the dues product, enrolled", "services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves the item renewed in the staff renewal’s transaction" ] } ]
Expected
The pending purchase has not committed renewal rights; completed renewal resolves the existing item.
Data
An isolated workspace with the specified membership, package, chapter and partner-port fixtures.
Source
services-membership:modules/commerce-participant/tests/integration/participant.integration.spec.ts#fulfils: committed with its authorization, numbered, its chapter written with the dues product, enrolled,services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves the item renewed in the staff renewal’s transaction
14 Resolve attention when a purchased term closesinteractionapiproposed
Proves
BR-CAP-MBR-MEM-010-10 BR-CAP-MBR-MEM-014-07
Preconditions
Publication is enabled for an expiring purchased term.
Steps
[ { "do": "Cancel the started purchase and inspect the closure and the original expiry item.", "expect": "The term and chapter coverage close and the enabled item resolves in the closing write.", "provenance": "proposed", "source": [ "services-membership:tests/e2e/commerce-cancellation.e2e.spec.ts#terminates the term the day before the effective date, ends its chapter, clears the fence", "services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves the item renewed in the staff renewal’s transaction" ] } ]
Expected
The term and chapter coverage close and the enabled item resolves in the closing write.
Data
An isolated workspace with the specified membership, package, chapter and partner-port fixtures.
Source
services-membership:tests/e2e/commerce-cancellation.e2e.spec.ts#terminates the term the day before the effective date, ends its chapter, clears the fence,services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves the item renewed in the staff renewal’s transaction
15 Resolve an expiry item through a billing dropinteractionapiproposed
Proves
BR-CAP-MBR-MEM-013-08 BR-CAP-MBR-MEM-013-09 BR-CAP-MBR-MEM-014-07
Preconditions
Publication is enabled for a membership whose planned billing action is a drop.
Steps
[ { "do": "Execute the drop and read the closed period and the original attention item.", "expect": "The period records the billing reason and its item resolves as terminated.", "provenance": "proposed", "source": [ "services-membership:modules/billing/tests/integration/billing-runs.integration.spec.ts#executes on the jobs engine: one order per renewing candidate (Jo’s with both dues chapters), a notice and reminder each, one drop per lapsed term", "services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves the item renewed in the staff renewal’s transaction" ] } ]
Expected
The period records the billing reason and its item resolves as terminated.
Data
An isolated workspace with the specified membership, package, chapter and partner-port fixtures.
Source
services-membership:modules/billing/tests/integration/billing-runs.integration.spec.ts#executes on the jobs engine: one order per renewing candidate (Jo’s with both dues chapters), a notice and reminder each, one drop per lapsed term,services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves the item renewed in the staff renewal’s transaction
16 Abort both event and renewal when enabled resolution failsinteractionapinegativeproposed
Proves
BR-CAP-MBR-MEM-014-07 BR-CAP-MBR-MEM-020-01
Preconditions
An expiring member has an item, and enabled attention resolution rejects the renewal.
Steps
[ { "do": "Attempt renewal, then inspect saved periods, lifecycle and published business events.", "expect": "The refused transaction leaves no renewal period, renewal lifecycle entry or commitment event.", "provenance": "proposed", "source": [ "services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves the item renewed in the staff renewal’s transaction", "services-membership:modules/events/tests/integration/business-events.integration.spec.ts#states membership.term.committed and the term’s affiliation for a staff creation, naming the person, the program and the term" ] } ]
Expected
The refused transaction leaves no renewal period, renewal lifecycle entry or commitment event.
Data
An isolated workspace with the specified membership, package, chapter and partner-port fixtures.
Source
services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves the item renewed in the staff renewal’s transaction,services-membership:modules/events/tests/integration/business-events.integration.spec.ts#states membership.term.committed and the term’s affiliation for a staff creation, naming the person, the program and the term

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.