Skip to content

Commit

Permalink
Wait for CSS transitions before running Axe scan (#1785)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabalafou committed Apr 25, 2024
1 parent cd064bd commit 5a696db
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_a11y.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ def test_axe_core(
# Run a line of JavaScript that sets the light/dark theme on the page
page.evaluate(f"document.documentElement.dataset.theme = '{theme}'")

# Wait for CSS transitions (Bootstrap's transitions are 300 ms)
page.wait_for_timeout(301)

# Inject the Axe-core JavaScript library into the page
page.add_script_tag(path="node_modules/axe-core/axe.min.js")

Expand Down

0 comments on commit 5a696db

Please sign in to comment.