Skip to content

ATS-MBR-MEM-018See how a membership changed and what it was on any date: Capability Test Specification

Markdown

ATS-MBR-MEM-018

See how a membership changed and what it was on any date: 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-100
  • Transition gap: FND-MBR-MEM-100
  • Validation gap: FND-MBR-MEM-100
  • Permission gap: FND-MBR-MEM-100
  • Edge gap: FND-MBR-MEM-100
  • Failure covered
  • Boundary covered
  • Concurrency gap: FND-MBR-MEM-100
  • Invariant gap: FND-MBR-MEM-100
  • Interaction covered

Test Scenarios

12 scenarios proving CAP-MBR-MEM-018; 8 bound to an existing test.

01 Every committed change is one attributed revision, and caches record nothingtransitionapitest
Proves
BR-CAP-MBR-MEM-018-01 INV-DOM-MBR-MEM-006-01
Preconditions
The well-known FAA workspace fixtures, or a workspace the test builds from them.
Steps
[ { "do": "Create a membership, correct its term, change its stored status alone, and undo a change in the same save.", "expect": "One revision for the creation with its term and affiliation, one for the correction, nothing for the cache or the undone change; each names its person then and its source.", "provenance": "test", "source": [ "services-membership:modules/history/tests/integration/membership-history.integration.spec.ts#records the creation as one revision of the membership, its term and affiliation as collections", "services-membership:modules/history/tests/integration/membership-history.integration.spec.ts#names who made each change by the name they had then, and where it came from", "services-membership:modules/history/tests/integration/membership-history.integration.spec.ts#records nothing for a change of the cached status alone, nor for a change undone in the same save" ] } ]
Expected
One revision for the creation with its term and affiliation, one for the correction, nothing for the cache or the undone change; each names its person then and its source.
Data
FAA programs, packages, units and members from the integration seed.
Bound to
Source
services-membership:modules/history/tests/integration/membership-history.integration.spec.ts#records the creation as one revision of the membership, its term and affiliation as collections
02 An unattributed write is refused with its business writefailureapinegativetest
Proves
BR-CAP-MBR-MEM-018-02 INV-DOM-MBR-MEM-006-02
Preconditions
The well-known FAA workspace fixtures, or a workspace the test builds from them.
Steps
[ { "do": "Write with no source and no actor.", "expect": "Refused at commit; nothing is written.", "provenance": "test", "source": [ "services-membership:modules/history/tests/integration/membership-history.integration.spec.ts#refuses at commit a write that names no source and no actor, and the write with it (a program, which has no versions)" ] } ]
Expected
Refused at commit; nothing is written.
Data
FAA programs, packages, units and members from the integration seed.
Bound to
Source
services-membership:modules/history/tests/integration/membership-history.integration.spec.ts#refuses at commit a write that names no source and no actor, and the write with it (a program, which has no versions)
03 The timeline pages, filters and opens section by sectionruleapitest
Proves
BR-CAP-MBR-MEM-018-03
Preconditions
The well-known FAA workspace fixtures, or a workspace the test builds from them.
Steps
[ { "do": "Read a busy membership's timeline by page, by operation and by person; open one revision; list the people.", "expect": "Newest first by cursor; filters narrow it; the revision opens by section; each person listed once.", "provenance": "test", "source": [ "services-membership:modules/history/tests/integration/membership-history.integration.spec.ts#pages the timeline newest first by its sequence, the cursor continuing where a page ended", "services-membership:modules/history/tests/integration/membership-history.integration.spec.ts#filters the timeline by operation and by actor", "services-membership:modules/history/tests/integration/membership-history.integration.spec.ts#finds one revision of this record, and not another record’s revision by its id", "services-membership:modules/history/tests/integration/membership-history.integration.spec.ts#lists everyone who changed the record, once each, by their names", "services-membership:tests/e2e/history-api.e2e.spec.ts#answers the three revisions newest first: the suspension, the term correction, the creation" ] } ]
Expected
Newest first by cursor; filters narrow it; the revision opens by section; each person listed once.
Data
FAA programs, packages, units and members from the integration seed.
Bound to
Source
services-membership:modules/history/tests/integration/membership-history.integration.spec.ts#pages the timeline newest first by its sequence, the cursor continuing where a page ended
04 A term keeps its own historyinvariantapitest
Proves
BR-CAP-MBR-MEM-018-04
Preconditions
The well-known FAA workspace fixtures, or a workspace the test builds from them.
Steps
[ { "do": "Correct a term and read the term's history.", "expect": "The correction appears on the term's timeline as on the membership's terms section.", "provenance": "test", "source": [ "services-membership:modules/history/tests/integration/membership-history.integration.spec.ts#records the same correction on the term’s own history" ] } ]
Expected
The correction appears on the term's timeline as on the membership's terms section.
Data
FAA programs, packages, units and members from the integration seed.
Bound to
Source
services-membership:modules/history/tests/integration/membership-history.integration.spec.ts#records the same correction on the term’s own history
05 History needs its own keypermissionapinegativetest
Proves
BR-CAP-MBR-MEM-018-05
Preconditions
The well-known FAA workspace fixtures, or a workspace the test builds from them.
Steps
[ { "do": "A reader with membership-read but not history asks for history.", "expect": "Refused.", "provenance": "test", "source": [ "services-membership:tests/e2e/history-api.e2e.spec.ts#refuses the history to a reader of memberships who does not hold membership.memberships.history" ] } ]
Expected
Refused.
Data
FAA programs, packages, units and members from the integration seed.
Bound to
Source
services-membership:tests/e2e/history-api.e2e.spec.ts#refuses the history to a reader of memberships who does not hold membership.memberships.history
06 A past date is reconstructed with its units, fields, seats and contactruleapitest
Proves
BR-CAP-MBR-MEM-018-06
Preconditions
The well-known FAA workspace fixtures, or a workspace the test builds from them.
Steps
[ { "do": "Ask Jo as of a date in her term, with and without Committees' history, and her custom fields at the end of the date.", "expect": "Her term, type, package, status, chapters with names and ancestors then, custom fields as recorded, seats or unavailable, and the contact marked captured.", "provenance": "test", "source": [ "services-membership:modules/history/tests/integration/membership-as-of.integration.spec.ts#answers Jo’s chapters on the date with each unit’s name, parent and ancestors then", "services-membership:modules/history/tests/integration/membership-as-of.integration.spec.ts#answers the committee seats as unavailable where Committees’ versions do not exist", "services-membership:modules/history/tests/integration/membership-as-of.integration.spec.ts#answers the seats a committee appointment reader holds for the contact on the date", "services-membership:modules/history/tests/integration/membership-as-of.integration.spec.ts#answers a membership custom field as it was recorded at the end of the date", "services-membership:modules/history/tests/integration/membership-as-of.integration.spec.ts#answers the contact as it is now, said to be captured rather than reconstructed" ] } ]
Expected
Her term, type, package, status, chapters with names and ancestors then, custom fields as recorded, seats or unavailable, and the contact marked captured.
Data
FAA programs, packages, units and members from the integration seed.
Bound to
Source
services-membership:modules/history/tests/integration/membership-as-of.integration.spec.ts#answers Jo’s chapters on the date with each unit’s name, parent and ancestors then
07 Without an instant the past-date answer equals the live readinvariantapitest
Proves
BR-CAP-MBR-MEM-018-07 INV-DOM-MBR-MEM-006-04
Preconditions
The well-known FAA workspace fixtures, or a workspace the test builds from them.
Steps
[ { "do": "Read every FAA membership as of today with no instant.", "expect": "Each equals the live read.", "provenance": "test", "source": [ "services-membership:modules/history/tests/integration/membership-as-of.integration.spec.ts#answers every FAA membership as the live read does, known now and as recorded now" ] } ]
Expected
Each equals the live read.
Data
FAA programs, packages, units and members from the integration seed.
Bound to
Source
services-membership:modules/history/tests/integration/membership-as-of.integration.spec.ts#answers every FAA membership as the live read does, known now and as recorded now
08 A backdated correction shows only to readers asking after itboundaryapitest
Proves
BR-CAP-MBR-MEM-018-08
Preconditions
The well-known FAA workspace fixtures, or a workspace the test builds from them.
Steps
[ { "do": "Correct a term, then ask as known before and after the correction.", "expect": "The earlier and the corrected term respectively.", "provenance": "test", "source": [ "services-membership:modules/history/tests/integration/membership-as-of.integration.spec.ts#answers the term as it was known before the correction, with a known_at before it", "services-membership:modules/history/tests/integration/membership-as-of.integration.spec.ts#answers the corrected term with a known_at after the correction", "services-membership:tests/acceptance/history/MBR-ACC-0539.acceptance.ts#MBR-ACC-0539" ] } ]
Expected
The earlier and the corrected term respectively.
Data
FAA programs, packages, units and members from the integration seed.
Bound to
Source
services-membership:modules/history/tests/integration/membership-as-of.integration.spec.ts#answers the term as it was known before the correction, with a known_at before it
09 Preserve the pre-correction answer for earlier knowledgeinteractionapiproposed
Proves
BR-CAP-MBR-MEM-003-02 BR-CAP-MBR-MEM-018-08
Preconditions
A committed term has recorded history.
Steps
[ { "do": "Correct its start, then read the same date with recording instants before and after the correction.", "expect": "The earlier-known answer retains the first start; the later-known answer reflects the correction.", "provenance": "proposed", "source": [ "services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#keeps the old truth of a correction in the versions, recorded with the actor", "services-membership:modules/history/tests/integration/membership-as-of.integration.spec.ts#answers the term as it was known before the correction, with a known_at before it" ] } ]
Expected
The earlier-known answer retains the first start; the later-known answer reflects the correction.
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#keeps the old truth of a correction in the versions, recorded with the actor,services-membership:modules/history/tests/integration/membership-as-of.integration.spec.ts#answers the term as it was known before the correction, with a known_at before it
10 Retain child history before a parental correctioninteractionapiproposed
Proves
BR-CAP-MBR-MEM-006-07 BR-CAP-MBR-MEM-018-08
Preconditions
A mirrored child period and its source have committed versions.
Steps
[ { "do": "Correct the parent end, then reconstruct the child before and after the recording instant.", "expect": "Earlier knowledge retains the old child end and later knowledge shows the contracted end.", "provenance": "proposed", "source": [ "services-membership:modules/memberships/tests/integration/services/organization-children.integration.spec.ts#re-mirrors the children when the parent’s end is corrected: a child never outlasts the parent", "services-membership:modules/history/tests/integration/membership-as-of.integration.spec.ts#answers the term as it was known before the correction, with a known_at before it" ] } ]
Expected
Earlier knowledge retains the old child end and later knowledge shows the contracted end.
Data
An isolated workspace with the specified membership, package, chapter and partner-port fixtures.
Source
services-membership:modules/memberships/tests/integration/services/organization-children.integration.spec.ts#re-mirrors the children when the parent’s end is corrected: a child never outlasts the parent,services-membership:modules/history/tests/integration/membership-as-of.integration.spec.ts#answers the term as it was known before the correction, with a known_at before it
11 Keep history unavailable to an officer who can read the memberinteractionapiproposed
Proves
BR-CAP-MBR-MEM-015-08 BR-CAP-MBR-MEM-018-05
Preconditions
An officer can read a member through a unit-scoped grant.
Steps
[ { "do": "Read the membership, then request its history using only the officer grants.", "expect": "The member read succeeds while the staff-only history request is refused.", "provenance": "proposed", "source": [ "services-membership:tests/e2e/s07-regional-officer.e2e.spec.ts#does not reach a staff operation: terminating Jo’s term is refused before the handler", "services-membership:tests/e2e/history-api.e2e.spec.ts#refuses the history to a reader of memberships who does not hold membership.memberships.history" ] } ]
Expected
The member read succeeds while the staff-only history request is refused.
Data
An isolated workspace with the specified membership, package, chapter and partner-port fixtures.
Source
services-membership:tests/e2e/s07-regional-officer.e2e.spec.ts#does not reach a staff operation: terminating Jo’s term is refused before the handler,services-membership:tests/e2e/history-api.e2e.spec.ts#refuses the history to a reader of memberships who does not hold membership.memberships.history
12 Restate a snapshot using later recorded knowledgeinteractionapiproposed
Proves
BR-CAP-MBR-MEM-018-08 BR-CAP-MBR-MEM-019-06
Preconditions
A month has a published snapshot and one membership receives a backdated correction.
Steps
[ { "do": "Reconstruct before and after the correction, rerun at the original instant, then restate at the later instant.", "expect": "The original-instant rows reproduce; later knowledge changes only the corrected membership’s affected rows and counts.", "provenance": "proposed", "source": [ "services-membership:modules/history/tests/integration/membership-as-of.integration.spec.ts#answers the term as it was known before the correction, with a known_at before it", "services-membership:modules/snapshots/tests/integration/membership-snapshot.integration.spec.ts#writes identical member, affiliation and count rows with the original known_at" ] } ]
Expected
The original-instant rows reproduce; later knowledge changes only the corrected membership’s affected rows and counts.
Data
An isolated workspace with the specified membership, package, chapter and partner-port fixtures.
Source
services-membership:modules/history/tests/integration/membership-as-of.integration.spec.ts#answers the term as it was known before the correction, with a known_at before it,services-membership:modules/snapshots/tests/integration/membership-snapshot.integration.spec.ts#writes identical member, affiliation and count rows with the original known_at

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.