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
6da296e4
Commit
6da296e4
authored
9 years ago
by
Muddasser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract hint from html instead of text
parent
76b8e2e8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
common/test/acceptance/pages/lms/problem.py
+7
-0
common/test/acceptance/tests/lms/test_lms_problems.py
+2
-2
No files found.
common/test/acceptance/pages/lms/problem.py
View file @
6da296e4
...
...
@@ -37,6 +37,13 @@ class ProblemPage(PageObject):
return
self
.
q
(
css
=
"div.problem span.message"
)
.
text
[
0
]
@property
def
extract_hint_text_from_html
(
self
):
"""
Return the "hint" text of the problem from html
"""
return
self
.
q
(
css
=
"div.problem div.problem-hint"
)
.
html
[
0
]
.
split
(
' <'
,
1
)[
0
]
@property
def
hint_text
(
self
):
"""
Return the "hint" text of the problem from its div.
...
...
This diff is collapsed.
Click to expand it.
common/test/acceptance/tests/lms/test_lms_problems.py
View file @
6da296e4
...
...
@@ -288,13 +288,13 @@ class ProblemWithMathjax(ProblemsTest):
# The hint button rotates through multiple hints
problem_page
.
click_hint
()
self
.
assertIn
(
"Hint (1 of 2): mathjax should work1"
,
problem_page
.
hint_text
)
self
.
assertIn
(
"Hint (1 of 2): mathjax should work1"
,
problem_page
.
extract_hint_text_from_html
)
problem_page
.
verify_mathjax_rendered_in_hint
()
# Rotate the hint and check the problem hint
problem_page
.
click_hint
()
self
.
assertIn
(
"Hint (2 of 2): mathjax should work2"
,
problem_page
.
hint_text
)
self
.
assertIn
(
"Hint (2 of 2): mathjax should work2"
,
problem_page
.
extract_hint_text_from_html
)
problem_page
.
verify_mathjax_rendered_in_hint
()
...
...
This diff is collapsed.
Click to expand it.
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