Skip to content

ATS-MBR-STR-005Find units and inspect current or historical structure: Capability Test Specification

Markdown

ATS-MBR-STR-005

Find units and inspect current or historical structure: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaMembershipModuleOrganizational Structure, Membership Configuration and TermsRevision2

Read atservices-membership 5994c270react-console baf6dae3

Coverage

  • Rule covered
  • Transition not-applicable
  • Validation covered
  • Permission covered
  • Edge gap: FND-MBR-STR-058
  • Failure gap: FND-MBR-STR-058
  • Boundary covered
  • Concurrency gap: FND-MBR-STR-058
  • Invariant gap: FND-MBR-STR-058
  • Interaction covered

Test Scenarios

10 scenarios proving CAP-MBR-STR-005; 6 bound to an existing test.

01 Ancestry reads begin with the requested unitruleapitest
Proves
BR-CAP-MBR-STR-005-01
Preconditions
An isolated Membership-licensed workspace contains the relevant records, with caller permissions selected for the case.
Steps
Read Eastern’s descendants and Atlanta’s ancestors.
Expected
Both answers begin at distance zero and continue in distance and code order.
Data
The FAA example records or equivalent records prepared within the isolated workspace.
Bound to
services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts#organizational units in the database › the closure › answers the descendants of a unit from the closure, nearest first
services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts#organizational units in the database › the closure › answers the ancestors of a unit from the closure, nearest first
services-membership:tests/e2e/structure-api.e2e.spec.ts#the structure API, end to end in process › answers today’s descendants from the closure
Source
services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts#organizational units in the database › the closure › answers the descendants of a unit from the closure, nearest first
02 Historical placement uses effective and knowledge datesruleapitest
Proves
BR-CAP-MBR-STR-005-02 AS-JNY-MBR-STR-002-02
Preconditions
An isolated Membership-licensed workspace contains the relevant records, with caller permissions selected for the case.
Steps
Read the former region around two placement changes and before their recorded knowledge.
Expected
The returned branch matches each requested period, with no rows before the known history.
Data
The FAA example records or equivalent records prepared within the isolated workspace.
Bound to
services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts#organizational units in the database › the parent history and the as-of tree › answers the descendants as of 2026-06-30 equal to the tree recorded that day
services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts#organizational units in the database › the parent history and the as-of tree › answers the descendants as of 2027-06-30 equal to the tree recorded that day
services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts#organizational units in the database › the parent history and the as-of tree › answers the descendants as of 2027-12-31 equal to the tree recorded that day
services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts#organizational units in the database › the parent history and the as-of tree › answers nothing for a known_at before the moves were recorded, beyond the tree as it was then known
services-membership:tests/e2e/structure-api.e2e.spec.ts#the structure API, end to end in process › answers an as-of date’s descendants from the parent history
services-membership:modules/structure/tests/unit/services/tree-statements.spec.ts#the tree statements › the as-of tree › reads the parent history’s versions known at the instant and effective on the date, with plain comparisons
services-membership:tests/acceptance/structure/MBR-ACC-0013.acceptance.ts#MBR-ACC-0013 a backdated move and a same-day correction
Source
services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts#organizational units in the database › the parent history and the as-of tree › answers the descendants as of 2026-06-30 equal to the tree recorded that day
03 Paged lists reject invalid request shapesboundaryapinegativetest
Proves
BR-CAP-MBR-STR-005-06
Preconditions
An isolated Membership-licensed workspace contains the relevant records, with caller permissions selected for the case.
Steps
Follow a unit-list cursor, request 501 rows and submit a malformed cursor.
Expected
Valid continuation follows code order; the oversized and malformed requests fail.
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 › pages the flat list by code with a cursor
Source
services-membership:tests/e2e/structure-api.e2e.spec.ts#the structure API, end to end in process › pages the flat list by code with a cursor
04 Published functions honor the caller’s workspaceboundaryapinegativetest
Proves
BR-CAP-MBR-STR-005-09 INV-DOM-MBR-STR-001-06
Preconditions
An isolated Membership-licensed workspace contains the relevant records, with caller permissions selected for the case.
Steps
Invoke ancestor and descendant functions as the table reader under two workspace contexts.
Expected
The owning workspace returns its branch and the other context returns none of those rows.
Data
The FAA example records or equivalent records prepared within the isolated workspace.
Bound to
services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts#organizational units in the database › the published functions › answers membership.unit_descendants to rhythm_table_reader in its tenant
services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts#organizational units in the database › the published functions › answers membership.unit_ancestors to rhythm_table_reader in its tenant
services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts#organizational units in the database › the published functions › answers nothing of a tenant other than the reader’s own
services-membership:tests/acceptance/structure/MBR-ACC-0026.acceptance.ts#MBR-ACC-0026 another association's structure does not exist
Source
services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts#organizational units in the database › the published functions › answers membership.unit_descendants to rhythm_table_reader in its tenant
05 Foreign workspace unit identity remains hiddenpermissionapinegativetest
Proves
BR-CAP-MBR-STR-005-11
Preconditions
An isolated Membership-licensed workspace contains the relevant records, with caller permissions selected for the case.
Steps
Request another workspace’s unit reference and list under the caller’s workspace.
Expected
The reference is missing and list rows belong only to the caller’s workspace.
Data
The FAA example records or equivalent records prepared within the isolated workspace.
Bound to
services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts#organizational units in the database › row-level security › reads nothing of another tenant’s unit by id
services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts#organizational units in the database › row-level security › shows another tenant none of the units
services-membership:tests/acceptance/structure/MBR-ACC-0026.acceptance.ts#MBR-ACC-0026 another association's structure does not exist
Source
services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts#organizational units in the database › row-level security › reads nothing of another tenant’s unit by id
06 Historical structure uses the unit’s present labelinteractionapiproposed
Proves
BR-CAP-MBR-STR-005-03
Preconditions
An isolated workspace contains the records and current versions needed for the case.
Steps
Move a chapter in June, rename it in July and read the May branch.
Expected
The May placement contains the July name and code; a unit first created in June is absent.
Data
Separate fixture records for the accepted and refused operations.
Source
services-membership:modules/structure/services/persistence/organizational-units.ts:descendantsAsOf
07 The first tree page follows breadth orderingruleapitest
Proves
BR-CAP-MBR-STR-005-04
Preconditions
An isolated workspace contains the records and current versions needed for the case.
Steps
Read the national branch with a page size of three in the prepared association structure.
Expected
The first page contains the national root, eastern region and western region in that order and supplies a continuation cursor.
Data
Separate fixture records for the accepted and refused operations.
Bound to
Source
services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts#pages the tree breadth first with each unit’s parent,services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts#organizational units in the database › the closure › pages the tree breadth first with each unit’s parent
08 Search literals do not act as wildcardsvalidationapinegativeproposed
Proves
BR-CAP-MBR-STR-005-05
Preconditions
An isolated workspace contains the records and current versions needed for the case.
Steps
Create codes and names containing distinguishable fragments; search mixed case, a literal percent, a literal underscore and blank text.
Expected
Mixed case finds the intended fragment; wildcard-shaped text finds only literal matches; blank text is refused.
Data
Separate fixture records for the accepted and refused operations.
Source
services-membership:modules/structure/services/persistence/organizational-units.ts:listOrganizationalUnits
09 Parent history retains the explanation sequenceruleapiproposed
Proves
BR-CAP-MBR-STR-005-07
Preconditions
An isolated workspace contains the records and current versions needed for the case.
Steps
Place a chapter, move it twice on distinct dates with different actors and reasons, then read its parent history.
Expected
The three periods appear oldest first with the supplied actor and reason for each change.
Data
Separate fixture records for the accepted and refused operations.
Source
services-membership:modules/structure/services/persistence/organizational-units.ts:listParentHistory
10 Reader access preserves the workspace boundaryinteractionapiproposed
Proves
BR-CAP-MBR-STR-005-11 BR-CAP-MBR-STR-019-01
Preconditions
An isolated workspace contains the records and current versions needed for the case.
Steps
As a structure reader request own and foreign unit identities, then attempt a mutation.
Expected
Own reads succeed, foreign rows stay hidden and management is refused.
Data
Separate fixture records for the accepted and refused operations.
Source
services-membership:modules/structure/tests/integration/services/persistence/organizational-units.integration.spec.ts#organizational units in the database › row-level security › reads nothing of another tenant’s unit by id,services-membership:tests/unit/route-authorization.spec.ts#route authorization: every Membership operation names its permission › requires membership.structure.read of every structure read and membership.structure.manage of every change

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.