Skip to content

ATS-MBR-MEM-005Determine membership standing and refresh list status: Acceptance Test Set

Markdown

ATS-MBR-MEM-005

Determine membership standing and refresh list status: Acceptance Test Set

Markdown
  • DocumentProposed

Planning

Proves capability
CAP-MBR-MEM-005

KindAcceptance test setProduct areaMembershipModuleMemberships, Applications and Membership BillingRevision1

Read atservices-membership 5994c270react-console baf6dae3

Test Scenarios

9 scenarios proving CAP-MBR-MEM-005; 9 bound to an existing test.

01 Read standing across expiry and returnapitest
Proves
BR-CAP-MBR-MEM-005-01
Preconditions
Sam has coverage separated by a lapse and a returning term.
Steps
Read Sam’s standing on dates during grace, during lapse and after his return.
Expected
Grace follows expiry, lapse follows the 60-day allowance, and return coverage is active.
Data
Dated memberships, program and type settings, and the controlled clock or listing fixtures relevant to this case.
Bound to
services-membership:modules/memberships/tests/integration/db/membership-functions.integration.spec.ts#answers Sam grace, lapsed, then active across the lapse and rejoin (scenario 4)
services-membership:modules/memberships/tests/integration/db/membership-functions.integration.spec.ts#answers Sam lapsed, not a member, on 2024-01-31 and active on 2024-12-31 in memberships_as_of
services-membership:tests/e2e/s04-lapse-and-rejoin.e2e.spec.ts#answers grace the day after the term ended and lapsed once the 60 days are over
Source
services-membership:modules/memberships/tests/integration/db/membership-functions.integration.spec.ts#answers Sam grace, lapsed, then active across the lapse and rejoin (scenario 4)
02 Distinguish the full range of membership standingapitest
Proves
BR-CAP-MBR-MEM-005-02
Preconditions
Fixtures include empty, pending, future, current, non-benefit, grace, lapsed and suspended memberships.
Steps
Inspect each fixture’s derived standing and compare the non-benefit type’s result.
Expected
The fixtures return their expected standing, including active without benefits for the non-benefit type.
Data
Dated memberships, program and type settings, and the controlled clock or listing fixtures relevant to this case.
Bound to
services-membership:tests/acceptance/memberships/MBR-ACC-0179.acceptance.ts#MBR-ACC-0179: Every status the engine can answer, from the terms and the type's or program's grace: none, pending, future, active, active without benefits, grace, lapsed and suspended, with the same answer from the SQL twins
Source
services-membership:tests/acceptance/memberships/MBR-ACC-0179.acceptance.ts#MBR-ACC-0179: Every status the engine can answer, from the terms and the type's or program's grace: none, pending, future, active, active without benefits, grace, lapsed and suspended, with the same answer from the SQL twins
03 Read current truth despite a stale cacheapitest
Proves
BR-CAP-MBR-MEM-005-03
Preconditions
The clock has crossed expiry while saved status still reflects an earlier date.
Steps
Read the record before refreshing, then compare cached-status and current-status lists.
Expected
The record reflects expiry before a sweep; cached filtering can lag behind current filtering.
Data
Dated memberships, program and type settings, and the controlled clock or listing fixtures relevant to this case.
Bound to
services-membership:modules/memberships/tests/integration/services/status-sweep.integration.spec.ts#answers the right status on each side of the expiry before any sweep runs (the resolver needs none)
services-membership:tests/acceptance/memberships/MBR-ACC-0178.acceptance.ts#MBR-ACC-0178: When the nightly sweep is missed the cached status lies but the record's status does not, lists filtered by the cache disagree with lists filtered by today's status, and only a catch-up repairs it
Source
services-membership:modules/memberships/tests/integration/services/status-sweep.integration.spec.ts#answers the right status on each side of the expiry before any sweep runs (the resolver needs none)
04 Refresh the memberships at a normal nightly boundaryapitest
Proves
BR-CAP-MBR-MEM-005-04
Preconditions
The previous sweep ran yesterday and one membership reaches an expiry boundary tonight.
Steps
Run the boundary sweep and inspect the examined count and refreshed status.
Expected
The boundary member is examined and refreshed to grace while mid-period memberships are omitted.
Data
Dated memberships, program and type settings, and the controlled clock or listing fixtures relevant to this case.
Bound to
services-membership:modules/memberships/tests/integration/services/status-sweep.integration.spec.ts#moves the cache to grace at the expiry boundary and records expired_detected
Source
services-membership:modules/memberships/tests/integration/services/status-sweep.integration.spec.ts#examines only the memberships with a term at a boundary
05 Record actual expiry and lapse dates onceapitest
Proves
BR-CAP-MBR-MEM-005-05
Preconditions
A dated period crosses expiry and grace-end boundaries, including a delayed sweep.
Steps
Sweep through expiry and repeat the day, then discover a lapse after its boundary.
Expected
Expiry retains the day after the term end; late lapse retains the day after grace, without duplicate detections.
Data
Dated memberships, program and type settings, and the controlled clock or listing fixtures relevant to this case.
Bound to
services-membership:modules/memberships/tests/integration/services/status-sweep.integration.spec.ts#records lapsed_detected effective the day after grace ended, even when found late
services-membership:modules/memberships/tests/integration/services/status-sweep.integration.spec.ts#moves the cache to grace at the expiry boundary and records expired_detected
Source
services-membership:modules/memberships/tests/integration/services/status-sweep.integration.spec.ts#records lapsed_detected effective the day after grace ended, even when found late
06 Catch up over the workspace after a missed runapitest
Proves
BR-CAP-MBR-MEM-005-06
Preconditions
The previous recorded run predates yesterday.
Steps
Run the next sweep and inspect its mode and every membership examined.
Expected
Catch-up examines all workspace memberships.
Data
Dated memberships, program and type settings, and the controlled clock or listing fixtures relevant to this case.
Bound to
Source
services-membership:modules/memberships/tests/integration/services/status-sweep.integration.spec.ts#catches up after a missed night, recomputing every membership
07 Repeat a sweep without duplicate detectionsapitest
Proves
BR-CAP-MBR-MEM-005-07
Preconditions
An administrator has run today’s sweep once.
Steps
Repeat today’s on-demand sweep and inspect detection counts.
Expected
The repeat adds no new detections.
Data
Dated memberships, program and type settings, and the controlled clock or listing fixtures relevant to this case.
Bound to
services-membership:tests/acceptance/memberships/MBR-ACC-0177.acceptance.ts#MBR-ACC-0177: An administrator runs the status sweep by hand: the first run catches up over every membership, later runs look only at today's boundaries, nothing is detected twice, and a cache-only change leaves no visible history
Source
services-membership:modules/memberships/tests/integration/services/status-sweep.integration.spec.ts#records nothing twice when the same night is swept again
08 Inspect joining history and continuity episodesapitest
Proves
BR-CAP-MBR-MEM-005-09
Preconditions
Sam’s returning term follows a gap longer than the continuity allowance.
Steps
Read the original join date and episode periods after the returning term.
Expected
The original join date is retained and two continuity episodes are returned.
Data
Dated memberships, program and type settings, and the controlled clock or listing fixtures relevant to this case.
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:modules/memberships/tests/integration/db/membership-functions.integration.spec.ts#answers Sam two continuity episodes (scenario 4)
09 Filter and page membership lists without duplicate unit matchesapitest
Proves
BR-CAP-MBR-MEM-005-10
Preconditions
A member belongs to multiple chapters under the same ancestor, with status and pagination fixtures.
Steps
List through ancestor and chapter filters, compare current and saved status, and exercise paging and malformed filters.
Expected
Each matching membership appears once per result set; paging follows id order and invalid filters are rejected by name.
Data
Dated memberships, program and type settings, and the controlled clock or listing fixtures relevant to this case.
Bound to
services-membership:modules/memberships/tests/integration/services/affiliations.integration.spec.ts#lists a member of two chapters once under their zone and region, and under each chapter
services-membership:tests/acceptance/memberships/MBR-ACC-0185.acceptance.ts#MBR-ACC-0185: Lists page by id in creation order with an opaque cursor, cap the page at 500, refuse a malformed limit, cursor, status, flag or date by name, and never silently ignore a parameter
services-membership:tests/acceptance/memberships/MBR-ACC-0178.acceptance.ts#MBR-ACC-0178: When the nightly sweep is missed the cached status lies but the record's status does not, lists filtered by the cache disagree with lists filtered by today's status, and only a catch-up repairs it
Source
services-membership:modules/memberships/tests/integration/services/affiliations.integration.spec.ts#lists a member of two chapters once under their zone and region, and under each chapter

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.