Commit 0cdcf18c by Christine Lytwynec

Merge pull request #357 from edx/clytwynec/a11y-tests

update a11y tests
parents c4f999d9 1c8bab2f
...@@ -19,25 +19,11 @@ class CourseEnrollmentDemographicsAgeTests(CoursePageTestsMixin, WebAppTest): ...@@ -19,25 +19,11 @@ class CourseEnrollmentDemographicsAgeTests(CoursePageTestsMixin, WebAppTest):
self.login() self.login()
self.page.visit() self.page.visit()
# Generate accessibillity report # TODO: AN-6010
report = self.page.do_axs_audit() # TODO: AN-6011
self.page.a11y_audit.config.set_rules({
# Check that there was one page reviewed in this report "ignore": ['color-contrast'],
self.assertEqual(1, len(report)) })
result = report[0]
# Check the page for accessibility errors
# Verify that this page has no accessibility errors. report = self.page.a11y_audit.check_for_accessibility_errors()
self.assertEqual(0, len(result.errors))
# Verify that this page currently has 2 accessibility warnings.
self.assertEqual(2, len(result.warnings))
# And that these are the warnings that the page currently gives.
for warning in result.warnings:
self.assertTrue(
warning.startswith((
'Warning: AX_FOCUS_01',
'Warning: AX_COLOR_01',
)),
msg="Unexpected warning: {}".format(warning)
)
# Test dependencies go here. # Test dependencies go here.
-r base.txt -r base.txt
bok-choy>=0.3.1 bok-choy>=0.4.5
coverage==3.7.1 coverage==3.7.1
ddt==1.0.0 ddt==1.0.0
django-dynamic-fixture==1.8.1 django-dynamic-fixture==1.8.1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment