try expanding use of axe

This commit is contained in:
Kenneth Kehl
2024-09-11 12:36:58 -07:00
parent 286166c2ad
commit 8ef357ea61
3 changed files with 18 additions and 9 deletions

View File

@@ -2,6 +2,7 @@ import os
import re
import pytest
from axe_core_python.sync_playwright import Axe
E2E_TEST_URI = os.getenv("NOTIFY_E2E_TEST_URI")
@@ -105,3 +106,13 @@ def authenticated_page(end_to_end_context):
page.wait_for_load_state("domcontentloaded")
return page
def check_axe_report(page):
axe = Axe()
results = axe.run(page)
assert (
len(results["violations"]) == 0
), f"Accessibility violations: {results['violations']}"