Skip to content

Commit 5a696db

Browse files
authored
Wait for CSS transitions before running Axe scan (#1785)
1 parent cd064bd commit 5a696db

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/test_a11y.py

+3
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,9 @@ def test_axe_core(
212212
# Run a line of JavaScript that sets the light/dark theme on the page
213213
page.evaluate(f"document.documentElement.dataset.theme = '{theme}'")
214214

215+
# Wait for CSS transitions (Bootstrap's transitions are 300 ms)
216+
page.wait_for_timeout(301)
217+
215218
# Inject the Axe-core JavaScript library into the page
216219
page.add_script_tag(path="node_modules/axe-core/axe.min.js")
217220

0 commit comments

Comments
 (0)