Add Playwright e2e test infrastructure
Set up browser-based end-to-end testing using pytest-playwright: - Add playwright-driver and pytest-playwright to nix flake - Configure PLAYWRIGHT_BROWSERS_PATH for NixOS compatibility - Create ServerHarness to manage live server for tests - Add smoke tests for health endpoint and page loading - Exclude e2e tests from pre-commit hook (require special setup) Run e2e tests with: pytest tests/e2e/ -v -n 0 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -61,6 +61,8 @@
|
||||
# Dev-only (not needed in Docker, but fine to include)
|
||||
pytest
|
||||
pytest-xdist
|
||||
pytest-playwright
|
||||
requests
|
||||
ruff
|
||||
filelock
|
||||
]);
|
||||
@@ -84,8 +86,13 @@
|
||||
pkgs.sqlite
|
||||
pkgs.skopeo # For pushing Docker images
|
||||
pkgs.lefthook # Git hooks manager
|
||||
pkgs.playwright-driver # Browser binaries for e2e tests
|
||||
];
|
||||
|
||||
# Playwright browser configuration for NixOS
|
||||
PLAYWRIGHT_BROWSERS_PATH = "${pkgs.playwright-driver.browsers}";
|
||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = "1";
|
||||
|
||||
shellHook = ''
|
||||
export PYTHONPATH="$PWD/src:$PYTHONPATH"
|
||||
export PATH="$PWD/bin:$PATH"
|
||||
|
||||
Reference in New Issue
Block a user