feat: Set up JavaScript testing framework (Vitest + Playwright)

- Created package.json with Vitest and Playwright dependencies
- Configured vitest.config.js with happy-dom environment
- Configured playwright.config.js with Chromium browser
- Created test directory structure (tests/frontend/unit and e2e)
- Added setup.test.js with 10 Vitest validation tests
- Added setup.spec.js with 6 Playwright E2E validation tests
- Created FRONTEND_SETUP.md with Node.js installation guide
- Updated instructions.md marking task complete

Note: Requires Node.js installation before running tests
This commit is contained in:
2026-02-01 09:37:55 +01:00
parent a345f9b4e9
commit aceaba5849
8 changed files with 460 additions and 8 deletions

View File

@@ -68,9 +68,9 @@ def mock_download_service():
@pytest.fixture
async def authenticated_client(mock_download_service):
"""Create an authenticated HTTP client for testing."""
from src.server.utils.dependencies import get_download_service
from src.server.services.auth_service import auth_service
from src.server.utils.dependencies import get_download_service
# Ensure auth is configured for test
if not auth_service.is_configured():
auth_service.setup_master_password("TestPass123!")