From 01e9c10699a28285d245f3f8ed1ce3a93dfacc60 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 14 Aug 2024 21:47:14 +1000 Subject: [PATCH] Add task for generating screenshots (WIP) --- tasks.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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`."""