Created: October 24th, 2025 8:47 AM Branch: 003-animal-assistant-mgmt Purpose: Comprehensive Playwright test suite for 11 reported UI bugs
-
specs/bug-validation/01-critical-data-loading.spec.js- CRITICAL severity bugs (4 bugs, ~12 tests)
- Validates data loading across all major features
- Tests: Assistant Management, Animal Details, Chat, Family Groups
-
specs/bug-validation/02-high-severity-dialogs.spec.js- HIGH severity bugs (3 bugs, ~15 tests)
- Validates dialog functionality and authentication
- Tests: Sandbox cancel, Guardrails persistence, Chat History auth
-
specs/bug-validation/03-medium-navigation-structure.spec.js- MEDIUM severity bugs (4 bugs, ~18 tests)
- Validates navigation structure and user roles
- Tests: Guardrails location, Role naming, Department access, Unnecessary sections
BUG-VALIDATION-TEST-SUITE.md- Complete reference guideBUG-VALIDATION-EXECUTION-GUIDE.md- Step-by-step execution instructionsspecs/bug-validation/README.md- Quick reference for developersBUG-VALIDATION-SUMMARY.md- This summary
run-bug-validation.sh- Automated test execution script
| # | Bug Description | Severity | Test File |
|---|---|---|---|
| 1 | Assistant Management sub-elements non-functional | CRITICAL | 01-critical |
| 2 | Animal Details "Failed to fetch" error | CRITICAL | 01-critical |
| 3 | Chat with Animals "Unable to load animals" | CRITICAL | 01-critical |
| 4 | Family Groups "Failed to load families" | CRITICAL | 01-critical |
| 5 | Create Sandbox dialog cancel button broken | HIGH | 02-high |
| 6 | Guardrails disappear after dialog close | HIGH | 02-high |
| 7 | Chat History authentication errors | HIGH | 02-high |
| 8 | Guardrails in wrong navigation section | MEDIUM | 03-medium |
| 9 | Incorrect user role names (Visitor/Educator/Member) | MEDIUM | 03-medium |
| 10 | Department field access control wrong | MEDIUM | 03-medium |
| 11 | Unnecessary "Roles and Permissions" section | MEDIUM | 03-medium |
make run-api # Backend on :8080
cd frontend && npm start # Frontend on :3001cd backend/api/src/main/python/tests/playwright
./run-bug-validation.shnpx playwright show-report backend/reports/playwright/html-report- Visible Execution: All tests run with
--headedflag - BDD Structure: Clear Given/When/Then organization
- Comprehensive: Multiple tests per bug (positive + negative)
- Isolated: Each test independent, can run in any order
- Fast: < 30 seconds per test, ~20 minutes for full suite
| Password | Role | |
|---|---|---|
| test@cmz.org | testpass123 | admin |
| parent1@test.cmz.org | testpass123 | parent |
| student1@test.cmz.org | testpass123 | student |
- 45+ individual tests covering all scenarios
- BDD format for clarity and maintainability
- Error handling for both success and failure paths
- Regression prevention for all reported bugs
CMZ-chatbots/
├── BUG-VALIDATION-TEST-SUITE.md # Complete reference
├── BUG-VALIDATION-EXECUTION-GUIDE.md # Execution instructions
├── BUG-VALIDATION-SUMMARY.md # This file
└── backend/api/src/main/python/tests/playwright/
├── run-bug-validation.sh # Test runner
└── specs/bug-validation/
├── README.md # Quick reference
├── 01-critical-data-loading.spec.js
├── 02-high-severity-dialogs.spec.js
└── 03-medium-navigation-structure.spec.js
You should see output like:
╔════════════════════════════════════════════════════════════════╗
║ Bug Validation Test Suite Complete ║
╚════════════════════════════════════════════════════════════════╝
Test Coverage:
• CRITICAL (4 bugs): Data loading failures
• HIGH (3 bugs): Dialog functionality issues
• MEDIUM (4 bugs): Navigation and structure issues
45 passed (18m 32s)
Failed tests indicate:
- The bug still exists in the system
- Exact location of the failure (file, line, element)
- Screenshots showing the UI state at failure
- Videos of the full test execution
# Verify all reported bugs are reproducible
./run-bug-validation.sh# After fixing Bug #2 (Animal Details)
npx playwright test --grep "Animal Details" --headed# Before deployment
./run-bug-validation.sh# In GitLab CI pipeline
./run-bug-validation.sh
# Publishes JUnit XML to junit-results.xmlThe run-bug-validation.sh script:
- ✓ Verifies services are running
- ✓ Runs tests by severity level
- ✓ Generates HTML report
- ✓ Provides clear pass/fail summary
All tests run with visible browser so you can:
- ✓ See exactly what's being tested
- ✓ Verify UI interactions visually
- ✓ Debug failures more easily
- ✓ Build confidence in test accuracy
Multiple report formats:
- ✓ HTML: Detailed visual report with screenshots/videos
- ✓ JSON: Programmatic access to results
- ✓ JUnit XML: CI/CD integration
- ✓ Console: Real-time test execution feedback
- 11 bugs: 100% coverage of reported issues
- 45+ tests: Multiple tests per bug
- 3 severity levels: CRITICAL, HIGH, MEDIUM
- All user roles: Admin, Parent, Student scenarios
- BDD structure: Clear, readable test organization
- Error handling: Tests for success and failure paths
- Visual validation: Visible browser execution
- Regression prevention: Catches bug reintroduction
-
Run the test suite:
./run-bug-validation.sh
-
Review results in HTML report
-
Fix failing tests by addressing underlying bugs
-
Verify fixes by re-running tests
-
Prevent regressions by running before each deployment
- Add tests for newly discovered bugs
- Update selectors when UI changes
- Integrate with CI/CD pipeline
- Schedule regular regression runs
- Monitor test execution performance
# Run full suite
./run-bug-validation.sh
# Run specific severity level
npx playwright test specs/bug-validation/01-critical*.spec.js --headed
# Run specific bug test
npx playwright test --grep "Animal Details" --headed
# Debug mode
npx playwright test specs/bug-validation/ --debug
# View last report
npx playwright show-report backend/reports/playwright/html-report
# Headless mode (CI/CD)
npx playwright test specs/bug-validation/ --reporter=line| Issue | Solution |
|---|---|
| Services not running | make run-api and npm start |
| Playwright not installed | npm install && npx playwright install |
| Test timeout | Check service health, increase timeout |
| Selector not found | Verify element exists, update selector |
| Auth failure | Check test user credentials |
- Complete Guide:
/BUG-VALIDATION-TEST-SUITE.md - Execution Guide:
/BUG-VALIDATION-EXECUTION-GUIDE.md - Quick Reference:
specs/bug-validation/README.md - Playwright Docs: https://playwright.dev
Status: Ready for execution Maintained By: Quality Engineering Team Last Updated: October 24th, 2025 Version: 1.0.0