π Testing Quick Start Guide
Last Updated: October 26, 2025
Purpose: Get started testing the Communication System immediately
Time Required: 5 minutes setup + testing time
π― TWO TESTING APPROACHESβ
A) Manual Testing (Start Now! - 0 setup)β
β
No installation required
β
Test immediately
β
See features in action
β±οΈ 2-3 hours to test everything
B) Automated Testing (Setup required - 30min)β
β
Repeatable tests
β
Regression prevention
β
CI/CD integration
β±οΈ 30min setup + 4-6 hours writing tests
Recommendation: Do BOTH! Start with A (manual), then add B (automated)
π OPTION A: MANUAL TESTINGβ
Step 1: Start Dev Server (1 minute)β
cd /Users/luisrangel/devLR/rpa/flowpos-workspace/apps/frontend-pwa
pnpm dev
Expected: Server runs on http://localhost:5173
Step 2: Login & Navigate (1 minute)β
- Open browser:
http://localhost:5173 - Login with your credentials
- You should see the main dashboard
Step 3: Test Each Page (2 hours)β
Use the detailed guide: STEP-BY-STEP-TESTING-GUIDE.md
Quick Navigation URLs:
Communications History:
http://localhost:5173/main?form=/forms/CommunicationsHistoryPage
Communication Stats:
http://localhost:5173/main?form=/forms/CommunicationStatsPage
Send Communication:
http://localhost:5173/main?form=/forms/SendCommunicationPage
Templates Management:
http://localhost:5173/main?form=/forms/TemplatesManagementPage
Template Editor:
http://localhost:5173/main?form=/forms/TemplateEditorPage
Queue Monitoring:
http://localhost:5173/main?form=/forms/QueueMonitoringPage
Recipient Groups:
http://localhost:5173/main?form=/forms/RecipientGroupsPage
Recipient Rules:
http://localhost:5173/main?form=/forms/RecipientRulesPage
Global Preferences:
http://localhost:5173/main?form=/forms/GlobalPreferencesManagementPage
For Customer Preferences, navigate from code:
// In browser console or from another page
window.location.href = '/main';
// Then in React code:
navigate("/main", {
state: {
selectedForm: "/forms/CustomerPreferencesPage",
entityType: "customer",
entityId: "your-customer-id"
}
});
Step 4: Document Results (30 minutes)β
Use: MANUAL-TESTING-CHECKLIST.md
Fill in:
- β Test results
- β Bugs found
- π‘ Observations
- π― Recommendations
π§ͺ OPTION B: AUTOMATED TESTINGβ
Step 1: Install Dependencies (2 minutes)β
cd /Users/luisrangel/devLR/rpa/flowpos-workspace/apps/frontend-pwa
# Fix pnpm store if needed
pnpm install
# Install test dependencies
pnpm add -D vitest @vitest/ui @testing-library/react @testing-library/jest-dom @testing-library/user-event happy-dom
Step 2: Verify Setup (1 minute)β
Check that these files exist (β Already created!):
β
vitest.config.ts
β
src/test/setup.ts
β
src/test/test-utils.tsx
β
src/components/forms/communications/__tests__/CommunicationCard.test.tsx
β
src/components/forms/communication-templates/__tests__/TemplateCard.test.tsx
Step 3: Run Tests (1 minute)β
# Run all tests
pnpm test
# Run with UI (recommended!)
pnpm test:ui
# Run with coverage
pnpm test:coverage
# Run in watch mode (as you code)
pnpm test:watch
Expected Output:
β src/components/forms/communications/__tests__/CommunicationCard.test.tsx (15)
β src/components/forms/communication-templates/__tests__/TemplateCard.test.tsx (14)
Test Files 2 passed (2)
Tests 29 passed (29)
Step 4: Write More Tests (4-6 hours)β
Use examples in: TESTING-STRATEGY-AND-EXAMPLES.md
Priority order:
- Critical components (Cards, Lists)
- Critical hooks (useCommunications, useTemplates)
- Critical services (API calls)
- Integration tests
- E2E tests
π― RECOMMENDED TESTING ORDERβ
Day 1: Manual Testing (3 hours)β
Morning (1.5h):
- Test Communications module (3 pages)
- Document issues
Afternoon (1.5h): 3. Test Templates module (2 pages) 4. Test Preferences module (2 pages) 5. Test Queue module (1 page) 6. Test Recipient Targeting (2 pages) 7. Document all findings
Day 2: Fix Issues (2-4 hours)β
Based on Manual Testing:
- Fix critical bugs
- Fix major issues
- Retest affected areas
- Document fixes
Day 3: Automated Tests (4-6 hours)β
Setup + Write Tests:
- Install dependencies (30min)
- Write component tests (2h)
- Write hook tests (2h)
- Write service tests (1h)
- Run full suite (30min)
π TESTING DASHBOARDβ
Manual Testing Progressβ
| Module | Pages | Status | Issues |
|---|---|---|---|
| Communications | 3 | β β β β³ β β | ___ |
| Templates | 2 | β β β β³ β β | ___ |
| Preferences | 2 | β β β β³ β β | ___ |
| Queue | 1 | β β β β³ β β | ___ |
| Recipient Targeting | 2 | β β β β³ β β | ___ |
Overall Manual Testing: β Complete β In Progress β Not Started
Automated Testing Progressβ
| Type | Files | Tests | Coverage | Status |
|---|---|---|---|---|
| Component | ___ | ___ | ___% | β β β β³ |
| Hook | ___ | ___ | ___% | β β β β³ |
| Service | ___ | ___ | ___% | β β β β³ |
| Integration | ___ | ___ | β | β β β β³ |
| E2E | ___ | ___ | β | β β β β³ |
Overall Automated Testing: β Complete β In Progress β Not Started
π― QUICK VALIDATION (15 Minutes)β
Smoke Test - Test ONE feature from each moduleβ
5-Minute Smoke Test:
- β Open Communications History β Verify list loads
- β Open Templates Management β Verify templates load
- β Open Customer Preferences β Verify toggles work
- β Open Queue Monitoring β Verify stats show
- β Open Recipient Groups β Verify groups load
If all 5 pass β Likely everything works! β
If any fail β Dig deeper with full tests π
π TESTING CHECKLISTβ
Pre-Testing Setupβ
- Dev server running
- Logged in as admin/owner
- Browser dev tools open
- No console errors on load
- Network tab recording (optional)
Manual Testingβ
- Test all 11 pages
- Test on desktop
- Test on mobile (resize)
- Test dark mode
- Test both languages (EN/ES)
- Document all issues
- Fill in MANUAL-TESTING-CHECKLIST.md
Automated Testingβ
- Install dependencies
- Verify setup files exist
- Run existing tests (should pass)
- Write additional tests
- Aim for 70%+ coverage
- Fix failing tests
Integration Testingβ
- Test cross-module workflows
- Template β Communication flow
- Preferences β Communication blocking
- Queue β Communication processing
Final Checksβ
- No console errors
- No 404s in network tab
- No memory leaks (check dev tools)
- Acceptable performance
- All features work
π COMMON ISSUES TO WATCH FORβ
API Issuesβ
- 401 Unauthorized (token expired?)
- 403 Forbidden (permissions?)
- 404 Not Found (wrong endpoint?)
- 500 Server Error (backend issue?)
- Network timeout (slow connection?)
UI Issuesβ
- Broken layout on mobile
- Overlapping elements
- Cut-off text
- Invisible text in dark mode
- Missing icons
- Broken images
Functional Issuesβ
- Button does nothing
- Form doesn't submit
- Modal won't close
- Filter doesn't filter
- Search doesn't work
- Pagination broken
Performance Issuesβ
- Slow page load (>3s)
- Laggy interactions
- Memory leaks
- Too many API calls
- Large bundle size
β QUICK VALIDATION SCRIPTβ
Run This in Browser Consoleβ
// Check if all Communication pages are accessible
const pages = [
'/main?form=/forms/CommunicationsHistoryPage',
'/main?form=/forms/CommunicationStatsPage',
'/main?form=/forms/SendCommunicationPage',
'/main?form=/forms/TemplatesManagementPage',
'/main?form=/forms/TemplateEditorPage',
'/main?form=/forms/QueueMonitoringPage',
'/main?form=/forms/RecipientGroupsPage',
'/main?form=/forms/RecipientRulesPage',
'/main?form=/forms/GlobalPreferencesManagementPage',
];
console.log('Testing page accessibility...');
pages.forEach((page, i) => {
setTimeout(() => {
window.location.href = page;
console.log(`${i+1}/${pages.length}: ${page}`);
}, i * 3000); // 3 seconds per page
});
// Watch console for errors
This will cycle through all pages automatically!
π CONGRATULATIONS!β
You now have everything you need to test the Communication System:
β Manual Testing:
- STEP-BY-STEP-TESTING-GUIDE.md (detailed walkthrough)
- MANUAL-TESTING-CHECKLIST.md (results template)
β Automated Testing:
- vitest.config.ts (configuration)
- src/test/setup.ts (test setup)
- src/test/test-utils.tsx (utilities + mock data)
- Example tests (CommunicationCard, TemplateCard)
- TESTING-STRATEGY-AND-EXAMPLES.md (full guide)
β Package Scripts:
pnpm test- Run testspnpm test:ui- Run with UIpnpm test:coverage- Get coverage reportpnpm test:watch- Watch mode
π START TESTING NOW!β
Option 1: Quick Validation (15 min)β
# Start server
cd apps/frontend-pwa && pnpm dev
# Open each URL in browser
# Verify page loads without errors
Option 2: Full Manual Test (3h)β
# Follow STEP-BY-STEP-TESTING-GUIDE.md
# Fill in MANUAL-TESTING-CHECKLIST.md
Option 3: Automated Tests (After dependencies)β
# Install dependencies first (resolve pnpm store issue)
pnpm install
# Then install test deps
pnpm add -D vitest @vitest/ui @testing-library/react @testing-library/jest-dom @testing-library/user-event happy-dom
# Run tests
pnpm test
π― NEXT STEPS AFTER TESTINGβ
If Tests Pass (β )β
- Deploy to staging
- Test in staging environment
- Get user feedback
- Deploy to production
- Celebrate! π
If Minor Issues (β οΈ)β
- File bugs
- Fix non-blocking issues
- Retest
- Deploy
If Critical Issues (β)β
- Fix immediately
- Full retest
- Code review
- Deploy when stable
π TESTING DOCUMENTSβ
| Document | Purpose | Time |
|---|---|---|
| TESTING-QUICK-START.md | This file - Get started | 5min |
| STEP-BY-STEP-TESTING-GUIDE.md | Detailed test steps | 2-3h |
| MANUAL-TESTING-CHECKLIST.md | Results template | Fill as you test |
| TESTING-STRATEGY-AND-EXAMPLES.md | Full testing guide | Reference |
π YOU'RE READY!β
Everything is set up for comprehensive testing:
β
Test files created (2 examples)
β
Test configuration ready
β
Test utilities ready
β
Manual testing guide ready
β
Testing checklist ready
β
Package scripts ready
Just start the dev server and begin testing! π
Happy Testing! π§ͺβ¨
Document Version: 1.0
Last Updated: October 26, 2025