ATS-MBR-MEM-007Maintain dated chapter and section affiliations: Acceptance Test Set
MarkdownMaintain dated chapter and section affiliations: Acceptance Test Set
Coverage
Test Scenarios
12 scenarios proving CAP-MBR-MEM-007; 12 bound to an existing test.
01 Refuse affiliations outside affiliation-bound programsapinegativetest
- Proves
BR-CAP-MBR-MEM-007-01 - Preconditions
- An identity-bound program has a membership term.
- Steps
- Name units during term creation and later attempt a direct addition.
- 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 selectionsapinegativetest
- Proves
BR-CAP-MBR-MEM-007-02 - Preconditions
- The structure includes a region, inactive chapter and disallowed unit type.
- Steps
- Attempt additions for each ineligible unit and inspect retained valid rows.
- 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 countsapinegativetest
- Proves
BR-CAP-MBR-MEM-007-03 - Preconditions
- Regular requires a chapter; Student permits only one.
- Steps
- Create with no required chapter, add beyond a maximum, end the sole required chapter, then end 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 designationsunitnegativetest
- Proves
BR-CAP-MBR-MEM-007-04 - Preconditions
- Two overlapping rows share a unit type with configurable multiple-primary allowance.
- Steps
- Validate the overlapping primary set with the allowance disabled and enabled.
- 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
06 Route dues-bearing changes through an amendmentapinegativetest
- Proves
BR-CAP-MBR-MEM-007-06 - Preconditions
- Some chapters have package-specific or catch-all dues products, while another has none.
- Steps
- Request dues-bearing additions, then add the chapter without dues.
- 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 listapitest
- Proves
BR-CAP-MBR-MEM-007-07 - Preconditions
- A Regular term holds Atlanta and Savannah and the next package still requires a chapter.
- Steps
- Create the first term with named units, renew without affiliations, and separately renew with an explicit empty list.
- 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 lineageapitest
- 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
- Shorten an ordinary row, withdraw a never-started row, and attempt withdrawal of the continued row.
- 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 rowsapitest
- Proves
BR-CAP-MBR-MEM-007-09 - Preconditions
- Atlanta and Savannah overlap on one term, with Atlanta currently primary.
- Steps
- Make Savannah primary and inspect both rows’ complete spans.
- 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
11 Serialize affiliation selection against unit mergingapitest
- Proves
BR-CAP-MBR-MEM-007-11 - Preconditions
- Two database connections operate on the same active unit.
- Steps
- Hold the unit’s merge lock while adding; separately hold its affiliation share lock while requesting the merge lock.
- 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 rostersapitest
- Proves
BR-CAP-MBR-MEM-007-12 - Preconditions
- Jo holds chapter affiliations to Atlanta and Savannah within one hierarchy.
- Steps
- Read each chapter, its ancestors with descendants, the ancestor without descendants and the unrelated 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