diff --git a/common/test/acceptance/tests/lms/test_account_settings.py b/common/test/acceptance/tests/lms/test_account_settings.py index 906ffc8643..dc00718b53 100644 --- a/common/test/acceptance/tests/lms/test_account_settings.py +++ b/common/test/acceptance/tests/lms/test_account_settings.py @@ -459,4 +459,10 @@ class AccountSettingsA11yTest(AccountSettingsTestMixin, WebAppTest): """ self.log_in_as_unique_user() self.visit_account_settings_page() + self.account_settings_page.a11y_audit.config.set_rules({ + 'ignore': [ + 'link-href', # TODO: AC-233, AC-230 + 'skip-link', # TODO: AC-179 + ], + }) self.account_settings_page.a11y_audit.check_for_accessibility_errors() diff --git a/common/test/acceptance/tests/lms/test_learner_profile.py b/common/test/acceptance/tests/lms/test_learner_profile.py index 207a7e7bef..d32a489451 100644 --- a/common/test/acceptance/tests/lms/test_learner_profile.py +++ b/common/test/acceptance/tests/lms/test_learner_profile.py @@ -765,10 +765,12 @@ class LearnerProfileA11yTest(LearnerProfileTestMixin, WebAppTest): username, _ = self.log_in_as_unique_user() profile_page = self.visit_profile_page(username) - # TODO: There are several existing color contrast errors on this page, - # we will ignore this error in the test until we fix them. profile_page.a11y_audit.config.set_rules({ - "ignore": ['color-contrast'], + "ignore": [ + 'color-contrast', # TODO: AC-232 + 'skip-link', # TODO: AC-179 + 'link-href', # TODO: AC-231 + ], }) profile_page.a11y_audit.check_for_accessibility_errors() @@ -791,4 +793,12 @@ class LearnerProfileA11yTest(LearnerProfileTestMixin, WebAppTest): different_username, _ = self.initialize_different_user(privacy=self.PRIVACY_PUBLIC) self.log_in_as_unique_user() profile_page = self.visit_profile_page(different_username) + + profile_page.a11y_audit.config.set_rules({ + "ignore": [ + 'skip-link', # TODO: AC-179 + 'link-href', # TODO: AC-231 + ], + }) + profile_page.a11y_audit.check_for_accessibility_errors() diff --git a/common/test/acceptance/tests/lms/test_lms_dashboard.py b/common/test/acceptance/tests/lms/test_lms_dashboard.py index 4e8cbf599c..ec13ddfc41 100644 --- a/common/test/acceptance/tests/lms/test_lms_dashboard.py +++ b/common/test/acceptance/tests/lms/test_lms_dashboard.py @@ -233,10 +233,11 @@ class LmsDashboardA11yTest(BaseLmsDashboardTest): 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'], + "ignore": [ + 'skip-link', # TODO: AC-179 + 'link-href', # TODO: AC-230 + ], }) self.dashboard_page.a11y_audit.check_for_accessibility_errors() diff --git a/common/test/acceptance/tests/studio/test_studio_library.py b/common/test/acceptance/tests/studio/test_studio_library.py index fed2f5b8cf..facd11b6d6 100644 --- a/common/test/acceptance/tests/studio/test_studio_library.py +++ b/common/test/acceptance/tests/studio/test_studio_library.py @@ -656,7 +656,13 @@ class StudioLibraryA11yTest(StudioLibraryTest): # 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'], + "ignore": [ + 'color-contrast', # TODO: AC-225 + 'link-href', # TODO: AC-226 + 'nav-aria-label', # TODO: AC-227 + 'skip-link', # TODO: AC-228 + 'icon-aria-hidden', # TODO: AC-229 + ], }) lib_page.a11y_audit.check_for_accessibility_errors() diff --git a/common/test/acceptance/tests/video/test_studio_video_module.py b/common/test/acceptance/tests/video/test_studio_video_module.py index ff067e9fc7..ac9dde7f8e 100644 --- a/common/test/acceptance/tests/video/test_studio_video_module.py +++ b/common/test/acceptance/tests/video/test_studio_video_module.py @@ -344,6 +344,11 @@ class CMSVideoA11yTest(CMSVideoBaseTest): def test_video_player_a11y(self): # Limit the scope of the audit to the video player only. self.outline.a11y_audit.config.set_scope(include=["div.video"]) + self.outline.a11y_audit.config.set_rules({ + "ignore": [ + 'link-href', # TODO: AC-223 + ], + }) self._create_course_unit() self.outline.a11y_audit.check_for_accessibility_errors() diff --git a/common/test/acceptance/tests/video/test_video_module.py b/common/test/acceptance/tests/video/test_video_module.py index 825a37e6c2..fb2c1fc6e9 100644 --- a/common/test/acceptance/tests/video/test_video_module.py +++ b/common/test/acceptance/tests/video/test_video_module.py @@ -3,6 +3,9 @@ """ Acceptance tests for Video. """ +import os + +from mock import patch from nose.plugins.attrib import attr from unittest import skipIf, skip from ..helpers import UniqueCourseTest, is_youtube_available, YouTubeStubConfig @@ -30,7 +33,6 @@ HTML5_SOURCES_INCORRECT = [ ] -@attr('shard_4') @skipIf(is_youtube_available() is False, 'YouTube is not available!') class VideoBaseTest(UniqueCourseTest): """ @@ -192,6 +194,7 @@ class VideoBaseTest(UniqueCourseTest): self.video.wait_for_video_player_render() +@attr('shard_4') class YouTubeVideoTest(VideoBaseTest): """ Test YouTube Video Player """ @@ -849,6 +852,7 @@ class YouTubeVideoTest(VideoBaseTest): execute_video_steps(tab1_video_names) +@attr('shard_4') class YouTubeHtml5VideoTest(VideoBaseTest): """ Test YouTube HTML5 Video Player """ @@ -870,6 +874,7 @@ class YouTubeHtml5VideoTest(VideoBaseTest): self.assertTrue(self.video.is_video_rendered('youtube')) +@attr('shard_4') class Html5VideoTest(VideoBaseTest): """ Test HTML5 Video Player """ @@ -1055,6 +1060,7 @@ class Html5VideoTest(VideoBaseTest): self.assertTrue(all([source in HTML5_SOURCES for source in self.video.sources])) +@attr('shard_4') class YouTubeQualityTest(VideoBaseTest): """ Test YouTube Video Quality Button """ @@ -1099,3 +1105,36 @@ class YouTubeQualityTest(VideoBaseTest): self.video.click_player_button('quality') self.assertTrue(self.video.is_quality_button_active) + + +@attr('a11y') +class LMSVideoModuleA11yTest(VideoBaseTest): + """ + LMS Video Accessibility Test Class + """ + + def setUp(self): + browser = os.environ.get('SELENIUM_BROWSER', 'firefox') + + # the a11y tests run in CI under phantomjs which doesn't + # support html5 video or flash player, so the video tests + # don't work in it. We still want to be able to run these + # tests in CI, so override the browser setting if it is + # phantomjs. + if browser == 'phantomjs': + browser = 'firefox' + + with patch.dict(os.environ, {'SELENIUM_BROWSER': browser}): + super(LMSVideoModuleA11yTest, self).setUp() + + def test_video_player_a11y(self): + self.navigate_to_video() + + # Limit the scope of the audit to the video player only. + self.video.a11y_audit.config.set_scope(include=["div.video"]) + self.video.a11y_audit.config.set_rules({ + "ignore": [ + 'link-href', # TODO: AC-223 + ], + }) + self.video.a11y_audit.check_for_accessibility_errors()