update bok-choy version to v0.4.5

This commit is contained in:
Christine Lytwynec
2015-09-22 11:31:08 -04:00
parent be0b70bd06
commit b84f35349a
5 changed files with 59 additions and 74 deletions

View File

@@ -0,0 +1,28 @@
"""
Accessibility tests for LMS dashboard page.
Run just this test with:
SELENIUM_BROWSER=phantomjs paver test_bokchoy -d accessibility -t test_lms_dashboard_a11y.py
"""
from ..tests.lms.test_lms_dashboard import BaseLmsDashboardTest
class LmsDashboardAxsTest(BaseLmsDashboardTest):
"""
Class to test lms student dashboard accessibility.
"""
def test_dashboard_course_listings_axs(self):
"""
Test the accessibility of the course listings
"""
course_listings = self.dashboard_page.get_course_listings()
self.assertEqual(len(course_listings), 1)
# There are several existing color contrast errors on this page,
# we will ignore this error in the test until we fix them.
self.dashboard_page.a11y_audit.config.set_rules({
"ignore": ['color-contrast'],
})
self.dashboard_page.a11y_audit.check_for_accessibility_errors()

View File

@@ -1,36 +0,0 @@
"""
Accessibility tests for LMS dashboard page.
Run just this test with:
SELENIUM_BROWSER=phantomjs paver test_bokchoy -d accessibility -t test_lms_dashboard_axs.py
"""
from ..tests.lms.test_lms_dashboard import BaseLmsDashboardTest
class LmsDashboardAxsTest(BaseLmsDashboardTest):
"""
Class to test lms student dashboard accessibility.
"""
def test_dashboard_course_listings_axs(self):
"""
Test the accessibility of the course listings
"""
course_listings = self.dashboard_page.get_course_listings()
self.assertEqual(len(course_listings), 1)
report = self.dashboard_page.do_axs_audit()
# There was one page in this session
self.assertEqual(1, len(report))
result = report[0]
# Verify that this page has no 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))

View File

@@ -0,0 +1,30 @@
"""
Accessibility tests for Studio Library pages.
Run just this test with:
SELENIUM_BROWSER=phantomjs paver test_bokchoy -d accessibility -t test_studio_library_a11y.py
"""
from ..tests.studio.base_studio_test import StudioLibraryTest
from ..pages.studio.library import LibraryEditPage
class StudioLibraryAxsTest(StudioLibraryTest):
"""
Class to test Studio pages accessibility.
"""
def test_lib_edit_page_axs(self):
"""
Check accessibility of LibraryEditPage.
"""
lib_page = LibraryEditPage(self.browser, self.library_key)
lib_page.visit()
lib_page.wait_until_ready()
# There are several existing color contrast errors on this page,
# we will ignore this error in the test until we fix them.
lib_page.a11y_audit.config.set_rules({
"ignore": ['color-contrast'],
})
lib_page.a11y_audit.check_for_accessibility_errors()

View File

@@ -1,37 +0,0 @@
"""
Accessibility tests for Studio Library pages.
Run just this test with:
SELENIUM_BROWSER=phantomjs paver test_bokchoy -d accessibility -t test_studio_library_axs.py
"""
from ..tests.studio.base_studio_test import StudioLibraryTest
from ..pages.studio.library import LibraryEditPage
class StudioLibraryAxsTest(StudioLibraryTest):
"""
Class to test Studio pages accessibility.
"""
def test_lib_edit_page_axs(self):
"""
Check accessibility of LibraryEditPage.
"""
lib_page = LibraryEditPage(self.browser, self.library_key)
lib_page.visit()
lib_page.wait_until_ready()
report = lib_page.do_axs_audit()
# There was one page in this session
self.assertEqual(1, len(report))
result = report[0]
# Verify that this page has no accessibility errors.
self.assertEqual(0, len(result.errors))
# Verify that this page currently has 3 accessibility warnings.
self.assertEqual(3, 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', 'Warning: AX_IMAGE_01',)),
msg="Unexpected warning: {}".format(warning))

View File

@@ -119,7 +119,7 @@ django_debug_toolbar==1.3.2
# Used for testing
astroid==1.3.8
bok-choy==0.4.3
bok-choy==0.4.5
chrono==1.0.2
coverage==4.0
ddt==0.8.0