Skip to content

ATS-MBR-STR-016Interpret membership status and continuity by date: Acceptance Test Set

Markdown

ATS-MBR-STR-016

Interpret membership status and continuity by date: Acceptance Test Set

Markdown
  • DocumentProposed

Planning

Proves capability
CAP-MBR-STR-016

KindAcceptance test setProduct areaMembershipModuleOrganizational Structure, Membership Configuration and TermsRevision1

Read atservices-membership 5994c270react-console baf6dae3

Test Scenarios

9 scenarios proving CAP-MBR-STR-016; 9 bound to an existing test.

01 Competing status conditions use precedenceunittest
Proves
BR-CAP-MBR-STR-016-01
Preconditions
Explicit inputs or a recording fixture represent the cases exercised below.
Steps
Evaluate suspension during grace, a covering renewal, grace before a future term and future alongside pending.
Expected
Each result selects the applicable higher-priority standing.
Data
Literal term, state or declaration fixtures for the described cases.
Bound to
services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the precedence of §2 › puts suspended over grace
services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the precedence of §2 › puts active over grace: a renewal that started covers the date though the previous term ended
services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the precedence of §2 › puts grace over future: a lapsed term ended recently and the next starts later
services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the precedence of §2 › puts future over pending
services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the precedence of §2 › puts pending over none: a cancelled term and a pending one
services-membership:modules/terms/tests/unit/define-term-engine.spec.ts#defineTermEngine › derives the status with the holding’s grace days from the hook
Source
services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the precedence of §2 › puts suspended over grace
02 Only effective states contribute coverageunittest
Proves
BR-CAP-MBR-STR-016-02
Preconditions
Explicit inputs or a recording fixture represent the cases exercised below.
Steps
Evaluate pending, cancelled and terminated periods over their dates.
Expected
Pending and cancelled periods supply no effective coverage; terminated periods retain their covered days.
Data
Literal term, state or declaration fixtures for the described cases.
Bound to
services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the effective states of §1 › never lets a pending term cover a date
services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the effective states of §1 › never lets a cancelled term cover a date
services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the effective states of §1 › never measures grace from a cancelled term
services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the effective states of §1 › answers a terminated term for the days it covered
Source
services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the effective states of §1 › never lets a pending term cover a date
03 Grace boundaries use the deciding classificationunittest
Proves
BR-CAP-MBR-STR-016-03 AS-JNY-MBR-STR-005-01
Preconditions
Explicit inputs or a recording fixture represent the cases exercised below.
Steps
Evaluate the last grace day, its successor and a type-specific override.
Expected
The boundary returns grace, its successor returns lapse and the override supplies the allowance.
Data
Literal term, state or declaration fixtures for the described cases.
Bound to
services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the rows of §2 › is in grace on the last day of grace (D = E + grace_days)
services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the rows of §2 › is lapsed the day after grace ends
services-membership:modules/terms/tests/unit/holding-cache.spec.ts#the holding cache › names no current term in grace, measured with the grace of the term that ended
services-membership:tests/e2e/s04-lapse-and-rejoin.e2e.spec.ts#scenario 4: lapse, drop and rejoin through a staff term › answers grace the day after the term ended and lapsed once the 60 days are over
Source
services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the rows of §2 › is in grace on the last day of grace (D = E + grace_days)
04 Covering periods can omit benefitsunittest
Proves
BR-CAP-MBR-STR-016-04
Preconditions
Explicit inputs or a recording fixture represent the cases exercised below.
Steps
Evaluate a holding with an effective no-benefit classification.
Expected
The result is active without benefits.
Data
Literal term, state or declaration fixtures for the described cases.
Bound to
services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the rows of §2 › is active without benefits when the covering term’s classification confers none
services-membership:modules/terms/tests/unit/holding-cache.spec.ts#the holding cache › caches active without benefits for a covering term whose classification confers none
Source
services-membership:modules/terms/tests/unit/status.spec.ts#holding status: the rows of §2 › is active without benefits when the covering term’s classification confers none
05 Continuity breaks beyond the allowed gapunittest
Proves
BR-CAP-MBR-STR-016-05 AS-JNY-MBR-STR-005-03
Preconditions
Explicit inputs or a recording fixture represent the cases exercised below.
Steps
Compare effective periods separated by the allowance and by one additional day.
Expected
The allowed gap stays within an episode and the larger gap begins a new episode.
Data
Literal term, state or declaration fixtures for the described cases.
Bound to
services-membership:modules/terms/tests/unit/status.spec.ts#continuity episodes: §8 › keeps the run when the gap equals the allowance (starts_on = ends_on + gap + 1)
services-membership:modules/terms/tests/unit/status.spec.ts#continuity episodes: §8 › breaks the run when the gap is one day more than the allowance
services-membership:modules/terms/tests/unit/status.spec.ts#continuity episodes: §8 › gives continuous_since as the start of the run the date falls in
services-membership:tests/e2e/s04-lapse-and-rejoin.e2e.spec.ts#scenario 4: lapse, drop and rejoin through a staff term › answers two continuity episodes
Source
services-membership:modules/terms/tests/unit/status.spec.ts#continuity episodes: §8 › keeps the run when the gap equals the allowance (starts_on = ends_on + gap + 1)
06 Join-date selection ignores ineffective periodsunittest
Proves
BR-CAP-MBR-STR-016-06
Preconditions
Explicit inputs or a recording fixture represent the cases exercised below.
Steps
Calculate the first join decision with pending, cancelled and effective terms, then add a later effective term.
Expected
The earliest effective start remains the computed join date.
Data
Literal term, state or declaration fixtures for the described cases.
Bound to
services-membership:modules/terms/tests/unit/holding-cache.spec.ts#the holding cache › takes the join date from the first effective term, a pending or cancelled one never
services-membership:tests/e2e/s04-lapse-and-rejoin.e2e.spec.ts#scenario 4: lapse, drop and rejoin through a staff term › keeps the original join date and restarts continuity at the rejoin (a gap of 437 days is more than 60)
Source
services-membership:modules/terms/tests/unit/holding-cache.spec.ts#the holding cache › takes the join date from the first effective term, a pending or cancelled one never
07 Sweep planning detects missing prior workunittest
Proves
BR-CAP-MBR-STR-016-07
Preconditions
Explicit inputs or a recording fixture represent the cases exercised below.
Steps
Compare a previous-day sweep, a missed night and no previous sweep.
Expected
Normal work selects boundaries and the other cases request full recomputation.
Data
Literal term, state or declaration fixtures for the described cases.
Bound to
services-membership:modules/terms/tests/unit/sweep.spec.ts#the sweep’s boundaries › looks at the terms starting on D
services-membership:modules/terms/tests/unit/sweep.spec.ts#the sweep’s boundaries › looks, for each grace configured, at the terms whose grace ended on D - 1
services-membership:modules/terms/tests/unit/sweep.spec.ts#the sweep’s catch-up rule › catches up after a missed night
services-membership:modules/terms/tests/unit/sweep.spec.ts#the sweep’s catch-up rule › catches up for a tenant never swept
Source
services-membership:modules/terms/tests/unit/sweep.spec.ts#the sweep’s boundaries › looks at the terms starting on D
08 Sweep detections distinguish boundaries and suppressionunittest
Proves
BR-CAP-MBR-STR-016-08
Preconditions
Explicit inputs or a recording fixture represent the cases exercised below.
Steps
Evaluate expiry, the last grace day, the first lapsed day and suspension.
Expected
Expiry is detectable after ending, lapse begins after grace, and suspension suppresses detections.
Data
Literal term, state or declaration fixtures for the described cases.
Bound to
services-membership:modules/terms/tests/unit/sweep.spec.ts#the sweep’s detections › detects the expiry the day after the end, effective that day
services-membership:modules/terms/tests/unit/sweep.spec.ts#the sweep’s detections › detects no lapse on the last day of grace
services-membership:modules/terms/tests/unit/sweep.spec.ts#the sweep’s detections › detects the lapse the day after grace ends, effective that day, with the expiry
services-membership:modules/terms/tests/unit/sweep.spec.ts#the sweep’s detections › detects nothing for a suspended holding
Source
services-membership:modules/terms/tests/unit/sweep.spec.ts#the sweep’s detections › detects the expiry the day after the end, effective that day
09 Column declarations constrain dates and vocabularyunitnegativetest
Proves
BR-CAP-MBR-STR-016-11
Preconditions
Explicit inputs or a recording fixture represent the cases exercised below.
Steps
Inspect generated term and holding columns and their check expressions.
Expected
The declarations restrict date order, term states and cached status values.
Data
Literal term, state or declaration fixtures for the described cases.
Bound to
services-membership:modules/terms/tests/unit/columns.spec.ts#term columns (§3.2) › order the dates: an end, when there is one, on or after the start
services-membership:modules/terms/tests/unit/columns.spec.ts#term columns (§3.2) › close the state to the five states of 04-lifecycle §1
services-membership:modules/terms/tests/unit/columns.spec.ts#holding columns (§3.1) › close the status cache to the eight statuses of 04-lifecycle §2
Source
services-membership:modules/terms/tests/unit/columns.spec.ts#term columns (§3.2) › order the dates: an end, when there is one, on or after the start

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.