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
e5939c84
Commit
e5939c84
authored
Sep 22, 2016
by
Chris Rodriguez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding a11y check and sr check
parent
2ec518a4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
common/test/acceptance/tests/lms/test_progress_page.py
+31
-0
No files found.
common/test/acceptance/tests/lms/test_progress_page.py
View file @
e5939c84
...
...
@@ -10,6 +10,7 @@ import ddt
from
..helpers
import
UniqueCourseTest
,
auto_auth
,
create_multiple_choice_problem
from
...fixtures.course
import
CourseFixture
,
XBlockFixtureDesc
from
lettuce
import
world
,
step
from
...pages.common.logout
import
LogoutPage
from
...pages.lms.courseware
import
CoursewarePage
from
...pages.lms.instructor_dashboard
import
InstructorDashboardPage
...
...
@@ -253,12 +254,26 @@ class SubsectionGradingPolicyTest(ProgressPageBaseTest):
self
.
assertEqual
(
self
.
_get_section_score
(),
section_score
)
self
.
assertTrue
(
self
.
progress_page
.
text_on_page
(
text
))
def
_check_for_sr_text_in_chart
(
self
):
"""
Checks for sr text in the graph.
"""
selector
=
'grade-detail-graph'
sr_class
=
'class="sr"'
xpath
=
'//div[@id="{parent}"]//div[text()="{sr_class}"]'
.
format
(
parent
=
selector
,
sr_class
=
sr_class
)
graph
=
world
.
browser
.
find_by_xpath
(
xpath
)
self
.
assertTrue
(
"Necessary sr class and text not found!"
,
graph
.
size
()
>
0
)
def
test_subsection_grading_policy_on_progress_page
(
self
):
with
self
.
_logged_in_session
():
self
.
_check_scores_and_page_text
([(
0
,
1
),
(
0
,
1
)],
(
0
,
2
),
"Homework 1 - Test Subsection 1 - 0
%
(0/2)"
)
self
.
courseware_page
.
visit
()
self
.
_answer_problem_correctly
()
self
.
_check_scores_and_page_text
([(
1
,
1
),
(
0
,
1
)],
(
1
,
2
),
"Homework 1 - Test Subsection 1 - 50
%
(1/2)"
)
self
.
_check_for_sr_text_in_chart
()
self
.
_set_policy_for_subsection
(
"Not Graded"
)
...
...
@@ -271,3 +286,19 @@ class SubsectionGradingPolicyTest(ProgressPageBaseTest):
self
.
_set_policy_for_subsection
(
"Homework"
)
with
self
.
_logged_in_session
():
self
.
_check_scores_and_page_text
([(
1
,
1
),
(
0
,
1
)],
(
1
,
2
),
"Homework 1 - Test Subsection 1 - 50
%
(1/2)"
)
self
.
_check_for_sr_text_in_chart
()
@attr
(
'a11y'
)
class
ProgressPageA11yTest
(
ProgressPageBaseTest
):
"""
Class to test the accessibility of the progress page.
"""
def
test_progress_page_a11y
(
self
):
"""
Test the accessibility of the progress page.
"""
self
.
log_in_as_unique_user
()
self
.
progress_page
.
visit
()
self
.
progress_page
.
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