mirror of
https://github.com/mwisnowski/mtg_python_deckbuilder.git
synced 2025-09-21 20:40:47 +02:00
![]() - Add structured logging for include/exclude operations with comprehensive event tracking - Fix duplicate counting bug in validation API by eliminating double validation passes - Simplify color identity validation UX by consolidating into single 'illegal' status - Organize project structure by moving all test files to centralized code/tests/ directory - Update documentation reflecting feature completion and production readiness - Add validation test scripts and performance benchmarks confirming targets met - Finalize include/exclude feature as production-ready with EDH format compliance |
||
---|---|---|
.. | ||
__init__.py | ||
pytest.ini | ||
README.md | ||
requirements.txt | ||
run_e2e_tests.py | ||
test_web_smoke.py |
End-to-End Testing (M3: Cypress/Playwright Smoke Tests)
This directory contains end-to-end tests for the MTG Deckbuilder web UI using Playwright.
Setup
- Install dependencies:
pip install -r tests/e2e/requirements.txt
- Install Playwright browsers:
python tests/e2e/run_e2e_tests.py --install-browsers
Running Tests
Quick Smoke Test (Recommended)
# Assumes server is already running on localhost:8080
python tests/e2e/run_e2e_tests.py --quick
Full Test Suite with Server
# Starts server automatically and runs all tests
python tests/e2e/run_e2e_tests.py --start-server --smoke
Mobile Responsive Tests
python tests/e2e/run_e2e_tests.py --mobile
Using pytest directly
cd tests/e2e
pytest test_web_smoke.py -v
Test Types
- Smoke Tests: Basic functionality tests (homepage, build page, modal opening)
- Mobile Tests: Mobile responsive layout tests
- Full Tests: Comprehensive end-to-end user flows
Environment Variables
TEST_BASE_URL
: Base URL for testing (default: http://localhost:8080)
Test Coverage
The smoke tests cover:
- ✅ Homepage loading
- ✅ Build page loading
- ✅ New deck modal opening
- ✅ Commander search functionality
- ✅ Include/exclude fields presence
- ✅ Include/exclude validation
- ✅ Fuzzy matching modal triggering
- ✅ Mobile responsive layout
- ✅ Configs page loading
M3 Completion
This completes the M3 Web UI Enhancement milestone requirement for "Cypress/Playwright smoke tests for full workflow". The test suite provides:
- Comprehensive Coverage: Tests all major user flows
- Mobile Testing: Validates responsive design
- Fuzzy Matching: Tests the enhanced fuzzy match confirmation modal
- Include/Exclude: Validates the include/exclude functionality
- Easy Execution: Simple command-line interface for running tests
- CI/CD Ready: Can be integrated into continuous integration pipelines