mtg_python_deckbuilder/tests/e2e
matt 3e4395d6e9 feat: complete include/exclude observability, fix validation bugs, and organize tests
- 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
2025-09-09 20:18:03 -07:00
..
__init__.py feat: complete M3 Web UI Enhancement milestone with include/exclude cards, fuzzy matching, mobile responsive design, and performance optimization 2025-09-09 18:15:30 -07:00
pytest.ini feat: complete M3 Web UI Enhancement milestone with include/exclude cards, fuzzy matching, mobile responsive design, and performance optimization 2025-09-09 18:15:30 -07:00
README.md feat: complete include/exclude observability, fix validation bugs, and organize tests 2025-09-09 20:18:03 -07:00
requirements.txt feat: complete M3 Web UI Enhancement milestone with include/exclude cards, fuzzy matching, mobile responsive design, and performance optimization 2025-09-09 18:15:30 -07:00
run_e2e_tests.py feat: complete include/exclude observability, fix validation bugs, and organize tests 2025-09-09 20:18:03 -07:00
test_web_smoke.py feat: complete include/exclude observability, fix validation bugs, and organize tests 2025-09-09 20:18:03 -07:00

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

  1. Install dependencies:
pip install -r tests/e2e/requirements.txt
  1. Install Playwright browsers:
python tests/e2e/run_e2e_tests.py --install-browsers

Running Tests

# 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 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:

  1. Comprehensive Coverage: Tests all major user flows
  2. Mobile Testing: Validates responsive design
  3. Fuzzy Matching: Tests the enhanced fuzzy match confirmation modal
  4. Include/Exclude: Validates the include/exclude functionality
  5. Easy Execution: Simple command-line interface for running tests
  6. CI/CD Ready: Can be integrated into continuous integration pipelines