This commit sets up a minimal, KISS-principle testing infrastructure
for both backend and frontend, and includes the fix for Issue #227.
Backend Changes:
- Add Makefile with test commands (test, test-backend, test-frontend, test-coverage)
- Add example test: config/database_test.go
- Fix Go 1.25 printf format string warnings in trader/auto_trader.go
(Changed log.Printf to log.Print for non-format strings)
- All backend tests pass ✓
Frontend Changes:
- Add Vitest configuration: web/vitest.config.ts (minimal setup)
- Add test utilities: web/src/test/test-utils.tsx
- Add example test: web/src/App.test.tsx
- Add dependencies: vitest, jsdom, @testing-library/react
- All frontend tests pass ✓
Issue #227 Fix:
- Fix AITradersPage to allow editing traders with disabled models/exchanges
- Change validation to use allModels/allExchanges instead of enabledModels/enabledExchanges
- Add comprehensive tests in web/src/components/AITradersPage.test.tsx
- Fixes: https://github.com/tinkle-community/nofx/issues/227
CI/CD:
- Add GitHub Actions workflow: .github/workflows/test.yml
- Non-blocking tests (continue-on-error: true)
- Runs on push/PR to main and dev branches
Test Results:
- Backend: 1 test passing
- Frontend: 5 tests passing (including 4 for Issue #227)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Enhanced bug report template with detailed log capture instructions
- Added bug categorization system (6 main categories)
- Frontend error capture guide (DevTools Console/Network tabs)
- Backend log capture for Docker and PM2 deployments
- Trading/decision logs location and usage
- Comprehensive environment information checklist
- Quick diagnostic tips for faster issue resolution
- Created bilingual troubleshooting guides (EN/ZH)
- Common trading issues (e.g., Issue #202: only short positions)
- Detailed explanation of Binance position mode requirements
- AI decision problems and diagnostics
- Connection and API error solutions
- Frontend and database issues
- Complete log capture instructions with commands
- Emergency reset procedures
- Updated documentation cross-references
- Added troubleshooting guide links to bug report template
- Added links in README Common Issues section
- Bilingual support for better accessibility
This reduces maintainer workload by helping users self-diagnose issues
and submit higher-quality bug reports with all necessary information.
Addresses Issue #202 root cause documentation.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>