Step-by-Step Guide — Follow each step exactly as written. Every value you need to type is spelled out. Do not improvise.

TC-MEM-007: Member Status Transitions (Detailed)

Module: Membership Management - Status Transitions

Admin: admin@rcme.membervu.com / Admin123!  ·  Member: testmember@rcme.membervu.com / Member123! (Maria Cruz)  ·  Expired: expired@demo.membervu.com / Expired123! (Antonio Dela Cruz)

URLs: Frontend https://stg-rcme.membervu.com · MailHog https://stg-webmail.membervu.com
HOW STATUS CHANGES WORK (current UI): Open Members → All Members, click a member to open the right-hand detail panel, then use "Actions ▾" → "Change Status". The modal only offers transitions valid for the member's current status, and requires a reason for Suspend/Deactivate. Pending applications are approved/rejected via the inline Approve / Reject buttons on the member detail header (for true PENDING_APPROVAL members) or via the Prospects page (for applicants).
STATUS TRANSITION MAP:

PENDING_APPROVALPENDING_PAYMENT or ACTIVE (admin approve)
PENDING_APPROVALREJECTED (admin reject)
PENDING_PAYMENTACTIVE (dues invoice paid — sets membershipExpiresAt)
ACTIVESUSPENDED / INACTIVE (Change Status, reason required)
SUSPENDED / EXPIRED / INACTIVEACTIVE (Change Status → Reactivate/Activate)
ACTIVEEXPIRED (expiry cron)

TC-TRANS-01: PENDING_APPROVAL → ACTIVE (Approve)

Purpose: approving a true pending application transitions to ACTIVE (or PENDING_PAYMENT if the tenant auto-creates a dues invoice).

Note: there is no seeded PENDING_APPROVAL user. The seed user pending@demo.membervu.com is a prospect (GUEST_ATTENDEE) — it is covered in TC-MEM-004, not here. Create a fresh applicant via /register for this test (requires the tenant to have approval enabled).
StepActionExpected ResultTest Value
1In an incognito window, go to https://stg-rcme.membervu.com/register and register: First Status, Last TestApprove, Email qa-status-approve@test.membervu.com, plus required fields. Submit "Create account".Application submitted. If the tenant requires approval, status = PENDING_APPROVAL.qa-status-approve@test.membervu.com
2Log in as admin. Go to Members → All Members, set the list filter/tab to Pending (or open /admin/members?tab=pending). Click "Status TestApprove".Member detail panel opens; status badge = PENDING_APPROVAL; inline Approve + Reject buttons appear in the header.-
3Click "Approve".Status → ACTIVE (or PENDING_PAYMENT if auto-dues is on). Success toast.-
PASS if: PENDING_APPROVAL → ACTIVE (or PENDING_PAYMENT).

TC-TRANS-02: PENDING_APPROVAL → REJECTED

StepActionExpected ResultTest Value
1Register another applicant (qa-status-reject@test.membervu.com) as in TC-TRANS-01.Status = PENDING_APPROVAL.qa-status-reject@test.membervu.com
2As admin, open that member → click inline "Reject". An inline "Reason for rejection (optional)" textarea appears. Type QA test - rejection → click "Confirm Reject".Status → REJECTED.QA test - rejection
PASS if: PENDING_APPROVAL → REJECTED.

TC-TRANS-03: PENDING_APPROVAL → PENDING_PAYMENT (Approve + auto-dues)

Conditional: only occurs when the tenant has autoCreateDuesInvoice enabled; otherwise approval goes straight to ACTIVE (TC-TRANS-01). If not enabled, mark "N/A".
StepActionExpected ResultTest Value
1Approve an applicant as in TC-TRANS-01 (when auto-dues is on).Status = PENDING_PAYMENT.-
2As admin, open Finance → Invoices (/admin/invoices); find the member's dues invoice.A dues invoice exists for the member (amount = their membership type).-
PASS if: approval created a dues invoice and status = PENDING_PAYMENT.

TC-TRANS-04: ACTIVE → SUSPENDED (Change Status)

StepActionExpected ResultTest Value
1As admin, Members → All Members → click Maria Cruz (ACTIVE).Detail panel opens.-
2Click "Actions ▾" → "Change Status"."Change Member Status" modal; for an ACTIVE member it offers "Suspend Member" and "Deactivate Member".-
3Choose "Suspend Member". A required "Reason *" textarea appears — type QA test - suspension. Click "Suspend Member".Status → SUSPENDED. Her active sessions are revoked (#167/#168) and a notification email is sent (check MailHog).QA test - suspension
PASS if: ACTIVE → SUSPENDED; reason recorded in the audit log; member is logged out.

TC-TRANS-05: SUSPENDED → ACTIVE (Reactivate)

Prerequisite: Maria Cruz is SUSPENDED (TC-TRANS-04).

StepActionExpected ResultTest Value
1Open Maria Cruz (SUSPENDED) → "Actions ▾" → "Change Status""Reactivate Member" (no reason needed) → confirm.Status → ACTIVE.-
2Log in as Maria Cruz (testmember@rcme.membervu.com / Member123!).Login succeeds; dashboard loads.-
PASS if: SUSPENDED → ACTIVE and member can log in.

TC-TRANS-06: ACTIVE → EXPIRED (expiry cron)

SKIP (UI): requires the expiry date to pass or DB access. Use the pre-seeded expired@demo.membervu.com (Antonio Dela Cruz, already EXPIRED) to observe the EXPIRED state and TC-TRANS-07.

TC-TRANS-07: EXPIRED → ACTIVE (Reactivate) — and the expiry caveat

Purpose: verify the admin reactivate path on an EXPIRED member, and confirm the known expiry limitation.

⚠ Known limitation (OQ-RET-16 / issue #151, still open on dev): "Reactivate" sets status to ACTIVE but does NOT set a new membershipExpiresAt. The member's expiry date stays in the past, so the next expiry cron run will re-expire them. There is no "Renew" button — proper renewal happens by creating + paying a dues invoice (which sets the new expiry). Do not expect "a new expiry date is set" here.
StepActionExpected ResultTest Value
1As admin, open Antonio Dela Cruz (expired@demo.membervu.com); confirm status = EXPIRED.Status badge = EXPIRED.-
2"Actions ▾" → "Change Status" → "Reactivate Member" → confirm.Status → ACTIVE. Expiry date is unchanged (still in the past).-
3Check the member's membership detail / "Member since" + expiry.membershipExpiresAt is NOT updated by this action — confirming OQ-RET-16. Proper renewal = pay a new dues invoice.-
WARNING: reactivating Antonio affects other tests that rely on him being EXPIRED. Reseed afterward: docker exec membervu-backend npm run seed:rcme.
PASS if: EXPIRED → ACTIVE via Reactivate, AND membershipExpiresAt is not changed (limitation confirmed).

TC-TRANS-08: PENDING_PAYMENT → ACTIVE (dues paid)

Use the seeded user: pending-payment@demo.membervu.com (Isabella Ramos) is already in PENDING_PAYMENT with an unpaid dues invoice. Recording/paying that invoice should transition her to ACTIVE and set membershipExpiresAt. (Live Paynamics payment is parked — use an admin-recorded manual payment if available, else mark N/A.)

CLEANUP — Read Before You Stop

  1. Maria Cruz is ACTIVE — if suspended in TC-TRANS-04, ensure reactivated in TC-TRANS-05.
  2. Antonio Dela Cruz — if reactivated in TC-TRANS-07, reseed to restore EXPIRED: docker exec membervu-backend npm run seed:rcme.
  3. Test applicants (qa-status-approve@…, qa-status-reject@…) are cleared by a reseed.