Testing Philosophy
Estudo Organizado uses manual testing as its primary quality assurance approach. Since the project is built with Vanilla JavaScript without a testing framework, contributors must thoroughly test their changes across different browsers and scenarios.Browser Testing
Supported Browsers
Test your changes on all major browsers:| Browser | Minimum Version | Priority | Notes |
|---|---|---|---|
| Chrome | 90+ | High | Primary development browser |
| Firefox | 88+ | High | Important for PWA testing |
| Safari | 14+ | High | iOS users, WebKit engine |
| Edge | 90+ | Medium | Chromium-based |
Browser-Specific Testing
Chrome DevTools Testing
Chrome DevTools Testing
- Open DevTools (F12)
- Check Console for errors
- Application tab:
- Verify IndexedDB structure
- Check Service Worker status
- Inspect Cache Storage
- Test manifest.json
- Network tab:
- Test offline mode (toggle offline)
- Verify resource caching
- Performance tab:
- Check for memory leaks
- Profile heavy operations
Firefox Testing
Firefox Testing
- Open Developer Tools (F12)
- Storage Inspector:
- Verify IndexedDB data
- Check localStorage migration
- Console:
- Look for warnings and errors
- Network Monitor:
- Test offline functionality
- Verify Service Worker caching
Safari Testing
Safari Testing
- Enable Developer Tools (Preferences > Advanced)
- Web Inspector:
- Check for iOS-specific issues
- Test touch interactions
- Storage tab:
- Verify IndexedDB compatibility
- Console:
- Look for WebKit-specific errors
PWA Testing
Service Worker Validation
The Service Worker (sw.js) is critical for offline functionality:
Installation Test
- Open the app in a supported browser
- Check DevTools > Application > Service Workers
- Verify status shows “activated and running”
- Check registration scope is
/
Cache Test
- Load the app with network enabled
- Open DevTools > Application > Cache Storage
- Verify cache named
estudo-organizado-v1exists - Check that all static assets are cached:
/src/index.html/src/css/*.css/src/js/*.js- Icons and manifest
Offline Mode Test
- Load the app normally
- Open DevTools > Network tab
- Enable offline mode (throttling dropdown)
- Refresh the page
- Verify:
- Page loads successfully
- All features work (reading data)
- UI shows offline indicator if implemented
Offline mode should allow reading all data. Write operations should queue and sync when online.
PWA Installation Test
Desktop Installation
- Open the app in Chrome/Edge
- Look for install icon in address bar
- Click install
- Verify:
- App opens in standalone window
- No browser chrome visible
- Correct app name and icon
Mobile Installation (iOS)
- Open in Safari on iPhone/iPad
- Tap Share button
- Select “Add to Home Screen”
- Verify:
- App appears on home screen
- Correct icon and name
- Opens in fullscreen
- No Safari UI
Mobile Installation (Android)
- Open in Chrome on Android
- Tap “Add to Home Screen” prompt
- Verify:
- Install banner appears
- App installs successfully
- Opens in standalone mode
Manifest Validation
Verifymanifest.json is properly configured:
- Open DevTools > Application > Manifest
- Check all fields:
- Name: “Estudo Organizado”
- Icons: Multiple sizes present
- Theme color matches app
- Display: “standalone”
- Start URL: ”/“
Feature Testing
State Management Testing
IndexedDB Persistence
- Create test data:
- Add an edital
- Create a study event
- Set up a review
- Close the browser completely
- Reopen the app
- Verify:
- All data persists
- No data loss
- No corruption
LocalStorage Migration
- Manually add old data to localStorage:
- Refresh the page
- Verify:
- Data migrates to IndexedDB
- localStorage key is removed
- Data appears in app
Timer Testing
Free Timer Test
- Start free timer (cronômetro livre)
- Let it run for 30+ seconds
- Test scenarios:
- Pause and resume
- Navigate to other tabs
- Return to timer tab
- Refresh page (should reset)
- Close tab and reopen (should reset)
Event Timer Test
- Create study event
- Start event timer
- Test scenarios:
- Pause and resume
- Switch between events
- Navigate to other modules
- Refresh page (should reset per session logic)
- Multiple timers (should only one run)
Expected Timer Behavior
Fromstore.js:96-108:
Sync Testing
Cloudflare Sync
- Configure Cloudflare Worker (see setup docs)
- Enable sync in Configurações
- Make changes (add event, modify edital)
- Wait for debounce (2 seconds)
- Check DevTools Console:
- Look for sync success messages
- Verify no errors
- Open on different device
- Verify data synced
Google Drive Backup
- Connect Google Drive in settings
- Trigger backup
- Check Google Drive:
- File created/updated
- Contains valid JSON
- Restore from backup
- Verify data integrity
Migration Testing
When modifying schema migrations (store.js:222-343):
Test Each Migration Path
- Create mock data at old schema version:
- Manually set in IndexedDB
- Reload app
- Verify:
- Migration runs
- Schema version updates
- Data transforms correctly
- No data loss
Migration Test Checklist
Migration Test Checklist
- ✅ Schema version 1 → 2
- ✅ Schema version 2 → 3
- ✅ Schema version 3 → 4
- ✅ Schema version 4 → 5
- ✅ Schema version 6 → 7 (Wave 39)
- ✅ Direct jump from v1 to latest
- ✅ Invalid/corrupt data handling
Module-Specific Testing
Study Organizer Module
- Create study events
- Start/pause/stop timers
- Mark events as complete
- Verify time tracking accuracy
- Test Pomodoro integration
Calendar Module
- Switch between month/week views
- Create events on specific dates
- Drag and drop events (if applicable)
- Navigate between months
- Test first day of week setting
Dashboard Module
- Verify metrics accuracy:
- Total study time
- Sessions count
- Questions completed
- Simulated exams
- Test date range filters
- Check chart rendering
Review System
- Create reviews
- Test spaced repetition intervals (1, 7, 30, 90 days)
- Mark reviews as complete
- Verify next review date calculation
- Test custom intervals
Habits Tracking
- Track different habit types:
- Questões (questions)
- Revisão (review)
- Videoaula (video lessons)
- Simulado (simulated exams)
- Verify data persists
- Check habit streaks
Exam Analysis (Inteligência de Banca)
- Add exam topics
- Run relevance analysis
- Test NLP/fuzzy matching
- Save analysis reports
- Load saved analyses
- Edit scores
- Delete analyses
Performance Testing
Load Testing
- Create large datasets:
- 100+ events
- 10+ editais with many subjects
- 50+ reviews
- Test performance:
- Calendar rendering
- Dashboard calculations
- Search/filter operations
- Check for:
- UI lag
- Memory leaks (DevTools Memory tab)
- Slow database queries
Debounce Verification
Fromstore.js:182-192:
Testing Checklist
Before submitting a PR, verify:Core Functionality
- ✅ App loads without errors
- ✅ IndexedDB initializes correctly
- ✅ Service Worker registers
- ✅ Data persists across sessions
- ✅ All modules render correctly
Cross-Browser
- ✅ Chrome works
- ✅ Firefox works
- ✅ Safari works (if possible)
- ✅ Edge works
PWA Features
- ✅ Installable on desktop
- ✅ Installable on mobile
- ✅ Works offline
- ✅ Caches correctly
- ✅ Updates properly
State Management
- ✅ Data saves correctly
- ✅ Data loads correctly
- ✅ Migrations work
- ✅ No data loss
Timers
- ✅ Start/pause/stop work
- ✅ Time accumulates correctly
- ✅ Reset on session end
- ✅ No inflation bugs
Sync (if applicable)
- ✅ Cloudflare sync works
- ✅ Google Drive backup works
- ✅ No sync conflicts
Performance
- ✅ No memory leaks
- ✅ Fast rendering
- ✅ Debounce working
- ✅ Smooth interactions
Reporting Test Results
When submitting a PR, include:Common Issues to Watch For
Timer Inflation
- Timers continuing to run after page close
- Accumulated time showing incorrect values
- Multiple timers running simultaneously
Data Loss
- IndexedDB not initializing
- Migration failures
- Sync conflicts
- LocalStorage not migrating
PWA Issues
- Service Worker not registering
- Cache not updating
- Offline mode not working
- Install prompt not showing
Performance
- Slow calendar rendering with many events
- Memory leaks from event listeners
- Excessive database writes
- Missing debounce causing too many saves
When in doubt, test more! The lack of automated tests means manual testing is our safety net.