try expanding use of axe

This commit is contained in:
Kenneth Kehl
2024-09-11 12:57:10 -07:00
parent 8ef357ea61
commit c3a2441ade
2 changed files with 2 additions and 25 deletions

View File

@@ -113,6 +113,5 @@ def check_axe_report(page):
results = axe.run(page)
assert (
len(results["violations"]) == 0
), f"Accessibility violations: {results['violations']}"
for violation in results["violations"]:
assert(violation["impact"] != "minor", f"Accessibility violation: {violation}")

View File

@@ -1,22 +0,0 @@
import os
from tests.end_to_end.conftest import check_axe_report
E2E_TEST_URI = os.getenv("NOTIFY_E2E_TEST_URI")
def test_a11y(authenticated_page, end_to_end_context):
page = authenticated_page
# Prepare for adding a new service later in the test.
# current_date_time = datetime.datetime.now()
# new_service_name = "E2E Federal Test Service {now} - {browser_type}".format(
# now=current_date_time.strftime("%m/%d/%Y %H:%M:%S"),
# browser_type=end_to_end_context.browser.browser_type.name,
# )
page.goto(f"{E2E_TEST_URI}/accounts")
# Check to make sure that we've arrived at the next page.
page.wait_for_load_state("domcontentloaded")
check_axe_report(page)