Skip to content

ATS-MBR-MEM-002Extend an existing membership through a staff term: Capability Test Specification

Markdown

ATS-MBR-MEM-002

Extend an existing membership through a staff term: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaMembershipModuleMemberships, Applications and Membership BillingRevision2

Read atservices-membership 5994c270react-console baf6dae3

Coverage

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

Test Scenarios

11 scenarios proving CAP-MBR-MEM-002; 6 bound to an existing test.

01 Refuse direct additions to organizational child membershipsvalidationapinegativeproposed
Proves
BR-CAP-MBR-MEM-002-01
Preconditions
A corporate principal membership has flow-down and assigned children.
Steps
[ { "do": "Attempt to add a staff term directly to each organizational child membership.", "expect": "Each request is rejected as a direct child write, and no additional term is saved.", "provenance": "proposed", "source": "services-membership:modules/memberships/services/operations/staff-operations.ts:refuseChild" } ]
Expected
Each request is rejected as a direct child write, and no additional term is saved.
Data
Corporate, flow-down and assigned membership fixtures with their source parent.
Source
services-membership:modules/memberships/services/operations/staff-operations.ts:refuseChild
02 Compute the next period when dates are omittedruleapitest
Proves
BR-CAP-MBR-MEM-002-02
Preconditions
An existing membership has a dated effective term and a package that continues from its end.
Steps
[ { "do": "Add another term under the continuing package without supplying start or end dates.", "expect": "The new period begins immediately after the earlier end and follows the package’s duration.", "provenance": "test", "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:tests/e2e/s01-early-renewal-type-change.e2e.spec.ts#commits the Alumni term for the next term, continuing from the Student term’s end" ] } ]
Expected
The new period begins immediately after the earlier end and follows the package’s duration.
Data
An annual continuing package and a membership with a known term end.
Bound to
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
03 Classify additions by their actual gapstransitionunittest
Proves
BR-CAP-MBR-MEM-002-03
Preconditions
Classification inputs include a first term, a contiguous term, a gap inside the window, a gap outside it and a package without a window.
Steps
[ { "do": "Classify each supplied period relative to its predecessor.", "expect": "The results are enrolment, renewal, reinstatement, rejoin and rejoin, in that order.", "provenance": "test", "source": [ "services-membership:modules/memberships/tests/unit/term-events.spec.ts#is an enrolment for the first effective term", "services-membership:modules/memberships/tests/unit/term-events.spec.ts#is a renewal for a term starting the day after the latest ended", "services-membership:modules/memberships/tests/unit/term-events.spec.ts#is a reinstatement for a term starting within the reinstatement window", "services-membership:modules/memberships/tests/unit/term-events.spec.ts#is a rejoin for a term starting after the reinstatement window (scenario 4: 437 days)", "services-membership:modules/memberships/tests/unit/term-events.spec.ts#is a rejoin for any gap when the package has no reinstatement window", "services-membership:tests/acceptance/memberships/MBR-ACC-0169.acceptance.ts#MBR-ACC-0169: A dropped member who comes back is continued inside the reinstatement window and started afresh outside it, and the event log says renewed, reinstated or rejoined by the gap" ] } ]
Expected
The results are enrolment, renewal, reinstatement, rejoin and rejoin, in that order.
Data
Local dates and reinstatement settings for each classification boundary.
Bound to
Source
services-membership:modules/memberships/tests/unit/term-events.spec.ts#is an enrolment for the first effective term
04 Retain original joining history across a long interruptioninvariantapitest
Proves
BR-CAP-MBR-MEM-002-04
Preconditions
Sam has an expired, dropped term and a program with a 60-day continuity allowance.
Steps
[ { "do": "Record his return after a 437-day gap and inspect the resulting membership.", "expect": "The original join date remains recorded and continuity contains two episodes.", "provenance": "test", "source": [ "services-membership:tests/e2e/s04-lapse-and-rejoin.e2e.spec.ts#keeps the original join date and restarts continuity at the rejoin (a gap of 437 days is more than 60)", "services-membership:tests/e2e/s04-lapse-and-rejoin.e2e.spec.ts#answers two continuity episodes" ] } ]
Expected
The original join date remains recorded and continuity contains two episodes.
Data
Sam’s original period, drop reason and returning period.
Bound to
Source
services-membership:tests/e2e/s04-lapse-and-rejoin.e2e.spec.ts#keeps the original join date and restarts continuity at the rejoin (a gap of 437 days is more than 60)
05 Keep the earlier type until a future renewal beginsinteractionapitest
Proves
BR-CAP-MBR-MEM-002-05
Preconditions
Maria has a Student period followed by an Alumni renewal beginning on 1 July 2027.
Steps
[ { "do": "Inspect the original term and read membership on 30 June and 1 July 2027.", "expect": "The original Student term is unchanged; the date-specific types are Student and Alumni respectively.", "provenance": "test", "source": [ "services-membership:tests/e2e/s01-early-renewal-type-change.e2e.spec.ts#leaves the Student term untouched and current today, with the renewal recorded as renewed", "services-membership:tests/e2e/s01-early-renewal-type-change.e2e.spec.ts#answers Student as of 30 June 2027", "services-membership:tests/e2e/s01-early-renewal-type-change.e2e.spec.ts#answers Alumni as of 1 July 2027" ] } ]
Expected
The original Student term is unchanged; the date-specific types are Student and Alumni respectively.
Data
Student and Alumni types and their annual packages.
Bound to
Source
services-membership:tests/e2e/s01-early-renewal-type-change.e2e.spec.ts#leaves the Student term untouched and current today, with the renewal recorded as renewed
06 Reject a caller without authority to add termspermissionapinegativetest
Proves
BR-CAP-MBR-MEM-002-08
Preconditions
The caller can read memberships but lacks permission to create terms.
Steps
[ { "do": "Submit a further-term request using the restricted caller.", "expect": "The API returns a forbidden response.", "provenance": "test", "source": [ "services-membership:tests/e2e/s01-early-renewal-type-change.e2e.spec.ts#refuses a term from a caller without membership.terms.create" ] } ]
Expected
The API returns a forbidden response.
Data
A readable membership and a caller without term-creation authority.
Bound to
Source
services-membership:tests/e2e/s01-early-renewal-type-change.e2e.spec.ts#refuses a term from a caller without membership.terms.create
07 Renew the source and its package grant togetherinteractionapiproposed
Proves
BR-CAP-MBR-MEM-002-02 BR-CAP-MBR-MEM-006-02
Preconditions
A person has a source term and its mirrored grant.
Steps
[ { "do": "Add an undated source renewal and inspect the granted holding.", "expect": "The renewed source has a source-linked granted period calculated for that renewal.", "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/unit/grant-plan.spec.ts#plans a granted term with the primary term’s dates for a grant same as primary" ] } ]
Expected
The renewed source has a source-linked granted period calculated for that renewal.
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/unit/grant-plan.spec.ts#plans a granted term with the primary term’s dates for a grant same as primary
08 Carry ending chapters into an undated renewalinteractionapiproposed
Proves
BR-CAP-MBR-MEM-002-02 BR-CAP-MBR-MEM-007-07
Preconditions
A principal holding has a current term with permitted chapters.
Steps
[ { "do": "Renew without a chapter list, then try a separate renewal with an empty list under a required minimum.", "expect": "Omission creates inherited chapter rows on the new term; the empty-list attempt leaves no additional term.", "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/affiliations.integration.spec.ts#writes a staff term’s chapters from its first day, the first of the type the primary" ] } ]
Expected
Omission creates inherited chapter rows on the new term; the empty-list attempt leaves no additional term.
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/affiliations.integration.spec.ts#writes a staff term’s chapters from its first day, the first of the type the primary
09 Let a pending purchase constrain a staff additioninteractionapiproposed
Proves
BR-CAP-MBR-MEM-002-02 BR-CAP-MBR-MEM-009-05
Preconditions
A member has a current term and a pending renewal reservation.
Steps
[ { "do": "Attempt a staff period overlapping the reserved dates, release the purchase reservation, and repeat the addition.", "expect": "The reserved attempt fails overlap; the released dates become available for the staff term.", "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/commerce-participant/tests/unit/eligibility.spec.ts#refuses a suspended membership" ] } ]
Expected
The reserved attempt fails overlap; the released dates become available for the staff term.
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/commerce-participant/tests/unit/eligibility.spec.ts#refuses a suspended membership
10 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
11 Require the grant for adding staff coveragepermissionapinegativetest
Proves
BR-CAP-MBR-MEM-002-02
Preconditions
A principal membership has a current annual term.
Steps
[ { "do": "Add an undated renewal as staff, repeat as the read-only colleague, then read the term count.", "expect": "Staff adds one term; the colleague receives a missing-permission refusal and the holding has exactly two terms.", "provenance": "test", "source": "services-membership:tests/acceptance/memberships/MBR-ACC-0172.acceptance.ts" } ]
Expected
Staff adds one term; the colleague receives a missing-permission refusal and the holding has exactly two terms.
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.