diff --git a/tasks.py b/tasks.py index b665daec7a..ec91a3d6b7 100644 --- a/tasks.py +++ b/tasks.py @@ -1429,6 +1429,14 @@ def docs_server(c, address='localhost:8080', compile_schema=False): run(c, f'mkdocs serve -a {address} -f docs/mkdocs.yml') +@task +def docs_generate_screenshots(c): + """Regenerate UI screenshots for the documentation.""" + # Ensure frontend requirements are met + run(c, 'npx playwright install --install-deps', path='./src/frontend') + run(c, 'npx playwright test --project screenshot', path='./src/frontend') + + @task def clear_generated(c): """Clear generated files from `inv update`."""