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
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -58,6 +58,12 @@ def _settle(page, idle_timeout_ms: int) -> None:
|
||||
page.wait_for_timeout(RENDER_GRACE_MS)
|
||||
|
||||
|
||||
def settle(page, idle_timeout_ms: int = SETTLE_TIMEOUT_MS) -> None:
|
||||
"""Public settle for recipe SCREENSHOT hooks: after the hook navigates to its safe view, call
|
||||
this so the snap happens post-paint. Same bounded best-effort contract as the default path."""
|
||||
_settle(page, idle_timeout_ms)
|
||||
|
||||
|
||||
def _snap_with_blank_retry(page, out_path: str) -> None:
|
||||
"""Screenshot the page; if the PNG is blank/spinner-sized, retry ONCE after a longer settle.
|
||||
The retry overwrites the tiny frame with a strictly-later one (same page, more paint time)."""
|
||||
|
||||
Reference in New Issue
Block a user