Skip to content

ATS-MBR-MEM-007Maintain dated chapter and section affiliations: Capability Test Specification

Markdown

ATS-MBR-MEM-007

Maintain dated chapter and section affiliations: 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-089
  • Transition gap: FND-MBR-MEM-089
  • Validation covered
  • Permission gap: FND-MBR-MEM-089
  • Edge gap: FND-MBR-MEM-089
  • Failure gap: FND-MBR-MEM-089
  • Boundary covered
  • Concurrency covered
  • Invariant gap: FND-MBR-MEM-089
  • Interaction covered

Test Scenarios

18 scenarios proving CAP-MBR-MEM-007; 12 bound to an existing test.

01 Refuse affiliations outside affiliation-bound programsvalidationapinegativetest
Proves
BR-CAP-MBR-MEM-007-01
Preconditions
An identity-bound program has a membership term.
Steps
[ { "do": "Name units during term creation and later attempt a direct addition.", "expect": "Creation and addition are refused, and no affiliation is saved.", "provenance": "test", "source": [ "services-membership:tests/acceptance/affiliations/MBR-ACC-0263.acceptance.ts#MBR-ACC-0263: Ending a member's only chapter is refused, a cancelled term's chapters cannot be touched, and a program that does not bind by affiliation refuses chapters twice over" ] } ]
Expected
Creation and addition are refused, and no affiliation is saved.
Data
Membership terms, dated affiliation rows, unit settings and operation-specific callers or connections.
Bound to
Source
services-membership:tests/acceptance/affiliations/MBR-ACC-0263.acceptance.ts#MBR-ACC-0263: Ending a member's only chapter is refused, a cancelled term's chapters cannot be touched, and a program that does not bind by affiliation refuses chapters twice over
02 Refuse inactive or disallowed unit selectionsvalidationapinegativetest
Proves
BR-CAP-MBR-MEM-007-02
Preconditions
The structure includes a region, inactive chapter and disallowed unit type.
Steps
[ { "do": "Attempt additions for each ineligible unit and inspect retained valid rows.", "expect": "Each invalid selection is refused; valid existing affiliations remain.", "provenance": "test", "source": [ "services-membership:modules/memberships/tests/integration/services/affiliations.integration.spec.ts#refuses a unit whose type takes no member affiliation (a region)", "services-membership:tests/acceptance/affiliations/MBR-ACC-0262.acceptance.ts#MBR-ACC-0262: A coordinator's wrong additions are each refused with the rule's own code and the valid chapters already added are kept" ] } ]
Expected
Each invalid selection is refused; valid existing affiliations remain.
Data
Membership terms, dated affiliation rows, unit settings and operation-specific callers or connections.
Bound to
Source
services-membership:modules/memberships/tests/integration/services/affiliations.integration.spec.ts#refuses a unit whose type takes no member affiliation (a region)
03 Enforce effective minimum and maximum countsboundaryapinegativetest
Proves
BR-CAP-MBR-MEM-007-03
Preconditions
Regular requires a chapter; Student permits only one.
Steps
[ { "do": "Create with no required chapter, add beyond a maximum, end the sole required chapter, then end one of two.", "expect": "Minimum and maximum violations fail; removing one of two permitted chapters succeeds.", "provenance": "test", "source": [ "services-membership:modules/memberships/tests/unit/unit-rules.spec.ts#refuses fewer affiliations of a type than its minimum from the day the operation takes effect", "services-membership:modules/memberships/tests/unit/unit-rules.spec.ts#refuses more affiliations of a type on a day than its maximum", "services-membership:modules/memberships/tests/unit/unit-rules.spec.ts#leaves a shortfall before the operation’s day alone", "services-membership:modules/memberships/tests/integration/services/affiliations.integration.spec.ts#refuses a Regular term with no chapter: the package needs one (unit_minimum)", "services-membership:modules/memberships/tests/integration/services/affiliations.integration.spec.ts#refuses a second chapter on a Student term: the package allows one (unit_maximum)", "services-membership:modules/memberships/tests/integration/services/affiliations.integration.spec.ts#refuses to end a Regular term’s only chapter (unit_minimum), and ends one of two" ] } ]
Expected
Minimum and maximum violations fail; removing one of two permitted chapters succeeds.
Data
Membership terms, dated affiliation rows, unit settings and operation-specific callers or connections.
Bound to
Source
services-membership:modules/memberships/tests/unit/unit-rules.spec.ts#refuses fewer affiliations of a type than its minimum from the day the operation takes effect
04 Limit simultaneous primary designationsinvariantunitnegativetest
Proves
BR-CAP-MBR-MEM-007-04 INV-DOM-MBR-MEM-003-06
Preconditions
Two overlapping rows share a unit type with configurable multiple-primary allowance.
Steps
[ { "do": "Validate the overlapping primary set with the allowance disabled and enabled.", "expect": "A primary conflict is reported when multiple primaries are forbidden, and the enabled allowance accepts the set.", "provenance": "test", "source": [ "services-membership:modules/memberships/tests/unit/unit-rules.spec.ts#refuses two primaries of one type on a day unless the type allows several" ] } ]
Expected
A primary conflict is reported when multiple primaries are forbidden, and the enabled allowance accepts the set.
Data
Membership terms, dated affiliation rows, unit settings and operation-specific callers or connections.
Bound to
Source
services-membership:modules/memberships/tests/unit/unit-rules.spec.ts#refuses two primaries of one type on a day unless the type allows several
05 Reject overlapping ties to the same unitinvariantapinegativetest
Proves
BR-CAP-MBR-MEM-007-05 INV-DOM-MBR-MEM-003-04
Preconditions
The term already holds a chapter for the requested period.
Steps
[ { "do": "Attempt to add the existing chapter over overlapping dates.", "expect": "The request reports affiliation overlap without saving another tie.", "provenance": "test", "source": [ "services-membership:modules/memberships/tests/integration/services/affiliations.integration.spec.ts#refuses the same unit twice on a day of a term (affiliation_overlap)" ] } ]
Expected
The request reports affiliation overlap without saving another tie.
Data
Membership terms, dated affiliation rows, unit settings and operation-specific callers or connections.
Bound to
Source
services-membership:modules/memberships/tests/integration/services/affiliations.integration.spec.ts#refuses the same unit twice on a day of a term (affiliation_overlap)
06 Route dues-bearing changes through an amendmentinteractionapinegativetest
Proves
BR-CAP-MBR-MEM-007-06
Preconditions
Some chapters have package-specific or catch-all dues products, while another has none.
Steps
[ { "do": "Request dues-bearing additions, then add the chapter without dues.", "expect": "Dues-bearing requests identify the amendment requirement; the no-dues addition succeeds beside the existing primary.", "provenance": "test", "source": [ "services-membership:modules/memberships/tests/integration/services/affiliations.integration.spec.ts#refuses to add a chapter that sells dues for the package, naming the Commerce amendment (requires_amendment)", "services-membership:modules/memberships/tests/integration/services/affiliations.integration.spec.ts#adds a chapter that sells no dues from today, not primary beside the term’s primary", "services-membership:tests/acceptance/affiliations/MBR-ACC-0266.acceptance.ts#MBR-ACC-0266: A chapter that charges dues for the member's package cannot be added or moved into from the console, until its dues product is switched off" ] } ]
Expected
Dues-bearing requests identify the amendment requirement; the no-dues addition succeeds beside the existing primary.
Data
Membership terms, dated affiliation rows, unit settings and operation-specific callers or connections.
Bound to
Source
services-membership:modules/memberships/tests/integration/services/affiliations.integration.spec.ts#refuses to add a chapter that sells dues for the package, naming the Commerce amendment (requires_amendment)
07 Distinguish omitted renewal ties from an empty listinteractionapitest
Proves
BR-CAP-MBR-MEM-007-07
Preconditions
A Regular term holds Atlanta and Savannah and the next package still requires a chapter.
Steps
[ { "do": "Create the first term with named units, renew without affiliations, and separately renew with an explicit empty list.", "expect": "The first period has its named units; omission inherits them; an empty list fails the package minimum and saves no new term.", "provenance": "test", "source": [ "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", "services-membership:modules/memberships/tests/integration/services/affiliations.integration.spec.ts#carries the previous term’s chapters into a staff renewal that names none, as inherited", "services-membership:tests/acceptance/affiliations/MBR-ACC-0271.acceptance.ts#MBR-ACC-0271: A staff renewal carries Jo's chapters into the new term, a renewal with an empty list carries nothing, and corrections and terminations keep every row inside its term" ] } ]
Expected
The first period has its named units; omission inherits them; an empty list fails the package minimum and saves no new term.
Data
Membership terms, dated affiliation rows, unit settings and operation-specific callers or connections.
Bound to
Source
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
08 End or withdraw a row while preserving transfer lineagetransitionapitest
Proves
BR-CAP-MBR-MEM-007-08
Preconditions
The fixture includes an ordinary row, a never-started row and a transferred row with a continuation.
Steps
[ { "do": "Shorten an ordinary row, withdraw a never-started row, and attempt withdrawal of the continued row.", "expect": "Ending retains its shortened row; withdrawal removes the unused row; the continued row remains and the refusal identifies its continuation.", "provenance": "test", "source": [ "services-membership:modules/memberships/tests/integration/services/affiliation-withdrawal-continued.integration.spec.ts#refuses to withdraw the continued row, naming the affiliation that continues it, and keeps the row", "services-membership:modules/memberships/tests/integration/services/affiliation-withdrawal-continued.integration.spec.ts#still ends the continued row on a day it held", "services-membership:tests/acceptance/affiliations/MBR-ACC-0264.acceptance.ts#MBR-ACC-0264: Withdrawing a chapter that never held deletes the row but the versions keep it; an end must shorten; the reason on an end is accepted and lost" ] } ]
Expected
Ending retains its shortened row; withdrawal removes the unused row; the continued row remains and the refusal identifies its continuation.
Data
Membership terms, dated affiliation rows, unit settings and operation-specific callers or connections.
Bound to
Source
services-membership:modules/memberships/tests/integration/services/affiliation-withdrawal-continued.integration.spec.ts#refuses to withdraw the continued row, naming the affiliation that continues it, and keeps the row
09 Move primary designation across overlapping rowstransitionapitest
Proves
BR-CAP-MBR-MEM-007-09
Preconditions
Atlanta and Savannah overlap on one term, with Atlanta currently primary.
Steps
[ { "do": "Make Savannah primary and inspect both rows’ complete spans.", "expect": "Savannah becomes primary and the overlapping Atlanta row loses its flag for its whole span.", "provenance": "test", "source": [ "services-membership:modules/memberships/tests/integration/services/affiliations.integration.spec.ts#makes an affiliation the primary of its type and the other one no longer" ] } ]
Expected
Savannah becomes primary and the overlapping Atlanta row loses its flag for its whole span.
Data
Membership terms, dated affiliation rows, unit settings and operation-specific callers or connections.
Bound to
Source
services-membership:modules/memberships/tests/integration/services/affiliations.integration.spec.ts#makes an affiliation the primary of its type and the other one no longer
10 Reject an outdated affiliation versionconcurrencyapinegativetest
Proves
BR-CAP-MBR-MEM-007-10
Preconditions
An affiliation row has changed since the caller read it.
Steps
[ { "do": "Submit an ending or primary change with the older row version.", "expect": "The request reports a version mismatch and does not overwrite the current row.", "provenance": "test", "source": [ "services-membership:modules/memberships/tests/integration/services/affiliations.integration.spec.ts#refuses an affiliation change read at an older version (version_mismatch)" ] } ]
Expected
The request reports a version mismatch and does not overwrite the current row.
Data
Membership terms, dated affiliation rows, unit settings and operation-specific callers or connections.
Bound to
Source
services-membership:modules/memberships/tests/integration/services/affiliations.integration.spec.ts#refuses an affiliation change read at an older version (version_mismatch)
11 Serialize affiliation selection against unit mergingconcurrencyapitest
Proves
BR-CAP-MBR-MEM-007-11
Preconditions
Two database connections operate on the same active unit.
Steps
[ { "do": "Hold the unit’s merge lock while adding; separately hold its affiliation share lock while requesting the merge lock.", "expect": "The add blocks and rejects the committed merged status; the merge lock blocks while the share lock is held.", "provenance": "test", "source": [ "services-membership:modules/memberships/tests/integration/services/affiliation-add-concurrency.integration.spec.ts#waits for a merge in flight and is then refused, because the unit it read is merged", "services-membership:modules/memberships/tests/integration/services/affiliation-add-concurrency.integration.spec.ts#makes a merge wait for an add in flight, so the merge’s plan sees the add committed" ] } ]
Expected
The add blocks and rejects the committed merged status; the merge lock blocks while the share lock is held.
Data
Membership terms, dated affiliation rows, unit settings and operation-specific callers or connections.
Bound to
Source
services-membership:modules/memberships/tests/integration/services/affiliation-add-concurrency.integration.spec.ts#waits for a merge in flight and is then refused, because the unit it read is merged
12 Return each member once in chapter and ancestor rostersinteractionapitest
Proves
BR-CAP-MBR-MEM-007-12
Preconditions
Jo holds chapter affiliations to Atlanta and Savannah within one hierarchy.
Steps
[ { "do": "Read each chapter, its ancestors with descendants, the ancestor without descendants and the unrelated Western Region.", "expect": "Chapter and ancestor results include Jo once; an ancestor’s own roster without descendants and the Western Region exclude her.", "provenance": "test", "source": [ "services-membership:tests/e2e/s05-multiple-chapters.e2e.spec.ts#returns Jo in the Atlanta and in the Savannah roster", "services-membership:tests/e2e/s05-multiple-chapters.e2e.spec.ts#returns Jo once in the Southeast Zone, Eastern Region and National rosters", "services-membership:tests/e2e/s05-multiple-chapters.e2e.spec.ts#stores no affiliation above a chapter: the zone’s own roster, without its descendants, has no Jo", "services-membership:tests/e2e/s05-multiple-chapters.e2e.spec.ts#returns Jo in no roster of the Western Region" ] } ]
Expected
Chapter and ancestor results include Jo once; an ancestor’s own roster without descendants and the Western Region exclude her.
Data
Membership terms, dated affiliation rows, unit settings and operation-specific callers or connections.
Bound to
Source
services-membership:tests/e2e/s05-multiple-chapters.e2e.spec.ts#returns Jo in the Atlanta and in the Savannah roster
13 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
14 Keep child chapter coverage inside mirrored periodsinteractionapiproposed
Proves
BR-CAP-MBR-MEM-006-07 BR-CAP-MBR-MEM-007-03
Preconditions
A child mirrors an organizational period and has allowed chapter connections.
Steps
[ { "do": "Shorten the parental period, then inspect the child period and its dated chapter answer.", "expect": "Child coverage contracts with its source and no chapter answer extends beyond the contracted child period.", "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/memberships/tests/unit/unit-rules.spec.ts#refuses fewer affiliations of a type than its minimum from the day the operation takes effect" ] } ]
Expected
Child coverage contracts with its source and no chapter answer extends beyond the contracted child period.
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/memberships/tests/unit/unit-rules.spec.ts#refuses fewer affiliations of a type than its minimum from the day the operation takes effect
15 Protect transfer lineage when ending its predecessorinteractionapiproposed
Proves
BR-CAP-MBR-MEM-007-08 BR-CAP-MBR-MEM-008-01
Preconditions
An affiliation has a successor created by transfer.
Steps
[ { "do": "Attempt to withdraw the predecessor, then end it on a day it held.", "expect": "Withdrawal is refused naming the successor; an allowed end preserves the lineage.", "provenance": "proposed", "source": [ "services-membership:modules/memberships/tests/integration/services/affiliation-withdrawal-continued.integration.spec.ts#refuses to withdraw the continued row, naming the affiliation that continues it, and keeps the row", "services-membership:modules/memberships/tests/integration/services/affiliations.integration.spec.ts#transfers to a chapter that sells no dues: the old row ends the day before, the new one continues it as primary" ] } ]
Expected
Withdrawal is refused naming the successor; an allowed end preserves the lineage.
Data
An isolated workspace with the specified membership, package, chapter and partner-port fixtures.
Source
services-membership:modules/memberships/tests/integration/services/affiliation-withdrawal-continued.integration.spec.ts#refuses to withdraw the continued row, naming the affiliation that continues it, and keeps the row,services-membership:modules/memberships/tests/integration/services/affiliations.integration.spec.ts#transfers to a chapter that sells no dues: the old row ends the day before, the new one continues it as primary
16 Make selected chapter dues part of the checkout planinteractionapiproposed
Proves
BR-CAP-MBR-MEM-007-06 BR-CAP-MBR-MEM-009-07
Preconditions
A package permits a chapter that sells dues.
Steps
[ { "do": "Prepare the package without its selected chapter dues line, then include the dues line and fulfil the placed purchase.", "expect": "The incomplete checkout is refused; the completed checkout creates the paid chapter affiliation.", "provenance": "proposed", "source": [ "services-membership:modules/memberships/tests/integration/services/affiliations.integration.spec.ts#refuses to add a chapter that sells dues for the package, naming the Commerce amendment (requires_amendment)", "services-membership:modules/commerce-participant/tests/integration/participant.integration.spec.ts#plans a join: kind, service period from the package rule, the dues chapter, audience new, a sql claim, no amount" ] } ]
Expected
The incomplete checkout is refused; the completed checkout creates the paid chapter affiliation.
Data
An isolated workspace with the specified membership, package, chapter and partner-port fixtures.
Source
services-membership:modules/memberships/tests/integration/services/affiliations.integration.spec.ts#refuses to add a chapter that sells dues for the package, naming the Commerce amendment (requires_amendment),services-membership:modules/commerce-participant/tests/integration/participant.integration.spec.ts#plans a join: kind, service period from the package rule, the dues chapter, audience new, a sql claim, no amount
17 Scope expiry attention through current chaptersinteractionapiproposed
Proves
BR-CAP-MBR-MEM-007-12 BR-CAP-MBR-MEM-014-04
Preconditions
Publication is enabled for a member with two chapters sharing ancestors.
Steps
[ { "do": "Sweep for approaching expiry and inspect the published item scope.", "expect": "The item reaches the selected chapters and their ancestors before the workspace scope.", "provenance": "proposed", "source": [ "services-membership:tests/e2e/s05-multiple-chapters.e2e.spec.ts#returns Jo in the Atlanta and in the Savannah roster", "services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#scopes the item by the membership’s chapter and its ancestors, most specific first, then the tenant" ] } ]
Expected
The item reaches the selected chapters and their ancestors before the workspace scope.
Data
An isolated workspace with the specified membership, package, chapter and partner-port fixtures.
Source
services-membership:tests/e2e/s05-multiple-chapters.e2e.spec.ts#returns Jo in the Atlanta and in the Savannah roster,services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#scopes the item by the membership’s chapter and its ancestors, most specific first, then the tenant
18 Check every affected chapter before a primary changeinteractionapiproposed
Proves
BR-CAP-MBR-MEM-007-09 BR-CAP-MBR-MEM-015-07
Preconditions
An officer reaches only one of a member’s two chapters.
Steps
[ { "do": "Try to make that chapter primary when the other would lose its flag, then repeat as an officer reaching both.", "expect": "The first request changes neither row; the second can change the primary designation.", "provenance": "proposed", "source": [ "services-membership:modules/memberships/tests/integration/services/affiliations.integration.spec.ts#makes an affiliation the primary of its type and the other one no longer", "services-membership:modules/memberships/tests/integration/services/unit-scope.integration.spec.ts#refuses the Atlanta officer ending Jo’s Savannah row, out_of_scope naming Savannah" ] } ]
Expected
The first request changes neither row; the second can change the primary designation.
Data
An isolated workspace with the specified membership, package, chapter and partner-port fixtures.
Source
services-membership:modules/memberships/tests/integration/services/affiliations.integration.spec.ts#makes an affiliation the primary of its type and the other one no longer,services-membership:modules/memberships/tests/integration/services/unit-scope.integration.spec.ts#refuses the Atlanta officer ending Jo’s Savannah row, out_of_scope naming Savannah

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.