Add secret management guide, client-side performance monitoring, and search accessibility enhancements

- 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.
This commit is contained in:
pacnpal
2025-12-23 16:41:42 -05:00
parent ae31e889d7
commit edcd8f2076
155 changed files with 22046 additions and 4645 deletions

View File

@@ -1,33 +1,37 @@
# Test Fixtures
This directory contains test assets used by the e2e tests.
This directory contains test data assets used by the test suite.
## Required Files
## Test Images
1. `test_photo.jpg`
- Used for testing photo uploads for parks and rides
- Recommended size: 1920x1080
- Max size: 5MB
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.
2. `test_avatar.jpg`
- Used for testing profile avatar uploads
- Recommended size: 500x500
- Max size: 2MB
The `test_images` fixture creates temporary valid JPEG files at runtime and cleans them up after the test session completes.
## Generating Test Images
### Usage in Tests
You can create these test images using any image editing software, or download placeholder images from:
- https://picsum.photos/1920/1080 (for test_photo.jpg)
- https://picsum.photos/500/500 (for test_avatar.jpg)
Save the downloaded images with the correct filenames in this directory.
## Usage
The test files reference these images using relative paths:
```python
page.get_by_label("Photo").set_input_files("tests/fixtures/test_photo.jpg")
page.get_by_label("Avatar").set_input_files("tests/fixtures/test_avatar.jpg")
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"])
```
Make sure these files exist before running the tests.
### 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.