arbret/MANUAL_TEST_INVITES.md

2.1 KiB

Invite System - Manual Testing Guide

Prerequisites

  • make dev running
  • Seeded users: admin@example.com / admin123, user@example.com / user123

1. Admin: Create Invites

  1. Login as admin@example.com
  2. Go to /admin/invites
  3. Dropdown shows list of users (not a number input)
  4. Select user@example.com → Click Create Invite
  5. New invite appears with code like apple-banana-42, status "ready"

2. Admin: Revoke Invite

  1. On /admin/invites, click Revoke on a ready invite
  2. Status changes to "revoked"

3. Admin: Filter Invites

  1. Use status dropdown to filter by "ready", "spent", "revoked"
  2. Table updates accordingly

4. Signup with Invite Code

  1. Logout → Go to /signup
  2. Enter a valid invite code → Click Continue
  3. Form shows "Create account" with email/password fields
  4. Fill in new email + password → Submit
  5. Redirected to home, logged in
  1. Copy a ready invite code (e.g., apple-banana-42)
  2. Go to /signup/apple-banana-42
  3. Redirects to /signup?code=... with code pre-validated
  4. Complete registration
  5. Works same as manual entry

6. Signup Error Cases

  1. Invalid code: Enter fake-code-99 Shows "not found" error
  2. Spent invite: Use an already-used code → Shows error
  3. Revoked invite: Use a revoked code → Shows error

7. Regular User: My Invites

  1. Login as the newly created user (or user@example.com if they have invites)
  2. Go to /invites
  3. Shows list of invites assigned to this user
  4. Spent invites show who used them

8. Profile: Godfather Display

  1. Login as user created via invite
  2. Go to /profile
  3. "Invited By" shows the godfather's email (read-only)

Quick Smoke Test (2 min)

  1. Admin login → /admin/invites → Create invite for user@example.com
  2. Copy invite code
  3. Logout → /signup → Enter code → Register new user
  4. Check /profile shows godfather
  5. Admin: verify invite status is "spent" with used_by email