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
8551917e
Commit
8551917e
authored
Sep 27, 2016
by
Chris Rodriguez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updating a11y test
parent
2da82035
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
11 deletions
+7
-11
common/test/acceptance/tests/lms/test_progress_page.py
+7
-11
No files found.
common/test/acceptance/tests/lms/test_progress_page.py
View file @
8551917e
...
...
@@ -10,7 +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
lettuce
import
world
from
nose.plugins.attrib
import
attr
from
...pages.common.logout
import
LogoutPage
from
...pages.lms.courseware
import
CoursewarePage
...
...
@@ -257,16 +257,12 @@ class SubsectionGradingPolicyTest(ProgressPageBaseTest):
def
_check_for_sr_text_in_chart
(
self
):
"""
Checks for sr text in the graph.
Ensures we have at least one .sr text in the graph.
We can assume if there's one, the JS is working correctly.
"""
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
)
graph_container
=
self
.
progress_page
.
q
(
css
=
'#'
+
selector
)[
0
]
self
.
assertTrue
(
"Necessary screenreader element not found!"
,
graph_container
.
find_element_by_class_name
(
'sr'
))
def
test_subsection_grading_policy_on_progress_page
(
self
):
with
self
.
_logged_in_session
():
...
...
@@ -274,7 +270,6 @@ class SubsectionGradingPolicyTest(ProgressPageBaseTest):
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"
)
...
...
@@ -283,11 +278,12 @@ class SubsectionGradingPolicyTest(ProgressPageBaseTest):
self
.
assertEqual
(
self
.
_get_problem_scores
(),
[(
1
,
1
),
(
0
,
1
)])
self
.
assertEqual
(
self
.
_get_section_score
(),
(
1
,
2
))
self
.
assertFalse
(
self
.
progress_page
.
text_on_page
(
"Homework 1 - Test Subsection 1"
))
self
.
_check_for_sr_text_in_chart
()
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'
)
...
...
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