QA Testing Plan: Events
This document covers QA test cases for the Events business app located at /business/apps/events. The app supports creating events with online/in-person/hybrid location types, managing ticket types and speakers, tracking ticket sales and revenue, and publish/draft/cancelled/completed lifecycle.
Routes Under Test
Section titled “Routes Under Test”| Route | Purpose |
|---|---|
/business/apps/events | Dashboard with stats and recent events list |
/business/apps/events/new | Create event form (superforms + createEventSchema) |
/business/apps/events/[id] | Event detail with ticket types, speakers, sales, publish/delete |
Form Actions Reference
Section titled “Form Actions Reference”| Route | Action | Method | Key Fields |
|---|---|---|---|
/business/apps/events/new | default | POST | title, description, short_description, thumbnail_url, location, location_type, link, starts_at, ends_at, timezone, capacity |
/business/apps/events/[id] | publish | POST | (none) |
/business/apps/events/[id] | delete | POST | (none) |
/business/apps/events/[id] | create-ticket-type | POST | Via createTicketTypeSchema |
/business/apps/events/[id] | delete-ticket-type | POST | ticket_type_id |
/business/apps/events/[id] | add-speaker | POST | Via addSpeakerSchema |
/business/apps/events/[id] | remove-speaker | POST | speaker_id |
1. Dashboard and Navigation
Section titled “1. Dashboard and Navigation”| Test ID | Description | Preconditions | Steps | Expected Result | Priority |
|---|---|---|---|---|---|
| EVT-001 | Dashboard loads with organizer stats | User is logged in with events | 1. Navigate to /business/apps/events | Stats cards display: Total Events, Published, Tickets Sold, Revenue. Recent events list shows up to 5 items. | P0 |
| EVT-002 | Dashboard shows empty state for new user | User is logged in with no events | 1. Navigate to /business/apps/events | Stats section is hidden. Empty state “No events yet” is displayed. | P1 |
| EVT-003 | Unauthenticated user sees null stats | User is not logged in | 1. Navigate to /business/apps/events | Page loads with stats: null and empty upcomingEvents. No crash. | P1 |
| EVT-004 | ”New Event” button navigates correctly | User is logged in | 1. Click “New Event” button | Navigates to /business/apps/events/new. | P0 |
| EVT-005 | Recent event links navigate to detail | User has events | 1. Click an event in the recent list | Navigates to /business/apps/events/{id}. | P1 |
| EVT-006 | Status badges render correct variants | Events with draft, published, cancelled, completed statuses exist | 1. View recent events list | draft = secondary, published = default, cancelled = destructive, completed = outline. | P2 |
| EVT-007 | Location type displays correctly | Events with different location types exist | 1. View recent events list | Location type shows with underscores replaced by spaces (e.g., “in person”). | P2 |
2. Create Event
Section titled “2. Create Event”| Test ID | Description | Preconditions | Steps | Expected Result | Priority |
|---|---|---|---|---|---|
| EVT-010 | Create event with required fields only | User is logged in | 1. Navigate to /business/apps/events/new 2. Fill title, starts_at, ends_at 3. Submit | Event is created. User is redirected to /business/apps/events/{new_id}. | P0 |
| EVT-011 | Create event with all fields | User is logged in | 1. Fill title, description, short_description, thumbnail_url, location, location_type, link, starts_at, ends_at, timezone, capacity 2. Submit | Event is created with all fields persisted. Redirect to detail page. | P0 |
| EVT-012 | Validation: empty title rejected | User is logged in | 1. Leave title blank 2. Submit | Form returns 400 with error “Title is required”. | P0 |
| EVT-013 | Validation: title exceeds 255 characters | User is logged in | 1. Enter title with 256+ characters 2. Submit | Form returns 400 with max length error. | P1 |
| EVT-014 | Validation: empty starts_at rejected | User is logged in | 1. Leave starts_at blank 2. Submit | Form returns 400 with error “Start date is required”. | P0 |
| EVT-015 | Validation: empty ends_at rejected | User is logged in | 1. Leave ends_at blank 2. Submit | Form returns 400 with error “End date is required”. | P0 |
| EVT-016 | Validation: short_description exceeds 500 chars | User is logged in | 1. Enter short_description with 501+ chars 2. Submit | Form returns 400 with max length error. | P1 |
| EVT-017 | Validation: location exceeds 500 chars | User is logged in | 1. Enter location with 501+ chars 2. Submit | Form returns 400 with max length error. | P1 |
| EVT-018 | Validation: capacity must be positive integer | User is logged in | 1. Enter capacity as 0 or negative 2. Submit | Form returns 400 with validation error. | P1 |
| EVT-019 | Location type: online | User is logged in | 1. Select location_type “online” 2. Submit | Event is created with location_type: "online". | P1 |
| EVT-020 | Location type: in_person | User is logged in | 1. Select location_type “in_person” 2. Submit | Event is created with location_type: "in_person". | P1 |
| EVT-021 | Location type: hybrid | User is logged in | 1. Select location_type “hybrid” 2. Submit | Event is created with location_type: "hybrid". | P1 |
| EVT-022 | Unauthenticated user redirected from create page | User is not logged in | 1. Navigate to /business/apps/events/new | User is redirected to /login. | P0 |
3. Event Detail and Lifecycle
Section titled “3. Event Detail and Lifecycle”| Test ID | Description | Preconditions | Steps | Expected Result | Priority |
|---|---|---|---|---|---|
| EVT-030 | Load event detail page | User owns the event | 1. Navigate to /business/apps/events/{id} | Event data loads with ticket types, speakers, sales, and totalRevenue. | P0 |
| EVT-031 | 404 for non-existent event | User is logged in | 1. Navigate to /business/apps/events/{invalid_id} | 404 error “Event not found” is returned. | P0 |
| EVT-032 | 403 for event owned by another user | User does not own the event | 1. Navigate to /business/apps/events/{other_user_event_id} | 403 Forbidden error is returned. | P0 |
| EVT-033 | Publish a draft event | User owns a draft event | 1. Submit the publish action | Returns { published: true }. Event status updates to “published”. | P0 |
| EVT-034 | Delete an event | User owns an event | 1. Submit the delete action | Event is deleted. User is redirected to /business/apps/events. | P0 |
| EVT-035 | Revenue calculation on detail page | User owns event with ticket sales | 1. Load event detail page | totalRevenue equals the sum of all sales[].total_amount. | P1 |
4. Ticket Type Management
Section titled “4. Ticket Type Management”| Test ID | Description | Preconditions | Steps | Expected Result | Priority |
|---|---|---|---|---|---|
| EVT-040 | Create ticket type for event | User owns the event | 1. Fill and submit create-ticket-type form | Ticket type is created. Success message “Ticket type created!” is returned. | P0 |
| EVT-041 | Create ticket type validation failure | User owns the event | 1. Submit create-ticket-type with invalid data | Returns 400 with form errors. | P1 |
| EVT-042 | Delete ticket type by ID | User owns the event with ticket types | 1. Submit delete-ticket-type with ticket_type_id | Ticket type is deleted. Returns { deleted: true }. | P0 |
| EVT-043 | Delete ticket type fails without ID | User is logged in | 1. Submit delete-ticket-type without ticket_type_id | Returns 400 “Missing ticket type ID”. | P1 |
| EVT-044 | Delete ticket type handles server error | User is logged in, service throws | 1. Trigger server error during deletion | Returns 500 “Failed to delete ticket type”. | P1 |
| EVT-045 | Create ticket type requires authentication | User is not logged in | 1. POST to ?/create-ticket-type | Returns 401 fail. | P1 |
5. Speaker Management
Section titled “5. Speaker Management”| Test ID | Description | Preconditions | Steps | Expected Result | Priority |
|---|---|---|---|---|---|
| EVT-050 | Add speaker to event | User owns the event | 1. Fill and submit add-speaker form | Speaker is added. Success message “Speaker added!” is returned. | P0 |
| EVT-051 | Add speaker validation failure | User owns the event | 1. Submit add-speaker with invalid data | Returns 400 with form errors. | P1 |
| EVT-052 | Remove speaker by ID | User owns the event with speakers | 1. Submit remove-speaker with speaker_id | Speaker is removed. Returns { removed: true }. | P0 |
| EVT-053 | Remove speaker fails without ID | User is logged in | 1. Submit remove-speaker without speaker_id | Returns 400 “Missing speaker ID”. | P1 |
| EVT-054 | Remove speaker handles server error | User is logged in, service throws | 1. Trigger server error | Returns 500 “Failed to remove speaker”. | P1 |