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
0cfa3ff9
Commit
0cfa3ff9
authored
May 26, 2016
by
muhammad-ammar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
address christina's feedback
parent
efb99da8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
7 deletions
+21
-7
common/lib/capa/capa/capa_problem.py
+0
-1
common/test/acceptance/tests/lms/test_lms_problems.py
+21
-6
No files found.
common/lib/capa/capa/capa_problem.py
View file @
0cfa3ff9
...
@@ -830,7 +830,6 @@ class LoncapaProblem(object):
...
@@ -830,7 +830,6 @@ class LoncapaProblem(object):
if
tree
.
tag
in
html_transforms
:
if
tree
.
tag
in
html_transforms
:
tree
.
tag
=
html_transforms
[
problemtree
.
tag
][
'tag'
]
tree
.
tag
=
html_transforms
[
problemtree
.
tag
][
'tag'
]
# copy attributes over if not innocufying
for
(
key
,
value
)
in
problemtree
.
items
():
for
(
key
,
value
)
in
problemtree
.
items
():
tree
.
set
(
key
,
value
)
tree
.
set
(
key
,
value
)
...
...
common/test/acceptance/tests/lms/test_lms_problems.py
View file @
0cfa3ff9
...
@@ -5,6 +5,7 @@ Bok choy acceptance tests for problems in the LMS
...
@@ -5,6 +5,7 @@ Bok choy acceptance tests for problems in the LMS
See also old lettuce tests in lms/djangoapps/courseware/features/problems.feature
See also old lettuce tests in lms/djangoapps/courseware/features/problems.feature
"""
"""
from
textwrap
import
dedent
from
textwrap
import
dedent
from
nose.plugins.attrib
import
attr
from
..helpers
import
UniqueCourseTest
from
..helpers
import
UniqueCourseTest
from
...pages.studio.auto_auth
import
AutoAuthPage
from
...pages.studio.auto_auth
import
AutoAuthPage
...
@@ -256,6 +257,15 @@ class ProblemHintWithHtmlTest(ProblemsTest, EventsTestMixin):
...
@@ -256,6 +257,15 @@ class ProblemHintWithHtmlTest(ProblemsTest, EventsTestMixin):
event_filter
=
{
'event_type'
:
'edx.problem.hint.feedback_displayed'
},
event_filter
=
{
'event_type'
:
'edx.problem.hint.feedback_displayed'
},
number_of_matches
=
2
number_of_matches
=
2
)
)
# During in-order match only the expected key values are matched with in actual event data
# But in case of out-of-order match, all the keys in actual event data should be present in expected
# event data which is not possible always. That's why here we are deleting all those keys which are not
# present in expected event data.
for
actual_event
in
actual_events
:
del
actual_event
[
'event'
][
'module_id'
]
del
actual_event
[
'event'
][
'problem_part_id'
]
self
.
assert_events_match
(
self
.
assert_events_match
(
[
[
{
{
...
@@ -266,7 +276,8 @@ class ProblemHintWithHtmlTest(ProblemsTest, EventsTestMixin):
...
@@ -266,7 +276,8 @@ class ProblemHintWithHtmlTest(ProblemsTest, EventsTestMixin):
'student_answer'
:
[
u'choice_0'
],
'student_answer'
:
[
u'choice_0'
],
'correctness'
:
False
,
'correctness'
:
False
,
'question_type'
:
u'multiplechoiceresponse'
,
'question_type'
:
u'multiplechoiceresponse'
,
'hints'
:
[{
u'text'
:
u'A hint'
}]}
'hints'
:
[{
u'text'
:
u'A hint'
}]
}
},
},
{
{
'event'
:
'event'
:
...
@@ -280,7 +291,8 @@ class ProblemHintWithHtmlTest(ProblemsTest, EventsTestMixin):
...
@@ -280,7 +291,8 @@ class ProblemHintWithHtmlTest(ProblemsTest, EventsTestMixin):
}
}
}
}
],
],
actual_events
)
actual_events
,
in_order
=
False
)
def
test_demand_hint
(
self
):
def
test_demand_hint
(
self
):
"""
"""
...
@@ -481,10 +493,10 @@ class LogoutDuringAnswering(ProblemsTest):
...
@@ -481,10 +493,10 @@ class LogoutDuringAnswering(ProblemsTest):
self
.
assertEqual
(
problem_page
.
problem_name
,
'TEST PROBLEM'
)
self
.
assertEqual
(
problem_page
.
problem_name
,
'TEST PROBLEM'
)
#
@attr('a11y')
@attr
(
'a11y'
)
class
CAPAProblemQuestionA11yTest
(
ProblemsTest
):
class
CAPAProblemQuestionA11yTest
(
ProblemsTest
):
"""
"""
TestCase Class
for CAPA problem questions
TestCase Class
to verify CAPA problem questions accessibility.
"""
"""
def
get_problem
(
self
):
def
get_problem
(
self
):
"""
"""
...
@@ -541,9 +553,12 @@ class CAPAProblemQuestionA11yTest(ProblemsTest):
...
@@ -541,9 +553,12 @@ class CAPAProblemQuestionA11yTest(ProblemsTest):
include
=
[
'div.question'
]
include
=
[
'div.question'
]
)
)
# Check only for duplicate ids
problem_page
.
a11y_audit
.
config
.
set_rules
({
problem_page
.
a11y_audit
.
config
.
set_rules
({
"apply"
:
[
'duplicate-id'
],
"ignore"
:
[
'aria-valid-attr'
,
# TODO: AC-251,
'label'
,
# TODO: AC-290
'radiogroup'
,
# TODO: AC-251
]
})
})
# Run the accessibility audit.
# Run the accessibility audit.
...
...
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