Skip to content

ATS-MBR-STR-004Close units or remove units without retained dependencies: Acceptance Test Set

Markdown

ATS-MBR-STR-004

Close units or remove units without retained dependencies: Acceptance Test Set

Markdown
  • DocumentProposed

Planning

Proves capability
CAP-MBR-STR-004

KindAcceptance test setProduct areaMembershipModuleOrganizational Structure, Membership Configuration and TermsRevision1

Read atservices-membership 5994c270react-console baf6dae3

Test Scenarios

5 scenarios proving CAP-MBR-STR-004; 5 bound to an existing test.

01 Closing a parent preserves its existing branchapitest
Proves
BR-CAP-MBR-STR-004-01
Preconditions
An isolated Membership-licensed workspace contains the relevant records, with caller permissions selected for the case.
Steps
Deactivate a populated chapter and attempt a new child and affiliation.
Expected
Existing sections stay active and the new relationships are rejected.
Data
The FAA example records or equivalent records prepared within the isolated workspace.
Bound to
services-membership:modules/structure/tests/integration/services/tree/unit-merge.integration.spec.ts#the tree edits affiliations bind › delete and deactivate › deactivates it instead
services-membership:tests/acceptance/structure/MBR-ACC-0020.acceptance.ts#MBR-ACC-0020 deactivating a chapter freezes it, and there is no way back
Source
services-membership:modules/structure/tests/integration/services/tree/unit-merge.integration.spec.ts#the tree edits affiliations bind › delete and deactivate › deactivates it instead
02 Ended affiliations still protect unit identityapinegativetest
Proves
BR-CAP-MBR-STR-004-04
Preconditions
An isolated Membership-licensed workspace contains the relevant records, with caller permissions selected for the case.
Steps
Attempt deletion of a unit referenced only by ended affiliations and a source with transferred affiliation history.
Expected
Both responses refuse removal and report the affiliation count.
Data
The FAA example records or equivalent records prepared within the isolated workspace.
Bound to
services-membership:modules/structure/tests/integration/services/tree/unit-merge.integration.spec.ts#the tree edits affiliations bind › delete and deactivate › refuses to delete a unit a closed affiliation names, 409 unit_has_affiliations with the count
services-membership:tests/e2e/s13-unit-merge.e2e.spec.ts#a unit merge moves its members: Savannah into Atlanta › refuses to delete Savannah while affiliations name it (unit_has_affiliations)
services-membership:modules/structure/tests/unit/services/tree-edits.spec.ts#the tree edits › delete › refuses 409 unit_has_affiliations while an affiliation names the unit, before deleting
Source
services-membership:modules/structure/tests/integration/services/tree/unit-merge.integration.spec.ts#the tree edits affiliations bind › delete and deactivate › refuses to delete a unit a closed affiliation names, 409 unit_has_affiliations with the count
03 Structural references prevent removalapinegativetest
Proves
BR-CAP-MBR-STR-004-05
Preconditions
An isolated Membership-licensed workspace contains the relevant records, with caller permissions selected for the case.
Steps
Test deletion while children, retained parent periods, organization links or survivor references remain.
Expected
Each response identifies retained use and preserves the unit.
Data
The FAA example records or equivalent records prepared within the isolated workspace.
Bound to
services-membership:tests/e2e/structure-api.e2e.spec.ts#the structure API, end to end in process › refuses to delete a unit in use, 409 unit_in_use
services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts#organizational units in the database › the refusals › refuses to delete a unit that has children
Source
services-membership:tests/e2e/structure-api.e2e.spec.ts#the structure API, end to end in process › refuses to delete a unit in use, 409 unit_in_use
04 Other membership records protect unit identityapinegativetest
Proves
BR-CAP-MBR-STR-004-06
Preconditions
An isolated Membership-licensed workspace contains the relevant records, with caller permissions selected for the case.
Steps
Attempt deletion of a program-owning unit and a membership-identifying unit.
Expected
Each refusal identifies the reference and keeps the unit.
Data
The FAA example records or equivalent records prepared within the isolated workspace.
Bound to
services-membership:tests/e2e/database-refusals.e2e.spec.ts#mistakes only the database catches, through the API › DEF-MBR-0084: a structure delete a program’s reference blocks › refuses deleting a unit a program is owned by 409 unit_in_use, and keeps it
services-membership:tests/e2e/database-refusals.e2e.spec.ts#mistakes only the database catches, through the API › DEF-MBR-0012: a structure delete an identity-bound membership blocks › refuses deleting a unit a membership is identified by 409 unit_in_use naming the reference, and keeps it
services-membership:tests/acceptance/structure/MBR-ACC-0037.acceptance.ts#MBR-ACC-0037 what other parts of Membership name in the structure
Source
services-membership:tests/e2e/database-refusals.e2e.spec.ts#mistakes only the database catches, through the API › DEF-MBR-0084: a structure delete a program’s reference blocks › refuses deleting a unit a program is owned by 409 unit_in_use, and keeps it
05 Removing a free leaf clears its owned dataapitest
Proves
BR-CAP-MBR-STR-004-07
Preconditions
An isolated Membership-licensed workspace contains the relevant records, with caller permissions selected for the case.
Steps
Remove a leaf whose references are all absent, then inspect its owned rows.
Expected
The unit and its current pairs, parent periods, custom values and finance settings are absent.
Data
The FAA example records or equivalent records prepared within the isolated workspace.
Bound to
services-membership:modules/structure/tests/unit/services/tree-edits.spec.ts#the tree edits › delete › deletes a unit no affiliation and nothing else names
Source
services-membership:modules/structure/tests/unit/services/tree-edits.spec.ts#the tree edits › delete › deletes a unit no affiliation and nothing else names

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.