ATS-MBR-MEM-006 Derive package grants and organizational child memberships: Acceptance Test Set
Markdown Planning / Membership / Memberships, Applications and Membership Billing / Membership Holdings and Periods / Capability Test Specification Derive package grants and organizational child memberships: Acceptance Test Set Coverage Show evidence (sources, provenance, origins, pinned commits)Test Scenarios 9 scenarios proving CAP-MBR-MEM-006 ; 6 bound to an existing test.
01 Commit package grants with the source term api test
Proves BR-CAP-MBR-MEM-006-01 Preconditions A selected package grants a section membership to the same owner. Steps Create the source membership and inspect its additional program membership after commit. Expected The additional membership and source-linked term exist after the same commit. Data Package grants or organizational parents, CRM relationships and controlled dates appropriate to this derivation. Bound to Source 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 02 Compute grant periods for enrolment and renewal unit test
Proves BR-CAP-MBR-MEM-006-02 Preconditions Grant inputs include same-as-primary, own-rule and renewal cases. Steps Plan initial and renewed grants using each supported date rule. Expected Mirroring retains source dates; own rules respect the source start; renewal plans the next target period. Data Package grants or organizational parents, CRM relationships and controlled dates appropriate to this derivation. Bound to Source services-membership:modules/memberships/tests/unit/grant-plan.spec.ts #plans a granted term with the primary term’s dates for a grant same as primary 03 Skip an overlapping target-program period unit test
Proves BR-CAP-MBR-MEM-006-03 Preconditions An effective target-program term overlaps a planned grant period. Steps Plan the grant against the already-held effective target period. Expected No duplicate period is planned, and the skipped result identifies the overlapping term. Data Package grants or organizational parents, CRM relationships and controlled dates appropriate to this derivation. Bound to Source services-membership:modules/memberships/tests/unit/grant-plan.spec.ts #skips a grant the member already holds for those dates, naming the term 04 Select organizational contacts through qualifying roles api test
Proves BR-CAP-MBR-MEM-006-04 Preconditions An organization has contacts with qualifying and nonqualifying roles. Steps Create the corporate period and inspect which contacts receive mirrored memberships. Expected Qualifying contacts receive mirrored coverage; contacts with unrelated roles receive none. Data Package grants or organizational parents, CRM relationships and controlled dates appropriate to this derivation. Bound to Source services-membership:modules/memberships/tests/integration/services/organization-children.integration.spec.ts #flows down to the contacts holding a flow-down role, mirroring the parent’s dates with the flow-down type 06 Select assigned seats within the package cap api proposed
Proves BR-CAP-MBR-MEM-006-06 Preconditions A decided organizational application names more contacts than the package’s seat allowance. Steps Recalculate the organization’s children from the decided application contacts. Expected Only contacts selected before the seat cap can receive assigned coverage; contacts already flowed down retain that coverage. Data Package grants or organizational parents, CRM relationships and controlled dates appropriate to this derivation. Source services-membership:modules/memberships/services/flowdown/organization-children.ts :wantedPeople 08 Withdraw coverage after eligibility ends api proposed
Proves BR-CAP-MBR-MEM-006-08 Preconditions An engineer’s qualifying CRM role has ended but the change has not yet been handled. Steps Deliver the role-change event and inspect the engineer’s term; separately exercise withdrawal before a child starts. Expected Started coverage closes on the handling day; not-yet-started coverage is cancelled. Data Package grants or organizational parents, CRM relationships and controlled dates appropriate to this derivation. Source services-membership:modules/memberships/services/flowdown/organization-children.ts :syncOrganizationChildren 09 Converge after repeated CRM deliveries api proposed
Proves BR-CAP-MBR-MEM-006-09 Preconditions Current CRM relationships and existing child memberships differ after a role change. Steps Deliver a change again and in reordered batches, then inspect child periods and event counts. Expected Recomputation follows current CRM state without creating duplicate withdrawal events. Data Package grants or organizational parents, CRM relationships and controlled dates appropriate to this derivation. Source services-membership:modules/memberships/services/flowdown/crm-change-events.ts :handleCrmChangeEvents ← Previous Capability Test Specification ATS-MBR-MEM-005 · Determine membership standing and refresh list status: Acceptance Test Set Next Capability Test Specification → ATS-MBR-MEM-007 · Maintain dated chapter and section affiliations: Acceptance Test Set