# Testing Checklist

## Public Pages

### Homepage
- [ ] Hero post displays correctly
- [ ] Latest articles section loads
- [ ] Random and popular post sections render
- [ ] Category sections show posts
- [ ] Sidebar widgets load (search, newsletter, popular)
- [ ] Footer renders with quick links, latest posts, newsletter form
- [ ] Breaking news ticker scrolls

### Blog
- [ ] Blog page lists published posts
- [ ] Pagination works (next/prev)
- [ ] Post cards show image, title, excerpt, date, category

### Single Post
- [ ] Post content renders with formatting
- [ ] Featured image displays
- [ ] Author info shows
- [ ] Related posts appear
- [ ] View counter increments
- [ ] Open Graph tags present in source
- [ ] Structured data (JSON-LD) in source

### Search
- [ ] Search returns relevant results
- [ ] Empty search shows appropriate message
- [ ] Search results link to posts

### Category Pages
- [ ] Category archive shows filtered posts
- [ ] Pagination works within category

### Static Pages
- [ ] About Us (`/about-us`) renders content
- [ ] Privacy Policy (`/privacy-policy`) renders
- [ ] Terms and Conditions (`/terms-and-conditions`) renders
- [ ] User Policy (`/user-policy`) renders
- [ ] Contact Us (`/contact-us`) shows form

### Contact Form
- [ ] Form validates required fields
- [ ] Invalid email rejected
- [ ] Short name/subject/message rejected
- [ ] Successful submission shows flash message
- [ ] Message stored in database
- [ ] Old input preserved on validation error

### Navigation
- [ ] Category dropdowns open on click
- [ ] Policies dropdown shows 3 child pages
- [ ] About Us and Contact Us links work
- [ ] Auth links change based on login state
- [ ] Mobile hamburger menu works

### Newsletter
- [ ] Subscription form accepts valid email
- [ ] Duplicate email handled gracefully
- [ ] Verification email sent (when SMTP configured)
- [ ] Verification link confirms subscription
- [ ] Unsubscribe link works with token
- [ ] Re-subscribe after unsubscribe works

## Authentication

- [ ] Login with valid credentials succeeds
- [ ] Login with wrong password shows error
- [ ] Account locks after 5 failed attempts
- [ ] IP blocks after 20 failed attempts in 15 min
- [ ] Pending user cannot log in
- [ ] Suspended user cannot log in
- [ ] Registration creates pending account
- [ ] Registration validates all fields
- [ ] Duplicate email/username rejected
- [ ] Logout clears session

## Subscriber Dashboard

- [ ] Dashboard shows stats
- [ ] Create post form works
- [ ] Edit own post works
- [ ] Delete own post works
- [ ] Submit post changes status to pending
- [ ] Cannot access admin routes

## Admin Panel

### Dashboard
- [ ] Stats cards show correct counts
- [ ] Recent activity displays

### Posts
- [ ] List all posts with filters
- [ ] Create new post (title, body, image, category, SEO)
- [ ] Edit existing post
- [ ] Delete post
- [ ] Pending approvals list
- [ ] Approve post → status changes to published
- [ ] Reject post → status changes to rejected

### Categories
- [ ] List categories with hierarchy
- [ ] Create parent and child categories
- [ ] Edit category
- [ ] Delete category

### Users
- [ ] List all users
- [ ] Pending subscribers list
- [ ] Approve subscriber
- [ ] Reject subscriber
- [ ] Suspend user
- [ ] Delete user
- [ ] Create manager account

### AI Bot
- [ ] Bot dashboard shows stats
- [ ] Add keyword manually
- [ ] Fetch default topics
- [ ] Select/skip/delete keywords
- [ ] Generate article from keyword
- [ ] View/edit bot article
- [ ] Approve/reject/publish/delete article
- [ ] Error logs display and clear

### Newsletter Admin
- [ ] Subscriber list with filter tabs
- [ ] Delete subscriber
- [ ] Compose newsletter (post-based)
- [ ] Compose custom newsletter
- [ ] Process queue button works
- [ ] Campaign logs with stats
- [ ] Log detail shows per-recipient status

### Contact Messages
- [ ] List contact messages
- [ ] View individual message
- [ ] Delete message

### Pages
- [ ] List all static pages
- [ ] Edit page content and SEO fields
- [ ] Toggle published status
- [ ] View page link works

### Settings
- [ ] Settings page loads
- [ ] Update settings saves correctly

## SEO
- [ ] Sitemap at `/sitemap.xml` generates valid XML
- [ ] robots.txt accessible at `/robots.txt`
- [ ] Meta descriptions on all pages
- [ ] Canonical URLs on posts and pages
- [ ] Open Graph tags in page source

## Responsive Design
- [ ] Desktop (1200px+) — all layouts correct
- [ ] Tablet (768px) — grid adjusts, sidebar stacks
- [ ] Mobile (375px) — single column, hamburger menu
- [ ] Contact form fields stack on mobile
- [ ] Admin sidebar collapses on mobile
- [ ] Tables scroll horizontally on mobile

## Error Pages
- [ ] 404 page for invalid URLs
- [ ] 403 page for unauthorized access
- [ ] 500 page for server errors (test with debug=false)
