Skip to content

Commit bc0a8be

Browse files
Incredibly impressed, good job
1 parent cc086e2 commit bc0a8be

File tree

11 files changed

+1343
-0
lines changed

11 files changed

+1343
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,5 @@ site/
3131

3232
# Node modules
3333
node_modules/
34+
.playwright-mcp/
35+
tests/guides/*/screenshots/*

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ dependencies = ["homeassistant>=2025.12.2", "numpy>=2.3.2", "highspy>=1.12.0"]
99

1010
[dependency-groups]
1111
dev = [
12+
"beautifulsoup4>=4.14.3",
1213
"freezegun>=1.5.2",
1314
"matplotlib>=3.10.8",
15+
"playwright>=1.57.0",
1416
"mdformat-beautysh>=1.0.0",
1517
"mdformat-config>=0.2.1",
1618
"mdformat-footnote>=0.1.1",
@@ -130,6 +132,7 @@ asyncio_mode = "auto"
130132
addopts = ["--strict-markers", "--strict-config", "--disable-warnings"]
131133
markers = [
132134
"scenario: marks tests as scenario tests (select with '-m \"scenario\"')",
135+
"browser: marks tests as browser automation tests (select with '-m \"browser\"')",
133136
]
134137

135138
[tool.coverage.run]

tests/guides/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Guide tests with browser automation and live Home Assistant."""

tests/guides/conftest.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
"""Configuration for guide tests.
2+
3+
Guide tests are designed to run Home Assistant in-process with browser
4+
automation. They do NOT use pytest-homeassistant-custom-component fixtures
5+
since they need a full HTTP server for Playwright.
6+
7+
These tests should be run with:
8+
uv run python tests/guides/<test_file>.py
9+
10+
Or via pytest with explicit socket enabling:
11+
uv run pytest tests/guides/ --force-enable-socket -m guide
12+
"""
13+
14+
15+
def pytest_configure(config):
16+
"""Register guide marker."""
17+
config.addinivalue_line(
18+
"markers",
19+
"guide: mark test as a guide test (runs full HA with HTTP, needs network)",
20+
)

0 commit comments

Comments
 (0)