Test Cases: Validation & Input Errors

Module: Edge Cases - Validation

Priority: P2

Phase: 6 (Days 17-18)

Prerequisites


1. Form Validation - Required Fields

TC-VAL-01: Login Form - Empty Fields

StepActionExpected Result
1Navigate to /login.Login form displayed.
2Click "Sign In" without entering any data.Validation errors: "Email is required", "Password is required".
3Enter email only, click Sign In.Validation error: "Password is required".
4Enter password only, click Sign In.Validation error: "Email is required".

TC-VAL-02: Registration Form - Required Fields

StepActionExpected Result
1Navigate to /register.Registration form displayed.
2Click "Register" with all fields empty.Validation errors for all required fields.
3Fill partial fields (name only).Remaining required fields show errors.
4Verify each required field shows error when missing.Name, Email, Password, Confirm Password all required.

TC-VAL-03: Invoice Creation - Required Fields

StepActionExpected Result
1Login as treasurer@demo.membervu.com.Dashboard displayed.
2Navigate to Admin > Invoices > Create.Invoice form displayed.
3Click "Create" without selecting member.Error: "Member is required".
4Select member but no line items.Error: "At least one line item required".
5Add line item with empty description.Error: "Description is required".

TC-VAL-04: Event Creation - Required Fields

StepActionExpected Result
1Login as events@demo.membervu.com.Dashboard displayed.
2Navigate to Admin > Events > Create.Event wizard Step 1.
3Click "Next" without filling title.Error: "Event title is required".
4Enter title, skip description.Allowed (description optional) or error if required.
5Proceed through wizard, skip date.Error: "Event date is required".

2. Email Validation

TC-VAL-05: Invalid Email Formats

StepActionExpected Result
1Navigate to /register.Form displayed.
2Enter email: "notanemail".Error: "Invalid email format".
3Enter email: "missing@domain".Error: "Invalid email format".
4Enter email: "@nodomain.com".Error: "Invalid email format".
5Enter email: "spaces in@email.com".Error: "Invalid email format".
6Enter email: "valid@email.com".No error, field accepted.

TC-VAL-06: Email Uniqueness

StepActionExpected Result
1Navigate to /register.Form displayed.
2Enter existing email: testmember@rcme.membervu.com.-
3Fill remaining fields and submit.Error: "Email already registered" or "Account exists".
4Verify no account created.Database unchanged.

3. Password Validation

TC-VAL-07: Password Strength Requirements

StepActionExpected Result
1Navigate to /register.Form displayed.
2Enter password: "abc".Error: "Minimum 8 characters".
3Enter password: "abcdefgh".Error: "Must include uppercase letter".
4Enter password: "Abcdefgh".Error: "Must include number".
5Enter password: "Abcdefg1".Error: "Must include special character".
6Enter password: "Abcdefg1!".Password accepted.

TC-VAL-08: Password Confirmation Mismatch

StepActionExpected Result
1Navigate to /register.Form displayed.
2Enter password: "ValidPass1!".-
3Enter confirm password: "DifferentPass1!".Error: "Passwords do not match".
4Enter matching confirm password.No error.

4. Numeric Field Validation

TC-VAL-09: Payment Amount Validation

StepActionExpected Result
1Login as testmember@rcme.membervu.com.Dashboard displayed.
2Navigate to a pending invoice, click Pay.Payment form displayed.
3Enter amount: 0.Error: "Amount must be greater than 0".
4Enter amount: -100.Error: "Invalid amount".
5Enter amount: "abc".Error: "Must be a number" or field rejects non-numeric.
6Enter amount: 999999999999.Error or handling for max amount.

TC-VAL-10: Invoice Line Item Amount

StepActionExpected Result
1Open invoice creation form.Form displayed.
2Add line item with amount: 0.Error: "Amount must be greater than 0".
3Add line item with amount: -500.Error: "Invalid amount".
4Add line item with amount: "free".Field rejects or error.

TC-VAL-11: Event Capacity Validation

StepActionExpected Result
1Open event creation wizard.Wizard displayed.
2Enter capacity: 0.Error or warning: "Invalid capacity".
3Enter capacity: -10.Error: "Capacity must be positive".
4Enter capacity: 1000000.Accepted or reasonable limit warning.

5. Date Validation

TC-VAL-12: Invoice Due Date

StepActionExpected Result
1Open invoice creation form.Form displayed.
2Set due date: yesterday.Warning: "Due date is in the past" (may allow).
3Set due date: 10 years ago.Error or strong warning.
4Set due date: 10 years in future.Allowed (no reasonable limit).

TC-VAL-13: Event Date Validation

StepActionExpected Result
1Open event creation wizard.Wizard displayed.
2Set start date: past date.Warning: "Event date is in the past" (may allow for testing).
3Set end date before start date.Error: "End date must be after start date".
4Set start time after end time (same day).Error: "End time must be after start time".

6. File Upload Validation

TC-VAL-14: Payment Proof File Size

StepActionExpected Result
1Open payment form with file upload.Upload field displayed.
2Select file > 5MB.Error: "File too large. Maximum 5MB".
3Select file exactly 5MB.Accepted (boundary).
4Select file < 5MB.Accepted.

TC-VAL-15: Payment Proof File Type

StepActionExpected Result
1Open payment form with file upload.Upload field displayed.
2Select .exe file.Error: "Invalid file type. Allowed: JPG, PNG, PDF".
3Select .zip file.Error: "Invalid file type".
4Select .doc file.Error: "Invalid file type".
5Select .jpg file.Accepted.
6Select .png file.Accepted.
7Select .pdf file.Accepted.

TC-VAL-16: Avatar Upload Validation

StepActionExpected Result
1Navigate to profile settings.Profile form displayed.
2Upload avatar > 2MB.Error: "Avatar too large. Maximum 2MB".
3Upload non-image file.Error: "Invalid file type".
4Upload valid JPG/PNG < 2MB.Accepted, preview shown.

7. Text Length Validation

TC-VAL-17: Character Limits

StepActionExpected Result
1Open event creation - title field.-
2Enter 500 characters.Truncated or error if max exceeded.
3Open broadcast - subject field.-
4Enter 150 characters (max ~100).Truncated or error.
5Open invoice note field.-
6Enter very long text (1000+ chars).Accepted or truncated gracefully.

TC-VAL-18: Special Characters Handling

StepActionExpected Result
1Enter name: "O'Connor".Accepted (apostrophe).
2Enter name: "José García".Accepted (accents).
3Enter text: "".Text escaped/sanitized on display.
4Enter text: "Test & Demo".Ampersand displayed correctly.

8. Form State Validation

TC-VAL-19: Unsaved Changes Warning

StepActionExpected Result
1Open any form (invoice, event, profile).Form displayed.
2Make changes but don't save.Form has unsaved data.
3Navigate away (click link or back button).Warning: "You have unsaved changes".
4Cancel navigation.Stay on form, data preserved.
5Confirm navigation.Navigate away, data lost.

TC-VAL-20: Submit Button State

StepActionExpected Result
1Open any form.Submit button enabled.
2Clear a required field.Submit button may disable or remain enabled.
3Click submit with validation errors.Form not submitted, errors highlighted.
4Fix all errors.Submit button enabled/functional.

9. Access Without Authentication

TC-VAL-21: Protected Page Access

StepActionExpected Result
1Open incognito/private browser.No session.
2Navigate to /admin/dashboard.Redirect to /login.
3Navigate to /profile.Redirect to /login.
4Navigate to /invoices.Redirect to /login.
5Navigate to /events (public).Allowed (public page).
6Navigate to /events/e2e-paid-event.Allowed (public event landing).

TC-VAL-22: API Access Without Token

StepActionExpected Result
1Open browser DevTools > Console.-
2Call: fetch('/api/membership/members').Status 401 Unauthorized.
3Call: fetch('/api/billing/invoices').Status 401 Unauthorized.
4Call: fetch('/api/events').Status 200 (public endpoint) or 401.

10. Cross-Tenant Data Access

TC-VAL-23: Tenant Isolation

StepActionExpected Result
1Login as admin@rcme.membervu.com (rcme tenant).Dashboard for rcme.
2Note a member ID from this tenant.e.g., member-uuid-123.
3Attempt API: GET /api/membership/members/[other-tenant-member-id].404 or 403 - not found/forbidden.
4Attempt to modify invoice from another tenant.404 or 403 - operation blocked.

Summary Checklist

CategoryTest CasesPriority
Required FieldsTC-VAL-01 to TC-VAL-04P1
Email ValidationTC-VAL-05 to TC-VAL-06P1
Password ValidationTC-VAL-07 to TC-VAL-08P1
Numeric ValidationTC-VAL-09 to TC-VAL-11P1
Date ValidationTC-VAL-12 to TC-VAL-13P2
File UploadTC-VAL-14 to TC-VAL-16P1
Text LengthTC-VAL-17 to TC-VAL-18P2
Form StateTC-VAL-19 to TC-VAL-20P2
Auth ProtectionTC-VAL-21 to TC-VAL-22P0
Tenant IsolationTC-VAL-23P0