ATS-MBR-MEM-003Correct or close a term without losing earlier knowledge: Acceptance Test Set
MarkdownCorrect or close a term without losing earlier knowledge: Acceptance Test Set
Coverage
Test Scenarios
7 scenarios proving CAP-MBR-MEM-003; 6 bound to an existing test.
01 Reject stale changes and closure of a cancelled termapinegativeproposed
- Proves
BR-CAP-MBR-MEM-003-01 - Preconditions
- A term has been read by two staff callers, and another term has already been cancelled.
- Steps
- Correct using the first caller, retry a correction at the older version, and attempt to terminate the cancelled term.
- Expected
- The stale write identifies the current version; the cancelled term cannot be terminated.
- Data
- Principal term records, applicable status reasons and the dependent records required by this scenario.
- Source
- services-membership:modules/memberships/services/operations/staff-operations.ts:lockTerm, correctTerm, terminateTerm
02 Reproduce term knowledge from before a correctionapitest
- Proves
BR-CAP-MBR-MEM-003-02 - Preconditions
- A dated term has a recorded history and an identifiable moment before its amendment.
- Steps
- Amend the start with a reason, inspect versions, and read using knowledge before and after the write.
- Expected
- History retains the original start and actor; the earlier-known and later-known reads return their respective starts.
- Data
- Principal term records, applicable status reasons and the dependent records required by this scenario.
- Bound to
- 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
03 Constrain affiliations after dates and package changeapitest
- Proves
BR-CAP-MBR-MEM-003-04 - Preconditions
- A term holds chapter affiliations and an alternative package permits fewer chapters.
- Steps
- Move the term’s start later, then attempt to select the more restrictive package.
- Expected
- Affiliations starting before the amended start move forward; the excessive chapter count prevents the package change.
- Data
- Principal term records, applicable status reasons and the dependent records required by this scenario.
- Bound to
- Source
- services-membership:modules/memberships/tests/integration/services/affiliations.integration.spec.ts#moves a term’s affiliations with a corrected start
04 Distinguish early closure from recording a later dropapitest
- Proves
BR-CAP-MBR-MEM-003-06 - Preconditions
- One term is effective and another has already expired.
- Steps
- Terminate the effective term from a chosen date and record the expired member’s drop later.
- Expected
- The effective period contracts to the preceding day; the expired period retains its end and records the later drop date.
- Data
- Principal term records, applicable status reasons and the dependent records required by this scenario.
- Bound to
- Source
- services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#terminates a term from the effective date, with the reason, and the status follows
05 Cancel future coverage and reuse its datesapitest
- Proves
BR-CAP-MBR-MEM-003-07 - Preconditions
- A future committed term has not yet begun.
- Steps
- Close it before its start, inspect standing, and add replacement coverage for the same dates.
- Expected
- The original period is cancelled; standing falls back and replacement coverage is accepted.
- Data
- Principal term records, applicable status reasons and the dependent records required by this scenario.
- Bound to
- Source
- services-membership:modules/events/tests/integration/business-events.integration.spec.ts#states membership.term.cancelled, not terminated, for a term that had not started
06 Limit chapter coverage through an ended termapitest
- Proves
BR-CAP-MBR-MEM-003-08 - Preconditions
- A member has a term with a chapter affiliation.
- Steps
- Terminate the term and inspect both its last day and the chapter row.
- Expected
- The term has the shortened end; the affiliation end is either empty or equal to that end, with coverage limited by the term.
- Data
- Principal term records, applicable status reasons and the dependent records required by this scenario.
- Bound to
- Source
- services-membership:tests/acceptance/memberships/MBR-ACC-0198.acceptance.ts#MBR-ACC-0198: A member's chapters stay inside her term when it is shortened or ended, a package that allows fewer chapters cannot replace hers, and her chapter's officer sees her only while her chain reaches the chapter
07 Adjust granted mirrors when their source contractsapitest
- Proves
BR-CAP-MBR-MEM-003-09 - Preconditions
- A package-granted term mirrors a source period.
- Steps
- Shorten, extend, terminate and cancel source periods, inspecting the corresponding granted periods.
- Expected
- A mirror shortens, remains at its shortened end after extension, or closes with the source as appropriate.
- Data
- Principal term records, applicable status reasons and the dependent records required by this scenario.
- Bound to
- Source
- services-membership:tests/acceptance/memberships/MBR-ACC-0182.acceptance.ts#MBR-ACC-0182: Granted terms follow their source down but never up: shortened with a correction, terminated or cancelled with it, while the granted membership is not suspended with the primary