# Test Fixtures This directory contains test data assets used by the test suite. ## Test Images Test images for E2E upload tests are **generated automatically** by the `test_images` fixture in `backend/tests/e2e/conftest.py`. There is no need to manually add image files to this directory. The `test_images` fixture creates temporary valid JPEG files at runtime and cleans them up after the test session completes. ### Usage in Tests ```python def test_upload_photo(page: Page, test_images): # Use the generated test photo page.get_by_label("Photo").set_input_files(test_images["test_photo"]) # Use the generated test avatar page.get_by_label("Avatar").set_input_files(test_images["test_avatar"]) ``` ### Available Keys - `test_images["test_photo"]` - Path to a temporary test photo (valid JPEG) - `test_images["test_avatar"]` - Path to a temporary test avatar (valid JPEG) ### How It Works The fixture generates minimal valid JPEG images using raw bytes, which are accepted by any image processing library. This approach: 1. Eliminates the need for external fixture files 2. Ensures tests are self-contained and portable 3. Automatically cleans up temporary files after tests complete ## Other Fixtures Additional test data fixtures (e.g., JSON data, CSV files) can be added to this directory as needed.