fix import

This commit is contained in:
Kenneth Kehl
2024-09-11 11:02:01 -07:00
parent df85f66a43
commit 7b9e5288f8
+4 -3
View File
@@ -1,6 +1,6 @@
import os import os
from axe_core_python import AxeBuilder from axe_core_python import Axe
E2E_TEST_URI = os.getenv("NOTIFY_E2E_TEST_URI") E2E_TEST_URI = os.getenv("NOTIFY_E2E_TEST_URI")
@@ -20,8 +20,9 @@ def test_a11y(authenticated_page, end_to_end_context):
# Check to make sure that we've arrived at the next page. # Check to make sure that we've arrived at the next page.
page.wait_for_load_state("domcontentloaded") page.wait_for_load_state("domcontentloaded")
axe = AxeBuilder(page) axe = Axe(page)
results = axe.analyze() axe.inject()
results = axe.run()
assert ( assert (
len(results["violations"]) == 0 len(results["violations"]) == 0
), f"Accessibility violations: {results['violations']}" ), f"Accessibility violations: {results['violations']}"