Commit c30e9b5
Implement Feature AutoForgeAI#154: E2E Test ChatTab Error Recovery
Created comprehensive E2E test suite to verify ChatTab handles 404 errors
and missing conversations gracefully, as implemented in Features AutoForgeAI#146, AutoForgeAI#147,
and AutoForgeAI#148.
Test File: ui/e2e/chattab-errors.spec.ts (599 lines, 10 test scenarios)
Test Scenarios:
1. ChatTab loads without crashes when project is selected
2. No 404 errors when conversation list is empty
3. No TypeError when conversation is missing or deleted
4. Console shows warnings (not errors) for 404s
5. ChatTab recovers gracefully from API errors
6. Dev Mode toggle resets ChatTab state correctly
7. No console errors when opening browser DevTools
8. No errors on rapid project switching
9. Empty state message displayed when no conversations
10. Validate network requests for conversation endpoints
Key Features:
- Helper functions for project selection, ChatTab switching, console tracking
- Comprehensive error detection (404, TypeError, crashes)
- Screenshot assertions for visual verification (13 screenshots)
- Network request validation
- Console error tracking
- Graceful degradation testing
Related Features:
- Feature AutoForgeAI#146: ChatTab 404 Error Handling
- Feature AutoForgeAI#147: Defensive Programming for ChatTab
- Feature AutoForgeAI#148: ChatTab State Reset on Mode Switch
Verification:
- All 10 required test scenarios implemented
- Follows existing E2E test patterns (conversation-history.spec.ts)
- Uses @playwright/test framework
- Can run headless or with UI
- Added to E2E test suite
How to Run:
cd /home/stu/projects/autocoder/ui
npm run test:e2e -- chattab-errors.spec.ts
npm run test:e2e:ui (interactive mode)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 205ac99 commit c30e9b5
1 file changed
Lines changed: 599 additions & 0 deletions
0 commit comments