@@ -100,9 +100,9 @@ def test_headers_in_language(page_url: tuple[Page, str], route: str) -> None:
100
100
assert response .status == 200
101
101
doc_lang = page .evaluate ("document.documentElement.lang" )
102
102
# lang = route.lstrip("/").split("/", maxsplit=1)[
103
- # 0
103
+ # 0
104
104
# ] # urls start with the language if not en
105
- assert doc_lang == 'en'
105
+ assert doc_lang == "en"
106
106
107
107
axe = Axe ()
108
108
results = axe .run (page , options = {"runOnly" : ["wcag2a" , "wcag2aa" ]})
@@ -191,20 +191,20 @@ def test_page_blog_posts(
191
191
page , live_server_url = page_url
192
192
entry_stem , frontmatter = post
193
193
url = f"{ live_server_url } /{ entry_stem } /"
194
-
195
-
194
+
196
195
# Increased timeout and added wait_until="networkidle"
197
196
page .goto (url , timeout = 60000 , wait_until = "networkidle" )
198
-
197
+
199
198
# More robust waiting for the meta description
200
199
page .wait_for_selector (
201
- 'meta[name="description"]' ,
202
- timeout = 10000 ,
203
- state = "attached" ,
204
- )
205
-
200
+ 'meta[name="description"]' ,
201
+ timeout = 10000 ,
202
+ state = "attached" ,
203
+ )
206
204
207
205
axe = Axe ()
208
206
results = axe .run (page , options = {"runOnly" : ["wcag2a" , "wcag2aa" ]})
209
207
210
- assert (len (results ["violations" ]) == 0 ), f"Accessibility violations found: { results ['violations' ]} "
208
+ assert (
209
+ len (results ["violations" ]) == 0
210
+ ), f"Accessibility violations found: { results ['violations' ]} "
0 commit comments