Skip to content

ATS-MBR-MEM-002Extend an existing membership through a staff term: Acceptance Test Set

Markdown

ATS-MBR-MEM-002

Extend an existing membership through a staff term: Acceptance Test Set

Markdown
  • DocumentProposed

Planning

Proves capability
CAP-MBR-MEM-002

KindAcceptance test setProduct areaMembershipModuleMemberships, Applications and Membership BillingRevision1

Read atservices-membership 5994c270react-console baf6dae3

Test Scenarios

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

01 Refuse direct additions to organizational child membershipsapinegativeproposed
Proves
BR-CAP-MBR-MEM-002-01
Preconditions
A corporate principal membership has flow-down and assigned children.
Steps
Attempt to add a staff term directly to each organizational child membership.
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 omittedapitest
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
Add another term under the continuing package without supplying start or end dates.
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
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
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 gapsunittest
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
Classify each supplied period relative to its predecessor.
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
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
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 interruptionapitest
Proves
BR-CAP-MBR-MEM-002-04
Preconditions
Sam has an expired, dropped term and a program with a 60-day continuity allowance.
Steps
Record his return after a 437-day gap and inspect the resulting membership.
Expected
The original join date remains recorded and continuity contains two episodes.
Data
Sam’s original period, drop reason and returning period.
Bound to
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)
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 beginsapitest
Proves
BR-CAP-MBR-MEM-002-05
Preconditions
Maria has a Student period followed by an Alumni renewal beginning on 1 July 2027.
Steps
Inspect the original term and read membership on 30 June and 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
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
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 termsapinegativetest
Proves
BR-CAP-MBR-MEM-002-08
Preconditions
The caller can read memberships but lacks permission to create terms.
Steps
Submit a further-term request using the restricted caller.
Expected
The API returns a forbidden response.
Data
A readable membership and a caller without term-creation authority.
Bound to
services-membership:tests/e2e/s01-early-renewal-type-change.e2e.spec.ts#refuses a term from a caller without membership.terms.create
Source
services-membership:tests/e2e/s01-early-renewal-type-change.e2e.spec.ts#refuses a term from a caller without membership.terms.create

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.