Skip to content

Authentication Tests

Test IDDescriptionPreconditionsStepsExpected ResultPriority
AUTH-001Valid registration with email and passwordNo existing account with the test email1. Navigate to /sign-up. 2. Enter valid name, email, username, and password. 3. Accept terms. 4. Click “Sign Up”.Account is created. User is redirected to email verification or onboarding. Success toast displayed.P0
AUTH-002Duplicate email rejectedAccount with test@example.com already exists1. Navigate to /sign-up. 2. Enter test@example.com as email. 3. Fill remaining fields. 4. Click “Sign Up”.Form displays error: email already in use. Account is not created.P0
AUTH-003Duplicate username rejectedAccount with username existinguser already exists1. Navigate to /sign-up. 2. Enter existinguser as username. 3. Fill remaining fields. 4. Click “Sign Up”.Form displays error: username already taken. Account is not created.P1
AUTH-004Weak password rejectedNone1. Navigate to /sign-up. 2. Enter a password shorter than 8 characters. 3. Click “Sign Up”.Form displays password strength error. Account is not created.P1
AUTH-005Email verification flow after sign upNewly registered account1. Complete sign up. 2. Check email inbox for verification link. 3. Click verification link.Email is marked verified. User can proceed to onboarding or dashboard.P0
AUTH-006Google OAuth sign upNo existing account linked to Google1. Navigate to /sign-up. 2. Click “Continue with Google”. 3. Complete Google OAuth consent.Account is created and linked to Google. User is redirected to onboarding.P0
AUTH-007Required fields validationNone1. Navigate to /sign-up. 2. Leave all fields empty. 3. Click “Sign Up”.Form displays validation errors for all required fields.P1
AUTH-008Invalid email format rejectedNone1. Navigate to /sign-up. 2. Enter notanemail in email field. 3. Click “Sign Up”.Form displays invalid email format error.P1
Test IDDescriptionPreconditionsStepsExpected ResultPriority
AUTH-010Valid login with email and passwordVerified account exists1. Navigate to /sign-in. 2. Enter valid email and password. 3. Click “Sign In”.User is authenticated and redirected to /feed or last visited page. Session cookie is set.P0
AUTH-011Invalid credentials rejectedNone1. Navigate to /sign-in. 2. Enter incorrect email or password. 3. Click “Sign In”.Error message displayed: invalid credentials. User is not authenticated.P0
AUTH-012Google OAuth sign inAccount linked to Google exists1. Navigate to /sign-in. 2. Click “Continue with Google”. 3. Complete Google OAuth.User is authenticated and redirected to dashboard.P0
AUTH-013Session persistence across page reloadUser is signed in1. Sign in successfully. 2. Reload the page. 3. Navigate to a protected route.User remains authenticated. No redirect to sign in.P1
AUTH-014Session persistence across tabsUser is signed in1. Sign in successfully. 2. Open a new browser tab. 3. Navigate to the app.User is authenticated in the new tab.P2

Password Reset (/forgot-password, /reset-password)

Section titled “Password Reset (/forgot-password, /reset-password)”
Test IDDescriptionPreconditionsStepsExpected ResultPriority
AUTH-020Request password resetAccount with email exists1. Navigate to /forgot-password. 2. Enter registered email. 3. Click “Send Reset Link”.Success message displayed. Reset email sent to the address.P0
AUTH-021Reset password with valid tokenReset email received with valid token1. Click reset link from email. 2. Navigate to /reset-password with token. 3. Enter new password. 4. Click “Reset Password”.Password is updated. User is redirected to sign in. Success message displayed.P0
AUTH-022Expired reset token rejectedReset token older than expiry window1. Click an expired reset link. 2. Attempt to set new password.Error message: token expired. User is prompted to request a new reset.P1
AUTH-023Reset for non-existent emailNo account with the entered email1. Navigate to /forgot-password. 2. Enter unregistered email. 3. Click “Send Reset Link”.Generic success message displayed (no information leak). No email sent.P1
Test IDDescriptionPreconditionsStepsExpected ResultPriority
AUTH-030Successful sign outUser is signed in1. Click user menu. 2. Click “Sign Out”.Session is destroyed. User is redirected to /sign-in. Protected routes are no longer accessible.P0
AUTH-031Session cookie cleared on sign outUser is signed in1. Sign out. 2. Check browser cookies.Auth session cookie is removed or invalidated.P1
AUTH-032Back button after sign outUser just signed out1. Sign out. 2. Press browser back button.User is not re-authenticated. Redirected to sign in if hitting a protected route.P1
Test IDDescriptionPreconditionsStepsExpected ResultPriority
AUTH-040Protected route redirects unauthenticated userUser is not signed in1. Navigate directly to /feed.User is redirected to /sign-in. Original URL is preserved for redirect after login.P0
AUTH-041Auth routes redirect authenticated userUser is signed in1. Navigate to /sign-in.User is redirected to /feed or dashboard. Sign-in form is not shown.P1
AUTH-042Admin routes check roleUser is signed in with non-admin role1. Navigate to /admin.User is redirected to /feed or shown a 403 forbidden page.P1
AUTH-043Onboarding gate for incomplete profileUser is signed in but has not completed onboarding1. Navigate to /feed.User is redirected to /onboarding. Cannot bypass until onboarding is complete.P0
AUTH-044Completed onboarding skips gateUser has completed onboarding1. Navigate to /onboarding.User is redirected to /feed. Onboarding form is not shown again.P2

Email Verification (/verify-email, /verify/[code])

Section titled “Email Verification (/verify-email, /verify/[code])”
Test IDDescriptionPreconditionsStepsExpected ResultPriority
AUTH-050Valid verification codeUnverified account with valid code1. Navigate to /verify/[valid-code].Email is marked verified. Success message displayed. User is redirected to onboarding or dashboard.P0
AUTH-051Expired verification codeVerification code past expiry window1. Navigate to /verify/[expired-code].Error message: code expired. Option to resend verification email.P1
AUTH-052Resend verification emailUnverified account, signed in1. Navigate to /verify-email. 2. Click “Resend Verification Email”.New verification email sent. Success message displayed. Previous code is invalidated.P1
AUTH-053Invalid verification codeNone1. Navigate to /verify/invalid-code-123.Error message: invalid code. User is not verified.P1