From be919c992d87f954d2fd2e90e98a6b63e5ebf23a Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 12 Jun 2026 21:02:01 +0000 Subject: [PATCH] Document pytest-playwright browser testing in CLAUDE.md https://claude.ai/code/session_01BKurBhE3Qj25p7Bfsg7EeK --- CLAUDE.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 298af56..abef602 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -155,6 +155,8 @@ Tests live in `tests/`. Run with `make test` or `uv run --with pytest-django pyt Pytest settings are in `pyproject.toml` under `[tool.pytest.ini_options]` (`DJANGO_SETTINGS_MODULE = "timetracker.settings"`). +**Browser/E2E tests**: `pytest-playwright` is a dev dependency for testing JavaScript behavior in a real browser (combine pytest-django's `live_server` fixture with Playwright's `page` fixture). Browser binaries must be installed once via `uv run playwright install chromium`. Note: pages load Alpine.js and Flowbite from CDNs, so browser tests must not depend on CDN-served scripts when running offline (htmx and all widget JS are served locally from `games/static/js/`). + ## Conventions for AI assistants - **Never write to `GeneratedField`s** (`duration_calculated`, `duration_total`, `price_per_game`, `days_to_finish`). They are computed by the database.