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
485a88fa
Commit
485a88fa
authored
Oct 14, 2016
by
cahrens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prefix status with Question number.
TNL-5735
parent
971f102b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
3 deletions
+16
-3
common/lib/xmodule/xmodule/js/spec/capa/display_spec.coffee
+2
-2
common/lib/xmodule/xmodule/js/src/capa/display.js
+1
-1
common/test/acceptance/pages/lms/problem.py
+7
-0
common/test/acceptance/tests/lms/test_lms_problems.py
+6
-0
No files found.
common/lib/xmodule/xmodule/js/spec/capa/display_spec.coffee
View file @
485a88fa
...
...
@@ -206,8 +206,8 @@ describe 'Problem', ->
describe
'when the response is correct'
,
->
it
'call render with returned content'
,
->
contents
=
'<
section aria-label="Question 1"><p>Correct<span class="status">excellent</span></p></section
>'
+
'<
section aria-label="Question 2"><p>Yep<span class="status">correct</span></p></section
>'
contents
=
'<
div class="wrapper-problem-response" aria-label="Question 1"><p>Correct<span class="status">excellent</span></p></div
>'
+
'<
div class="wrapper-problem-response" aria-label="Question 2"><p>Yep<span class="status">correct</span></p></div
>'
spyOn
(
$
,
'postWithPrefix'
).
and
.
callFake
(
url
,
answers
,
callback
)
->
callback
(
success
:
'correct'
,
contents
:
contents
)
promise
=
...
...
common/lib/xmodule/xmodule/js/src/capa/display.js
View file @
485a88fa
...
...
@@ -640,7 +640,7 @@
labeledStatus
=
[];
for
(
i
=
0
,
len
=
statusElement
.
length
;
i
<
len
;
i
++
)
{
element
=
statusElement
[
i
];
parentSection
=
$
(
element
).
closest
(
'
section
'
);
parentSection
=
$
(
element
).
closest
(
'
.wrapper-problem-response
'
);
addedStatus
=
false
;
if
(
parentSection
)
{
ariaLabel
=
parentSection
.
attr
(
'aria-label'
);
...
...
common/test/acceptance/pages/lms/problem.py
View file @
485a88fa
...
...
@@ -383,3 +383,10 @@ class ProblemPage(PageObject):
"""
self
.
wait_for_element_visibility
(
'.problem-progress'
,
"Problem progress is visible"
)
return
self
.
q
(
css
=
'.problem-progress'
)
.
text
[
0
]
@property
def
status_sr_text
(
self
):
"""
Returns the text in the special "sr" region used for display status.
"""
return
self
.
q
(
css
=
'#reader-feedback'
)
.
text
[
0
]
common/test/acceptance/tests/lms/test_lms_problems.py
View file @
485a88fa
...
...
@@ -205,17 +205,23 @@ class ProblemNotificationTests(ProblemsTest):
self
.
assertFalse
(
problem_page
.
is_success_notification_visible
())
problem_page
.
click_submit
()
problem_page
.
wait_success_notification
()
self
.
assertEqual
(
'Question 1: correct'
,
problem_page
.
status_sr_text
)
# Clicking Save should clear the submit notification
problem_page
.
click_save
()
self
.
assertFalse
(
problem_page
.
is_success_notification_visible
())
problem_page
.
wait_for_save_notification
()
# Changing the answer should clear the save notification
problem_page
.
click_choice
(
"choice_1"
)
self
.
assertFalse
(
problem_page
.
is_save_notification_visible
())
problem_page
.
click_save
()
problem_page
.
wait_for_save_notification
()
# Submitting the problem again should clear the save notification
problem_page
.
click_submit
()
problem_page
.
wait_incorrect_notification
()
self
.
assertEqual
(
'Question 1: incorrect'
,
problem_page
.
status_sr_text
)
self
.
assertFalse
(
problem_page
.
is_save_notification_visible
())
...
...
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