Skip to content

ATS-MBR-MEM-004Withhold membership through suspension and restore its standing: Capability Test Specification

Markdown

ATS-MBR-MEM-004

Withhold membership through suspension and restore its standing: Capability Test Specification

Markdown
  • DocumentProposed

Planning

Proves capability
CAP-MBR-MEM-004

Design

Executed by
TST-MBR-MEM-028, TST-MBR-MEM-191, TST-MBR-MEM-193

KindAcceptance test setProduct areaMembershipModuleMemberships, Applications and Membership BillingRevision2

Read atservices-membership 5994c270react-console baf6dae3

Coverage

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

Test Scenarios

8 scenarios proving CAP-MBR-MEM-004; 3 bound to an existing test.

01 Reject invalid or repeated suspension transitionsvalidationapinegativetest
Proves
BR-CAP-MBR-MEM-004-01
Preconditions
A principal membership has a current version, and the workspace contains both suspension and termination reasons.
Steps
[ { "do": "Submit a wrong-kind reason and a stale version; repeat a valid suspension, then attempt restoration after it has already been restored.", "expect": "Invalid reasons, stale versions and repeated transitions are refused.", "provenance": "test", "source": [ "services-membership:tests/acceptance/memberships/MBR-ACC-0174.acceptance.ts#MBR-ACC-0174: A membership is suspended over its terms and restored to whatever the terms give, once each way, with no detections while suspended and the history showing the suspension" ] } ]
Expected
Invalid reasons, stale versions and repeated transitions are refused.
Data
Principal memberships, both kinds of reason and callers with suspension authority.
Bound to
Source
services-membership:tests/acceptance/memberships/MBR-ACC-0174.acceptance.ts#MBR-ACC-0174: A membership is suspended over its terms and restored to whatever the terms give, once each way, with no detections while suspended and the history showing the suspension
02 Override dated standing while suspension remains setruleapitest
Proves
BR-CAP-MBR-MEM-004-02 BR-CAP-MBR-MEM-004-03 INV-DOM-MBR-MEM-001-09
Preconditions
A membership spans multiple periods and another has expired into grace.
Steps
[ { "do": "Suspend, inspect dated standing, run a sweep while suspended, and restore using a reason.", "expect": "Suspension overrides dated reads and suppresses detections; restoration returns the term-derived standing.", "provenance": "test", "source": [ "services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#suspends over every term and restores to the status the terms give", "services-membership:tests/acceptance/memberships/MBR-ACC-0174.acceptance.ts#MBR-ACC-0174: A membership is suspended over its terms and restored to whatever the terms give, once each way, with no detections while suspended and the history showing the suspension" ] } ]
Expected
Suspension overrides dated reads and suppresses detections; restoration returns the term-derived standing.
Data
Dated principal memberships and a sweep fixture spanning the expiry boundary.
Bound to
Source
services-membership:tests/acceptance/memberships/MBR-ACC-0174.acceptance.ts#MBR-ACC-0174: A membership is suspended over its terms and restored to whatever the terms give, once each way, with no detections while suspended and the history showing the suspension
03 Carry suspension and restoration to dependent membershipsinteractionapiproposed
Proves
BR-CAP-MBR-MEM-004-04
Preconditions
An organization’s membership has linked flow-down children.
Steps
[ { "do": "Suspend the corporate parent, restore it, and inspect every linked child and lifecycle log.", "expect": "Each child follows both changes and has its own corresponding lifecycle events.", "provenance": "proposed", "source": "services-membership:modules/memberships/services/operations/staff-operations.ts:suspendChildren" } ]
Expected
Each child follows both changes and has its own corresponding lifecycle events.
Data
An organizational principal membership with linked children.
Source
services-membership:modules/memberships/services/operations/staff-operations.ts:suspendChildren
04 Refuse direct intervention on a dependent membershippermissionapinegativeproposed
Proves
BR-CAP-MBR-MEM-004-05
Preconditions
A flow-down membership belongs to a principal parent.
Steps
[ { "do": "Attempt to suspend the dependent membership directly.", "expect": "The request is rejected and identifies its source parent.", "provenance": "proposed", "source": "services-membership:modules/memberships/services/operations/staff-operations.ts:refuseChild" } ]
Expected
The request is rejected and identifies its source parent.
Data
A parent and a linked child membership.
Source
services-membership:modules/memberships/services/operations/staff-operations.ts:refuseChild
05 Propagate suspension to organizational childreninteractionapiproposed
Proves
BR-CAP-MBR-MEM-004-04 BR-CAP-MBR-MEM-006-04
Preconditions
An organization has qualifying people with derived holdings.
Steps
[ { "do": "Suspend the organization, inspect each child, then restore and inspect again.", "expect": "Each linked child follows the parent suspension and restoration while retaining its term dates.", "provenance": "proposed", "source": [ "services-membership:modules/memberships/services/operations/staff-operations.ts:suspendChildren", "services-membership:modules/memberships/tests/integration/services/organization-children.integration.spec.ts#flows down to the contacts holding a flow-down role, mirroring the parent’s dates with the flow-down type" ] } ]
Expected
Each linked child follows the parent suspension and restoration while retaining its term dates.
Data
An isolated workspace with the specified membership, package, chapter and partner-port fixtures.
Source
services-membership:modules/memberships/services/operations/staff-operations.ts:suspendChildren,services-membership:modules/memberships/tests/integration/services/organization-children.integration.spec.ts#flows down to the contacts holding a flow-down role, mirroring the parent’s dates with the flow-down type
06 Keep staff suspension after payment restorationinteractionapiproposed
Proves
BR-CAP-MBR-MEM-004-02 BR-CAP-MBR-MEM-004-03 BR-CAP-MBR-MEM-010-09
Preconditions
Staff have suspended a purchased membership with a reason.
Steps
[ { "do": "Apply a Commerce suspension enforcement, then restore that enforcement.", "expect": "The enforcement is restored while the staff suspension and its reason remain.", "provenance": "proposed", "source": [ "services-membership:tests/acceptance/memberships/MBR-ACC-0174.acceptance.ts#MBR-ACC-0174: A membership is suspended over its terms and restored to whatever the terms give, once each way, with no detections while suspended and the history showing the suspension", "services-membership:modules/commerce-participant/tests/integration/participant.integration.spec.ts#suspends on a reversed payment, idempotently, and restores on resolution" ] } ]
Expected
The enforcement is restored while the staff suspension and its reason remain.
Data
An isolated workspace with the specified membership, package, chapter and partner-port fixtures.
Source
services-membership:tests/acceptance/memberships/MBR-ACC-0174.acceptance.ts#MBR-ACC-0174: A membership is suspended over its terms and restored to whatever the terms give, once each way, with no detections while suspended and the history showing the suspension,services-membership:modules/commerce-participant/tests/integration/participant.integration.spec.ts#suspends on a reversed payment, idempotently, and restores on resolution
07 State suspension and restoration alongside their writesinteractionapiproposed
Proves
BR-CAP-MBR-MEM-004-02 BR-CAP-MBR-MEM-004-03 BR-CAP-MBR-MEM-020-01
Preconditions
A principal holding is unsuspended.
Steps
[ { "do": "Suspend and restore it and inspect committed events; separately roll back a suspension.", "expect": "The committed changes have their corresponding events; the rolled-back suspension has none.", "provenance": "proposed", "source": [ "services-membership:tests/acceptance/memberships/MBR-ACC-0174.acceptance.ts#MBR-ACC-0174: A membership is suspended over its terms and restored to whatever the terms give, once each way, with no detections while suspended and the history showing the suspension", "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 committed changes have their corresponding events; the rolled-back suspension has none.
Data
An isolated workspace with the specified membership, package, chapter and partner-port fixtures.
Source
services-membership:tests/acceptance/memberships/MBR-ACC-0174.acceptance.ts#MBR-ACC-0174: A membership is suspended over its terms and restored to whatever the terms give, once each way, with no detections while suspended and the history showing the suspension,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
08 Require suspension authority for both directionspermissionapinegativetest
Proves
BR-CAP-MBR-MEM-004-01
Preconditions
A principal holding derives grace from its recorded period.
Steps
[ { "do": "Try suspension and restoration as the read-only colleague and as staff with current versions.", "expect": "The colleague is refused both operations; staff suspension returns suspended and staff restoration returns grace.", "provenance": "test", "source": "services-membership:tests/acceptance/memberships/MBR-ACC-0172.acceptance.ts" } ]
Expected
The colleague is refused both operations; staff suspension returns suspended and staff restoration returns grace.
Data
Suite-owned workspaces, annual membership fixtures, signed staff and restricted contexts.
Bound to
Source
services-membership:tests/acceptance/memberships/MBR-ACC-0172.acceptance.ts

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.