Skip to content

Commit 9d4f978

Browse files
committed
Fix tests
1 parent f33cc4f commit 9d4f978

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

tests/conftest.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ def install_playwright():
3636
subprocess.run(["playwright", "install", "chromium"], check=True) # noqa: S607, S603
3737

3838

39+
@pytest.fixture(autouse=True, scope="session")
40+
def rebuild_javascript():
41+
subprocess.run(["hatch", "run", "javascript:build"], check=True) # noqa: S607, S603
42+
43+
3944
@pytest.fixture
4045
async def display(server, page):
4146
async with DisplayFixture(server, page) as display:

tests/test_html.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ def HasScript():
1515
return html.div(
1616
html.div({"id": "mount-count", "data_value": 0}),
1717
html.script(
18-
'const mountCountEl = document.getElementById("mount-count");'
19-
f'mountCountEl.setAttribute("data-value", {count});'
18+
f'document.getElementById("mount-count").setAttribute("data-value", {count});'
2019
),
2120
)
2221

0 commit comments

Comments
 (0)