testing.browser_smoke

Page actions AI-ready formats and sharing
Open LLM text
Share with AI
Ask Claude Ask ChatGPT Ask Gemini Ask Copilot

Opt-in Playwright shell smoke helpers (#234).

These complementapp.check() and assert_route_smoke() with runtime checks only a real browser can see: console errors, Alpine boot, and shell controller presence. Playwright is optional…

Opt-in Playwright shell smoke helpers (#234).

These complementapp.check() and assert_route_smoke() with runtime checks only a real browser can see: console errors, Alpine boot, and shell controller presence. Playwright is optional — call require_playwright() inside fixtures or tests to skip cleanly when it is not installed.

testing.browser_smoke

Name Type Default Description
type
qualified_name
element_type
description
source_file
line_number
is_autodoc
autodoc_element
_autodoc_template
_autodoc_url_path
_autodoc_page_type
title
doc_content_hash

Symbols on this page

require_playwright
function
def require_playwright() -> Any

Import Playwright or skip the current test when unavailable.

No parameters.

attach_console_capture
function
def attach_console_capture(page: Any) -> list[str]

Attach console/pageerror collectors to page and return the error buffer.

Parameters

Name Type Default Description
page Any
filter_console_errors
function
def filter_console_errors(errors: list[str], *, ignore: Callable[[str], bool] | None = None) -> list[str]

Return errors minus entries accepted by ignore.

Parameters

Name Type Default Description
errors list[str]
ignore Callable[[str], bool] | None None
assert_alpine_booted
function
def assert_alpine_booted(page: Any) -> None

Assertwindow.Alpineis defined — the shell controllers mounted.

Parameters

Name Type Default Description
page Any
assert_zero_console_errors
function
def assert_zero_console_errors(errors: list[str], *, context: str = '') -> None

Fail when errors is non-empty.

Parameters

Name Type Default Description
errors list[str]
context str ''

View source · /home/runner/work/chirp/chirp/site/../src/chirp/testing/browser_smoke.py:1