Testing
Ensure your theme works correctly before deployment.
Pre-Deployment Checklist
1. Visual Testing
2. Functionality Testing
3. Responsive Design
4. Performance
5. Accessibility
Browser Testing
Test in major browsers:
Chrome (latest)
Firefox (latest)
Safari (if applicable)
Edge (latest)
Device Testing
Test on various devices:
Desktop (1920x1080, 1366x768)
Tablet (768x1024)
Mobile (375x667, 414x896)
Testing Tools
Browser DevTools
Responsive design mode - Test different screen sizes
Console - Check for JavaScript errors
Network tab - Monitor loading times
Lighthouse - Performance and accessibility audit
Online Tools
BrowserStack - Cross-browser testing
Can I Use - Browser compatibility
WebPageTest - Performance testing
WAVE - Accessibility evaluation
Debug Mode
Enable Symfony debug toolbar (development environment):
This shows:
Which templates are being rendered
Database queries
Performance metrics
Request/response information
Common Issues and Solutions
Templates Not Loading
Symptoms:
Page displays incorrectly
Template not found errors
Default theme showing instead of your theme
Solutions:
Check file paths and naming
Clear Symfony cache:
docker exec pteroca_web_dev php bin/console cache:clearVerify template.json is valid JSON
Ensure theme is activated in Settings → Appearance
Check file permissions
Styles Not Applying
Symptoms:
CSS changes not visible
Default styles appearing
Broken layout
Solutions:
Check CSS file paths in templates
Verify files are in correct public directory (
public/assets/theme/my-theme/)Clear browser cache (Ctrl+Shift+R)
Check for CSS syntax errors
Verify CSS is included in template using
{% block head_stylesheets %}Check browser console for 404 errors
JavaScript Errors
Symptoms:
Features not working
Console errors
Page not interactive
Solutions:
Open browser console (F12)
Check for syntax errors
Verify script paths are correct
Ensure jQuery/Bootstrap is loaded (if using)
Check for conflicting scripts
Verify
{% block body_javascript %}is used correctly
Responsive Issues
Symptoms:
Layout broken on mobile
Text too small or too large
Elements overlapping
Horizontal scrolling
Solutions:
Use browser responsive design mode to test
Test on actual devices when possible
Check media query breakpoints
Verify Bootstrap classes are correct
Test with different orientations (portrait/landscape)
Check viewport meta tag is present
Performance Issues
Symptoms:
Slow page load times
Laggy interactions
High resource usage
Solutions:
Minify CSS and JavaScript files
Optimize and compress images
Use browser caching
Remove unused CSS/JS
Use Lighthouse audit to identify bottlenecks
Consider lazy loading for images
Testing Workflow
1. Development Testing
During development:
Use
APP_ENV=devfor detailed error messagesTest changes immediately in browser
Check console for errors after each change
Use Symfony debug toolbar
2. Pre-Production Testing
Before going live:
Switch to
APP_ENV=prodto test production modeClear all caches
Test all pages systematically
Check multiple browsers and devices
Run Lighthouse audit
Verify no console errors
3. User Acceptance Testing
Final validation:
Have real users test the theme
Gather feedback on usability
Check for edge cases
Verify all workflows work
Test with real data
Automated Testing
HTML Validation
CSS Validation
JavaScript Linting
Debugging Tips
1. Template Not Found
Verify theme is active via Admin Panel (Settings → Appearance → Current theme).
2. Asset Not Loading
3. JavaScript Not Working
4. CSS Not Applying
Quality Assurance
Before Release
Code Review - Review all template and asset changes
Security Check - Ensure no XSS vulnerabilities
Performance Test - Verify acceptable load times
Browser Test - Check all target browsers
Mobile Test - Verify mobile experience
Documentation - Update theme documentation
Backup - Backup current theme before replacing
After Release
Monitor errors - Check logs for issues
Gather feedback - Collect user feedback
Fix bugs - Address reported issues promptly
Update docs - Document any issues and solutions
Related Guides
Creating Themes - Theme creation workflow
Overriding Templates - Customize templates
Styling - CSS customization
JavaScript - Add interactivity
External Resources
Lighthouse - Audit tool
BrowserStack - Cross-browser testing
WAVE - Accessibility checker
PageSpeed Insights - Performance analysis
Last updated