feat(shot): mattermost-lts SCREENSHOT hook → /login (default lands the desktop-or-browser interstitial; watch-list wants the real sign-in form) + public screenshot.settle() for hooks; unit test via real loader; 206 unit tests pass, lint PASS
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
autonomic-bot
2026-06-11 06:19:39 +00:00
parent b8414a8fdb
commit 80e5713c5c
3 changed files with 52 additions and 0 deletions

View File

@ -18,3 +18,22 @@ HEALTH_OK = (200, 302)
DEPLOY_TIMEOUT = 900
HTTP_TIMEOUT = 600
EXTRA_ENV = {"TIMEOUT": "600"}
def SCREENSHOT(page, ctx):
"""Land the real sign-in form for the CI card (phase-shot). The default landing capture gets
mattermost's "view in desktop app or browser?" interstitial at `/` — a real page but not
representative of the app. `/login` renders the standard login form directly. Credential-free
(empty fields, R7 secret-safety: never a page showing generated secrets); the harness snaps
the PNG after this returns."""
from harness import browser as harness_browser
from harness import screenshot as screenshot_mod
harness_browser.goto_with_retry(
page,
f"{ctx.base_url}/login",
accept_statuses=(200,),
deadline_seconds=screenshot_mod.NAV_DEADLINE_S,
wait_until="domcontentloaded",
)
screenshot_mod.settle(page)