Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
a40f286e
Commit
a40f286e
authored
Nov 04, 2015
by
Christine Lytwynec
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updating a11y tests
parent
5d9dc325
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
75 additions
and
8 deletions
+75
-8
common/test/acceptance/tests/lms/test_account_settings.py
+6
-0
common/test/acceptance/tests/lms/test_learner_profile.py
+13
-3
common/test/acceptance/tests/lms/test_lms_dashboard.py
+4
-3
common/test/acceptance/tests/studio/test_studio_library.py
+7
-1
common/test/acceptance/tests/video/test_studio_video_module.py
+5
-0
common/test/acceptance/tests/video/test_video_module.py
+40
-1
No files found.
common/test/acceptance/tests/lms/test_account_settings.py
View file @
a40f286e
...
...
@@ -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
()
common/test/acceptance/tests/lms/test_learner_profile.py
View file @
a40f286e
...
...
@@ -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
()
common/test/acceptance/tests/lms/test_lms_dashboard.py
View file @
a40f286e
...
...
@@ -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
()
common/test/acceptance/tests/studio/test_studio_library.py
View file @
a40f286e
...
...
@@ -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
()
common/test/acceptance/tests/video/test_studio_video_module.py
View file @
a40f286e
...
...
@@ -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
()
common/test/acceptance/tests/video/test_video_module.py
View file @
a40f286e
...
...
@@ -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
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment