Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
83cadc5f
Commit
83cadc5f
authored
9 years ago
by
Jesse Zoldak
Browse files
Options
Downloads
Patches
Plain Diff
Add a11y test for lms student dashboard
parent
c3b78ea9
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/test/acceptance/accessibility/test_lms_dashboard_axs.py
+36
-0
36 additions, 0 deletions
...n/test/acceptance/accessibility/test_lms_dashboard_axs.py
with
36 additions
and
0 deletions
common/test/acceptance/accessibility/test_lms_dashboard_axs.py
0 → 100644
+
36
−
0
View file @
83cadc5f
"""
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
LmsDashboardPageTest
class
LmsDashboardAxsTest
(
LmsDashboardPageTest
):
"""
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
))
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment