mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-24 03:51:07 -05:00
- Introduced a comprehensive Secret Management Guide detailing best practices, secret classification, development setup, production management, rotation procedures, and emergency protocols. - Implemented a client-side performance monitoring script to track various metrics including page load performance, paint metrics, layout shifts, and memory usage. - Enhanced search accessibility with keyboard navigation support for search results, ensuring compliance with WCAG standards and improving user experience.
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
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:
- Eliminates the need for external fixture files
- Ensures tests are self-contained and portable
- 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.