Skip to content

ATS-MBR-MEM-020Tell other applications when membership changes: Acceptance Test Set

Markdown

ATS-MBR-MEM-020

Tell other applications when membership changes: Acceptance Test Set

Markdown
  • DocumentProposed

Planning

Proves capability
CAP-MBR-MEM-020

KindAcceptance test setProduct areaMembershipModuleMemberships, Applications and Membership BillingRevision1

Read atservices-membership 5994c270react-console baf6dae3

Test Scenarios

7 scenarios proving CAP-MBR-MEM-020; 7 bound to an existing test.

01 Each operation states exactly its events, and a rollback states noneapitest
Proves
BR-CAP-MBR-MEM-020-01
Preconditions
The well-known FAA workspace fixtures, or a workspace the test builds from them.
Steps
Run each staff, affiliation, structure and sweep operation; roll one back; state an event outside a transaction.
Expected
Exactly the expected events with their contents; none for the rollback; the last refused.
Data
FAA programs, packages, units and members from the integration seed.
Bound to
services-membership:modules/events/tests/integration/business-events.integration.spec.ts#states membership.term.committed and the term’s affiliation for a staff creation, naming the person, the program and the term
services-membership:modules/events/tests/integration/business-events.integration.spec.ts#states the old unit’s end and the new unit’s start for a transfer, each naming the other
services-membership:modules/events/tests/integration/business-events.integration.spec.ts#states membership.unit.reparented for a moved unit, with the old and the new parent
services-membership:modules/events/tests/integration/business-events.integration.spec.ts#leaves no event when the operation that stated it rolls back
Source
services-membership:modules/events/tests/integration/business-events.integration.spec.ts#states membership.term.committed and the term’s affiliation for a staff creation, naming the person, the program and the term
02 Events name the membership's holder correctlyunittest
Proves
BR-CAP-MBR-MEM-020-02
Preconditions
The well-known FAA workspace fixtures, or a workspace the test builds from them.
Steps
Build events for a person's and an organization's membership.
Expected
The person by contact; the organization by organization with no contact.
Data
FAA programs, packages, units and members from the integration seed.
Bound to
services-membership:modules/memberships/tests/unit/membership-business-events.spec.ts#names a person’s membership by its contact_id and no organization
services-membership:modules/memberships/tests/unit/membership-business-events.spec.ts#names an organization’s membership by its organization and no contact_id, whoever its primary contact is
services-membership:modules/events/tests/integration/business-events.integration.spec.ts#names no contact_id when the terminated membership is an organization’s
Source
services-membership:modules/memberships/tests/unit/membership-business-events.spec.ts#names a person’s membership by its contact_id and no organization
03 Terminations and lapses carry the last day of rightsapitest
Proves
BR-CAP-MBR-MEM-020-03
Preconditions
The well-known FAA workspace fixtures, or a workspace the test builds from them.
Steps
Terminate a term and let the sweep find another lapsed.
Expected
Each is one termination with its last day, the first day without and the reason; the lapse ends on the term's own last day.
Data
FAA programs, packages, units and members from the integration seed.
Bound to
services-membership:modules/events/tests/integration/business-events.integration.spec.ts#states one membership.term.terminated for a staff termination, with the person’s contact_id and the last day of rights
services-membership:modules/events/tests/integration/business-events.integration.spec.ts#states membership.term.terminated once when the midnight sweep finds a term lapsed, with the term’s last day
services-membership:modules/memberships/tests/unit/membership-business-events.spec.ts#gives a termination its last day of rights and the first day without, and its reason
Source
services-membership:modules/events/tests/integration/business-events.integration.spec.ts#states one membership.term.terminated for a staff termination, with the person’s contact_id and the last day of rights
04 A cancellation says whether the membership went with itapitest
Proves
BR-CAP-MBR-MEM-020-04
Preconditions
The well-known FAA workspace fixtures, or a workspace the test builds from them.
Steps
Cancel a pending first purchase and a pending renewal.
Expected
The first says the membership was removed; the second does not.
Data
FAA programs, packages, units and members from the integration seed.
Bound to
services-membership:modules/commerce-participant/tests/integration/participant.integration.spec.ts#states membership.term.cancelled for a pending line’s cancellation, saying the membership went with it
Source
services-membership:modules/memberships/tests/unit/membership-business-events.spec.ts#says whether a cancellation removed the membership
05 Event contents are strictunitnegativetest
Proves
BR-CAP-MBR-MEM-020-05
Preconditions
The well-known FAA workspace fixtures, or a workspace the test builds from them.
Steps
Validate a termination without its last day, an undeclared field, a non-local date and an overlong id.
Expected
Each is refused.
Data
FAA programs, packages, units and members from the integration seed.
Bound to
Source
services-membership:modules/events/tests/unit/business-event-schemas.spec.ts#refuses a termination that names no last day
06 Committees receives terminations alone, each with a stable identifierapitest
Proves
BR-CAP-MBR-MEM-020-06
Preconditions
The well-known FAA workspace fixtures, or a workspace the test builds from them.
Steps
Dispatch a batch of events to Committees' fake receiver, then redeliver.
Expected
Only the termination is handed over, as the remote contract, with the event's own id; the others settle without a call.
Data
FAA programs, packages, units and members from the integration seed.
Bound to
services-membership:modules/events/tests/integration/change-events-dispatch.integration.spec.ts#hands Committees the termination alone, as { version: 1, stream, events } with data.contact_id and data.ends_on
services-membership:modules/events/tests/integration/change-events-dispatch.integration.spec.ts#gives Committees the business event’s own id, so a redelivery names the same event
services-membership:modules/events/tests/integration/change-events-dispatch.integration.spec.ts#answers the events Committees does not act on without calling it
services-membership:tests/e2e/business-events.e2e.spec.ts#hands Committees the termination alone, in the remote contract, and settles every message
Source
services-membership:modules/events/tests/integration/change-events-dispatch.integration.spec.ts#hands Committees the termination alone, as { version: 1, stream, events } with data.contact_id and data.ends_on
07 A failed delivery is retried, then set asideapinegativetest
Proves
BR-CAP-MBR-MEM-020-07
Preconditions
The well-known FAA workspace fixtures, or a workspace the test builds from them.
Steps
Committees answers failed, then succeeds; on another message it fails on the last attempt.
Expected
The first is retried and acknowledged; the second goes to the dead-letter queue.
Data
FAA programs, packages, units and members from the integration seed.
Bound to
services-membership:modules/events/tests/integration/change-events-dispatch.integration.spec.ts#returns the message to the queue when Committees answers failed, so SQS retries it
services-membership:modules/events/tests/integration/change-events-dispatch.integration.spec.ts#reports a failure on the queue’s last receive too, which moves the message to the dead-letter queue
Source
services-membership:modules/events/tests/integration/change-events-dispatch.integration.spec.ts#returns the message to the queue when Committees answers failed, so SQS retries it

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.