skip visual tests in CI — require explicit -m visual flag
Playwright visual tests need browser binaries (playwright install chromium) which CI doesn't have. Mark them with pytest.mark.visual and add addopts = "-m 'not visual'" so they're skipped by default. Run locally with: uv run pytest -m visual tests/test_visual.py -v Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,8 +4,9 @@ Visual regression tests using Playwright.
|
||||
Takes screenshots of key pages and verifies styling invariants
|
||||
(heading colors, backgrounds, nav layout, logo presence).
|
||||
|
||||
Usage:
|
||||
uv run pytest tests/test_visual.py -x -v
|
||||
Skipped by default (requires `playwright install chromium`).
|
||||
Run explicitly with:
|
||||
uv run pytest -m visual tests/test_visual.py -v
|
||||
|
||||
Screenshots are saved to tests/screenshots/ for manual review.
|
||||
"""
|
||||
@@ -21,6 +22,8 @@ from playwright.sync_api import expect, sync_playwright
|
||||
from padelnomics import core
|
||||
from padelnomics.app import create_app
|
||||
|
||||
pytestmark = pytest.mark.visual
|
||||
|
||||
SCREENSHOTS_DIR = Path(__file__).parent / "screenshots"
|
||||
SCREENSHOTS_DIR.mkdir(exist_ok=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user