QA Testing Plan: Forums
This document covers QA test cases for the Forums business app located at /business/apps/forums. The app supports creating forum boards via a dialog with validated fields (title, slug, description), listing forums with topic counts, deleting forums, and navigating to forum topics.
Routes Under Test
Section titled “Routes Under Test”| Route | Purpose |
|---|---|
/business/apps/forums | Forum list with create dialog and delete action |
/forums/{slug} | Public forum view with topics (linked from management page) |
Form Actions Reference
Section titled “Form Actions Reference”| Route | Action | Method | Key Fields |
|---|---|---|---|
/business/apps/forums | create | POST | title (required, max 200), slug (required, max 200), description (optional, max 1000) |
/business/apps/forums | delete | POST | forum_id |
Validation Schema
Section titled “Validation Schema”createForumSchema: title: string, min 1, max 200 (required) slug: string, min 1, max 200 (required) description: string, max 1000 (optional)1. Forum List
Section titled “1. Forum List”| Test ID | Description | Preconditions | Steps | Expected Result | Priority |
|---|---|---|---|---|---|
| FRM-001 | Forum list loads for authenticated user | User is logged in with forums | 1. Navigate to /business/apps/forums | Forum list is displayed with title, topic count, and creation date. Create form is initialized. | P0 |
| FRM-002 | Empty state when no forums | User is logged in with no forums | 1. Navigate to /business/apps/forums | Empty state with MessageCircleIcon and “No forums yet. Create your first one to get started.” | P1 |
| FRM-003 | Unauthenticated user gets empty data | User is not logged in | 1. Navigate to /business/apps/forums | Page loads with empty forums array and form: null. No crash. | P1 |
| FRM-004 | Forum row links to public forum page | User has forums | 1. Click a forum row | Navigates to /forums/{slug}. | P1 |
| FRM-005 | Topic count displays correctly | Forums have topics | 1. View forum list | Each forum shows {count} topics from forum_topics join. | P1 |
| FRM-006 | ”New Forum” button opens create dialog | User is logged in | 1. Click “New Forum” button | Dialog opens with title “New Forum”, description, and form fields for title, slug, description. | P0 |
2. Create Forum
Section titled “2. Create Forum”| Test ID | Description | Preconditions | Steps | Expected Result | Priority |
|---|---|---|---|---|---|
| FRM-010 | Create forum with required fields | User is logged in | 1. Open create dialog 2. Fill title and slug 3. Submit | Forum is created. Toast “Forum created!” appears. Dialog closes. Forum list refreshes. | P0 |
| FRM-011 | Create forum with all fields | User is logged in | 1. Fill title, slug, and description 2. Submit | Forum is created with description persisted. | P0 |
| FRM-012 | Validation: empty title rejected | User is logged in | 1. Leave title blank 2. Submit | Client-side validation error shown. Form does not submit. | P0 |
| FRM-013 | Validation: empty slug rejected | User is logged in | 1. Leave slug blank 2. Submit | Client-side validation error shown. Form does not submit. | P0 |
| FRM-014 | Validation: title exceeds 200 characters | User is logged in | 1. Enter title with 201+ characters 2. Submit | Validation error for max length. | P1 |
| FRM-015 | Validation: slug exceeds 200 characters | User is logged in | 1. Enter slug with 201+ characters 2. Submit | Validation error for max length. | P1 |
| FRM-016 | Validation: description exceeds 1000 characters | User is logged in | 1. Enter description with 1001+ characters 2. Submit | Validation error for max length. | P1 |
| FRM-017 | Server error returns message | User is logged in, database insert fails (e.g., duplicate slug) | 1. Submit form that triggers DB error | Form returns 500 with error message displayed. | P1 |
| FRM-018 | Create action requires authentication | User is not logged in | 1. POST to ?/create | Returns 401 fail. | P0 |
| FRM-019 | Dialog cancel button closes without submitting | User is logged in | 1. Open create dialog 2. Click “Cancel” | Dialog closes. No form submission. No forum created. | P2 |
| FRM-020 | Submit button shows loading state | User is logged in | 1. Submit the create form | Button is disabled and shows Loader2 spinner while $formSubmitting is true. | P2 |
3. Delete Forum
Section titled “3. Delete Forum”| Test ID | Description | Preconditions | Steps | Expected Result | Priority |
|---|---|---|---|---|---|
| FRM-030 | Delete a forum | User owns the forum | 1. Click the delete (trash) button on a forum row | delete action fires with correct forum_id. Forum is removed. Toast “Forum deleted.” appears. | P0 |
| FRM-031 | Delete scoped to owner | User is logged in but does not own the forum | 1. POST to ?/delete with forum_id belonging to another owner | Delete query matches on owner_id, so no rows are affected. Forum remains. | P1 |
| FRM-032 | Delete fails without forum_id | User is logged in | 1. POST to ?/delete without forum_id | Returns 400 “Missing forum ID”. | P1 |
| FRM-033 | Delete handles server error | User is logged in, database delete fails | 1. Trigger server error during deletion | Returns 500 with error message. | P1 |
| FRM-034 | Delete action requires authentication | User is not logged in | 1. POST to ?/delete | Returns 401 fail. | P0 |
| FRM-035 | Hidden input sends correct forum_id | User owns forums | 1. Inspect delete form markup | Hidden input name="forum_id" contains the correct forum ID. | P2 |
4. Client-Side Behavior
Section titled “4. Client-Side Behavior”| Test ID | Description | Preconditions | Steps | Expected Result | Priority |
|---|---|---|---|---|---|
| FRM-040 | Superforms client validation on create | User opens the create dialog | 1. Type and clear the title field 2. Observe validation | Client-side validation via zodClient shows error immediately without server round-trip. | P1 |
| FRM-041 | Form resets after successful creation | User creates a forum successfully | 1. Create a forum 2. Reopen the create dialog | Form fields are reset to empty defaults. | P2 |
| FRM-042 | Toast notification on successful create | User creates a forum | 1. Submit valid create form | svelte-sonner toast appears with success message. | P1 |
| FRM-043 | Toast notification on successful delete | User deletes a forum | 1. Click delete button | svelte-sonner toast appears with “Forum deleted.” message. | P1 |
| FRM-044 | Progressive enhancement with use:enhance | JavaScript is disabled | 1. Submit create or delete form without JS | Forms submit via standard POST. Server handles request and returns appropriate response. | P2 |