Skip to content

Support Tickets Tests

Test IDDescriptionPreconditionsStepsExpected ResultPriority
SUP-001Load tickets dashboardUser has support tickets as business owner1. Navigate to /business/apps/support.Tickets listed with subject, status, priority, department, requester info, and last updated date. Stats shown for open and replied counts.P0
SUP-002Filter by statusTickets in different statuses exist1. Set ?status=open.Only open tickets displayed.P1
SUP-003Filter by priorityTickets with different priorities exist1. Set ?priority=high.Only high priority tickets displayed.P1
SUP-004Combined status and priority filtersDiverse ticket data1. Set ?status=open&priority=high.Only open, high-priority tickets displayed.P2
SUP-005Empty tickets listUser has no tickets1. Navigate to dashboard.Empty state displayed. Stats show open: 0, replied: 0.P1
SUP-006Tickets ordered by updated_atMultiple tickets exist1. Navigate to dashboard.Tickets sorted by most recently updated first.P1
SUP-007Requester info displayedTickets have associated requesters1. Navigate to dashboard.Each ticket shows requester username, full name, and avatar from the profiles join.P1
SUP-008Department info displayedTickets have assigned departments1. Navigate to dashboard.Each ticket shows department name from the departments join.P1
SUP-009Unauthenticated accessNot signed in1. Navigate to dashboard without auth.Returns empty data (tickets: [], stats: null).P1

Ticket Detail (/business/apps/support/[ticketId])

Section titled “Ticket Detail (/business/apps/support/[ticketId])”
Test IDDescriptionPreconditionsStepsExpected ResultPriority
SUP-010View ticket detailTicket exists for user (owner)1. Navigate to /business/apps/support/{ticketId}.Ticket details displayed: subject, status, priority, department, requester. Message thread shown in chronological order with author profiles (username, full_name, avatar).P0
SUP-011Non-existent ticket returns 404None1. Navigate to /business/apps/support/{nonexistent-id}.Returns 404 “Ticket not found”.P1
SUP-012Access ticket not owned by userTicket belongs to different owner1. Navigate to ticket detail for a ticket where owner_id differs.Returns 404 (query filters by owner_id, so it appears as not found).P0
Test IDDescriptionPreconditionsStepsExpected ResultPriority
SUP-020Reply to ticketTicket exists1. Enter reply content in the text field. 2. Optionally attach a file URL. 3. Submit reply action.Message created in support_messages table. Ticket status updated to “replied”. Ticket updated_at refreshed. replied: true returned.P0
SUP-021Reply with attachmentTicket exists1. Enter content and provide attachment URL. 2. Submit reply.Message created with attachment_url populated.P1
SUP-022Reply with empty contentTicket exists1. Submit reply with empty or whitespace-only content.Returns 400 “Content is required”. No message created.P0
SUP-023Unauthenticated replyNot signed in1. Submit reply without auth.Returns 401.P0
Test IDDescriptionPreconditionsStepsExpected ResultPriority
SUP-030Close ticketTicket is open or replied1. Submit close action.Ticket status set to “closed”. updated_at refreshed. closed: true returned.P0
SUP-031Reopen ticketTicket is closed1. Submit reopen action.Ticket status set to “open”. updated_at refreshed. reopened: true returned.P0
SUP-032Close already closed ticketTicket is closed1. Submit close action.Status remains “closed”. No error (idempotent update).P2
SUP-033Reopen already open ticketTicket is open1. Submit reopen action.Status remains “open”. No error (idempotent update).P2
SUP-034Unauthenticated closeNot signed in1. Submit close without auth.Returns 401.P0
SUP-035Unauthenticated reopenNot signed in1. Submit reopen without auth.Returns 401.P0

Departments (/business/apps/support/departments)

Section titled “Departments (/business/apps/support/departments)”
Test IDDescriptionPreconditionsStepsExpected ResultPriority
SUP-040List departmentsUser has departments1. Navigate to /business/apps/support/departments.All departments listed with name, description, and ticket count (from support_tickets aggregate). Create form available.P0
SUP-041Empty departments listNo departments exist1. Navigate to departments page.Empty state displayed. Create form still available.P1
SUP-042Create departmentNone1. Fill department form (name, optional description). 2. Submit create action.Department created. Success message “Department created!” displayed. Department appears in list.P0
SUP-043Create department with validation errorsNone1. Submit create with empty name.Returns 400 with form validation error “Name is required”.P1
SUP-044Create department with long nameNone1. Submit create with name exceeding 100 characters.Returns 400 with validation error (max 100 chars).P2
SUP-045Create department with long descriptionNone1. Submit create with description exceeding 500 characters.Returns 400 with validation error (max 500 chars).P2
SUP-046Update departmentDepartment exists1. Submit update action with id, name, and description.Department updated. updated: true returned.P1
SUP-047Update department missing fieldsNone1. Submit update without id or name.Returns 400 “Missing fields”.P1
SUP-048Delete departmentDepartment exists with no tickets1. Submit delete action with department id.Department deleted. deleted: true returned.P1
SUP-049Delete department with ticketsDepartment has associated tickets1. Submit delete action.Returns 500 with foreign key constraint error. Department preserved.P1
SUP-050Delete department missing IDNone1. Submit delete without id.Returns 400 “Missing department ID”.P2
SUP-051Unauthenticated department actionsNot signed in1. Submit create, update, or delete without auth.Returns 401.P0
SUP-052Department scoped to ownerUser A creates department1. User B navigates to departments.User B does not see User A’s departments (query filters by owner_id).P0