The interaction cases test how a shared holding, period, chapter connection or recorded change affects related work. Each case names its related capabilities and workflows in frontmatter. A composite case remains proposed until executable assertions establish every part of its expected outcome.
Coverage
Rulegap: FND-MBR-MEM-083
Transitiongap: FND-MBR-MEM-083
Validationcovered
Permissioncovered
Edgegap: FND-MBR-MEM-083
Failurecovered
Boundarycovered
Concurrencycovered
Invariantgap: FND-MBR-MEM-083
Interactioncovered
Test Scenarios
16 scenarios proving CAP-MBR-MEM-001; 8 bound to an existing test.
01Invalid creation leaves no membershipvalidationapinegativeproposed
A prepared workspace contains the FAA membership configuration and the records needed for this case.
Steps
[
{
"do": "Create a principal membership and repeat creation for the same owner and program.",
"expect": "Only the first membership remains, and the duplicate refusal directs the caller to add a term.",
"provenance": "test",
"source": [
"services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#refuses a second principal membership of the same owner in the program"
]
}
]
Expected
Only the first membership remains, and the duplicate refusal directs the caller to add a term.
Data
FAA program, package, unit and membership fixtures from the integration setup.
A prepared workspace contains the FAA membership configuration and the records needed for this case.
Steps
[
{
"do": "Create holdings for the same person in two different chapters, retry one chapter, then attempt an incompatible unit type and an absent identity unit.",
"expect": "Both distinct chapter holdings succeed; the duplicate chapter is refused as an existing holding, and incompatible or missing units fail validation.",
"provenance": "test",
"source": [
"services-membership:tests/acceptance/memberships/MBR-ACC-0187.acceptance.ts#MBR-ACC-0187: A chapter sells its own membership bound to the chapter: one per person per chapter, refused for a unit of the wrong type, invisible to another chapter's officer, and absent from the as-of answer's organizational units"
]
}
]
Expected
Both distinct chapter holdings succeed; the duplicate chapter is refused as an existing holding, and incompatible or missing units fail validation.
Data
FAA program, package, unit and membership fixtures from the integration setup.
services-membership:tests/acceptance/memberships/MBR-ACC-0187.acceptance.ts#MBR-ACC-0187: A chapter sells its own membership bound to the chapter: one per person per chapter, refused for a unit of the wrong type, invisible to another chapter's officer, and absent from the as-of answer's organizational units
04Creation rejects inactive or incompatible term configurationvalidationapinegativeproposed
A prepared workspace contains the FAA membership configuration and the records needed for this case.
Steps
[
{
"do": "Attempt initial terms using an inactive type, an inactive package and a package attached to another type.",
"expect": "Each creation fails validation and identifies its type or package problem.",
"provenance": "proposed",
"source": "services-membership:tests/acceptance/memberships/MBR-ACC-0180.acceptance.ts#MBR-ACC-0180"
}
]
Expected
Each creation fails validation and identifies its type or package problem.
Data
FAA program, package, unit and membership fixtures from the integration setup.
A prepared workspace contains the FAA membership configuration and the records needed for this case.
Steps
[
{
"do": "Create package-based initial terms without dates, supplying an effective date in one request and omitting it in another.",
"expect": "Each saved period matches the package calculation for the supplied effective date or workspace business date.",
"provenance": "proposed",
"source": "services-membership:modules/memberships/services/operations/staff-operations.ts:datesOf"
}
]
Expected
Each saved period matches the package calculation for the supplied effective date or workspace business date.
Data
FAA program, package, unit and membership fixtures from the integration setup.
A prepared workspace contains the FAA membership configuration and the records needed for this case.
Steps
[
{
"do": "Submit overlapping periods through two connections simultaneously, then insert an overlap directly without the service guard.",
"expect": "One concurrent write commits; the other identifies the winning term as its overlap, and the direct insert fails the database exclusion.",
"provenance": "test",
"source": [
"services-membership:modules/memberships/tests/integration/services/term-concurrency.integration.spec.ts#commits exactly one of the two terms",
"services-membership:modules/memberships/tests/integration/services/term-concurrency.integration.spec.ts#refuses the other with term_overlap, naming the term the first committed",
"services-membership:modules/memberships/tests/integration/services/term-concurrency.integration.spec.ts#is backed by the migration’s exclusion when the persistence check is bypassed"
]
}
]
Expected
One concurrent write commits; the other identifies the winning term as its overlap, and the direct insert fails the database exclusion.
Data
FAA program, package, unit and membership fixtures from the integration setup.
A prepared workspace contains the FAA membership configuration and the records needed for this case.
Steps
[
{
"do": "Give Kim a National membership; attempt overlapping Premium, adjacent Premium and membership in an unrelated Section.",
"expect": "The overlap identifies the conflicting holding and fails; the adjacent and unrelated holdings succeed.",
"provenance": "test",
"source": [
"services-membership:tests/acceptance/memberships/MBR-ACC-0171.acceptance.ts#MBR-ACC-0171: An owner never holds two tiers at once: overlapping programs of one exclusivity group are refused, adjacent and ungrouped ones allowed, pending terms count, and two simultaneous adds probe the lock"
]
}
]
Expected
The overlap identifies the conflicting holding and fails; the adjacent and unrelated holdings succeed.
Data
FAA program, package, unit and membership fixtures from the integration setup.
A prepared workspace contains the FAA membership configuration and the records needed for this case.
Steps
[
{
"do": "Create holdings under workspace, program and CRM numbering, including an owner without a CRM number.",
"expect": "The assigned number follows the selected source, and CRM numbering refuses the owner lacking a number.",
"provenance": "test",
"source": [
"services-membership:tests/acceptance/memberships/MBR-ACC-0186.acceptance.ts#MBR-ACC-0186: Membership numbers come from the program's numbering scope: one sequence for the workspace, a program's own sequence, or the owner's CRM number, which refuses an owner without one and repeats across programs"
]
}
]
Expected
The assigned number follows the selected source, and CRM numbering refuses the owner lacking a number.
Data
FAA program, package, unit and membership fixtures from the integration setup.
A prepared workspace contains the FAA membership configuration and the records needed for this case.
Steps
[
{
"do": "Create one membership with an inferred join date and another with an explicit staff date.",
"expect": "Each saves a committed first term and enrolment reason; the join date and its origin distinguish the inferred date from the staff choice.",
"provenance": "proposed",
"source": "services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#creates a membership with its committed term, its enrolment and its cache"
}
]
Expected
Each saves a committed first term and enrolment reason; the join date and its origin distinguish the inferred date from the staff choice.
Data
FAA program, package, unit and membership fixtures from the integration setup.
A prepared workspace contains the FAA membership configuration and the records needed for this case.
Steps
[
{
"do": "Load memberships before periods after configuration, including a granting package and an organization owner; then upsert an existing period.",
"expect": "Insertion records an imported event; update adds no new imported event; status is refreshed without generating grants or organizational children.",
"provenance": "proposed",
"source": "services-membership:modules/memberships/tests/integration/data-operations/membership-data-operations.integration.spec.ts#orders the loads as 10 §1 does: configuration, then memberships, then terms"
}
]
Expected
Insertion records an imported event; update adds no new imported event; status is refreshed without generating grants or organizational children.
Data
FAA program, package, unit and membership fixtures from the integration setup.
A prepared workspace contains the FAA membership configuration and the records needed for this case.
Steps
[
{
"do": "Prevalidate a malformed term field and attempt a period overlapping an existing term.",
"expect": "The invalid field is identified before writing, and the overlap receives an item-level conflict classification.",
"provenance": "test",
"source": [
"services-membership:modules/memberships/tests/integration/data-operations/membership-data-operations.integration.spec.ts#rejects a malformed item at prevalidation, naming its field",
"services-membership:modules/memberships/tests/integration/data-operations/membership-data-operations.integration.spec.ts#classifies an overlapping term as that item’s conflict, term_overlap"
]
}
]
Expected
The invalid field is identified before writing, and the overlap receives an item-level conflict classification.
Data
FAA program, package, unit and membership fixtures from the integration setup.
[
{
"do": "Repeat creation, then add an undated staff renewal to the existing holding.",
"expect": "The refused creation adds no holding; the renewal adds a period to the original holding.",
"provenance": "proposed",
"source": [
"services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#refuses a second principal membership of the same owner in the program",
"services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#adds a renewal continuing the latest term when no dates are given"
]
}
]
Expected
The refused creation adds no holding; the renewal adds a period to the original holding.
Data
An isolated workspace with the specified membership, package, chapter and partner-port fixtures.
[
{
"do": "Create the source membership, then inspect the source and granted holdings after commit; repeat with a refused creation.",
"expect": "The successful save contains source and grant periods; the refused save contains neither.",
"provenance": "proposed",
"source": [
"services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#creates a membership with its committed term, its enrolment and its cache",
"services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#creates the granted membership and term of a package grant in the same transaction"
]
}
]
Expected
The successful save contains source and grant periods; the refused save contains neither.
Data
An isolated workspace with the specified membership, package, chapter and partner-port fixtures.
A new person selects a package requiring one chapter.
Steps
[
{
"do": "Create without a chapter, then create with an allowed chapter and inspect holdings and affiliations.",
"expect": "The first attempt leaves no holding; the second produces one holding with the selected chapter.",
"provenance": "proposed",
"source": [
"services-membership:tests/acceptance/memberships/MBR-ACC-0162.acceptance.ts#MBR-ACC-0162",
"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
The first attempt leaves no holding; the second produces one holding with the selected chapter.
Data
An isolated workspace with the specified membership, package, chapter and partner-port fixtures.
Staff and a read-only colleague submit the same valid enrolment.
Steps
[
{
"do": "Create as staff, repeat as the read-only colleague, then count the contact’s memberships.",
"expect": "Staff creation succeeds; the colleague receives a missing-permission refusal and only one holding exists.",
"provenance": "test",
"source": "services-membership:tests/acceptance/memberships/MBR-ACC-0172.acceptance.ts"
}
]
Expected
Staff creation succeeds; the colleague receives a missing-permission refusal and only one holding exists.
Data
Suite-owned workspaces, annual membership fixtures, signed staff and restricted contexts.
Two isolated workspaces contain signed administrators and a holding in the first workspace.
Steps
[
{
"do": "Use the second administrator against the first workspace, then read the first holding through the second workspace path.",
"expect": "The cross-workspace write is refused at the workspace boundary, the foreign read is not found, and the second workspace receives no holding.",
"provenance": "test",
"source": "services-membership:tests/acceptance/memberships/MBR-ACC-0172.acceptance.ts"
}
]
Expected
The cross-workspace write is refused at the workspace boundary, the foreign read is not found, and the second workspace receives no holding.
Data
Suite-owned workspaces, annual membership fixtures, signed staff and restricted contexts.