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

@@ -14,16 +14,6 @@ uv pip install -r requirements.txt
playwright install
```
3. Create test fixtures:
```bash
mkdir -p tests/fixtures
```
4. Add test assets:
Place the following files in `tests/fixtures/`:
- `test_photo.jpg` - A sample photo for testing uploads
- `test_avatar.jpg` - A sample avatar image for profile tests
## Running Tests
### Run all tests:
@@ -86,6 +76,21 @@ You can create these users using Django management commands:
python manage.py create_test_users
```
## Test Images
Tests that require file uploads use the `test_images` fixture defined in `conftest.py`. This fixture generates temporary JPEG images at runtime, eliminating the need for external fixture files.
Usage in tests:
```python
def test_add_photo(page: Page, test_images):
page.get_by_label("Photo").set_input_files(test_images["test_photo"])
page.get_by_label("Avatar").set_input_files(test_images["test_avatar"])
```
Available keys:
- `test_images["test_photo"]` - Path to a temporary test photo
- `test_images["test_avatar"]` - Path to a temporary test avatar
## Test Environment
Tests expect:
@@ -104,8 +109,7 @@ Tests expect:
1. **Connection Refused**: Ensure Django server is running
2. **Element Not Found**: Check selectors and page load timing
3. **Upload Failures**: Verify test fixtures exist
4. **Authentication Errors**: Verify test users exist in database
3. **Authentication Errors**: Verify test users exist in database
## Contributing