Skip to content

Commit e3ede1c

Browse files
committed
test head customization
1 parent 63985c1 commit e3ede1c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/test_backend/test_all.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,18 @@ def ShowRoute():
155155

156156
# we can't easily narrow this check
157157
assert hook_val.current is not None
158+
159+
160+
@pytest.mark.parametrize("imp", all_implementations())
161+
async def test_customized_head(imp: BackendImplementation, page):
162+
@idom.component
163+
def sample():
164+
return html.h1("the page title is customized")
165+
166+
async with BackendFixture(
167+
implementation=imp,
168+
options=imp.Options(head=html.title("Custom Title")),
169+
) as server:
170+
async with DisplayFixture(backend=server, driver=page) as display:
171+
await display.show(sample)
172+
assert (await display.page.title()) == "Custom Title"

0 commit comments

Comments
 (0)