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
71ec1b94
Commit
71ec1b94
authored
Dec 30, 2015
by
muzaffaryousaf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing & adding Bokchoys for edx notes pagination.
TNL-3910
parent
bfa2ea5b
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletions
+9
-1
common/djangoapps/terrain/stubs/http.py
+3
-0
common/test/acceptance/pages/lms/edxnotes.py
+6
-1
common/test/acceptance/tests/lms/test_lms_edxnotes.py
+0
-0
No files found.
common/djangoapps/terrain/stubs/http.py
View file @
71ec1b94
...
@@ -3,6 +3,7 @@ Stub implementation of an HTTP service.
...
@@ -3,6 +3,7 @@ Stub implementation of an HTTP service.
"""
"""
from
BaseHTTPServer
import
HTTPServer
,
BaseHTTPRequestHandler
from
BaseHTTPServer
import
HTTPServer
,
BaseHTTPRequestHandler
import
urllib
import
urlparse
import
urlparse
import
threading
import
threading
import
json
import
json
...
@@ -217,6 +218,8 @@ class StubHttpRequestHandler(BaseHTTPRequestHandler, object):
...
@@ -217,6 +218,8 @@ class StubHttpRequestHandler(BaseHTTPRequestHandler, object):
`format_str` is a string with old-style Python format escaping;
`format_str` is a string with old-style Python format escaping;
`args` is an array of values to fill into the string.
`args` is an array of values to fill into the string.
"""
"""
if
not
args
:
format_str
=
urllib
.
unquote
(
format_str
)
return
u"{0} - - [{1}] {2}
\n
"
.
format
(
return
u"{0} - - [{1}] {2}
\n
"
.
format
(
self
.
client_address
[
0
],
self
.
client_address
[
0
],
self
.
log_date_time_string
(),
self
.
log_date_time_string
(),
...
...
common/test/acceptance/pages/lms/edxnotes.py
View file @
71ec1b94
from
bok_choy.page_object
import
PageObject
,
PageLoadError
,
unguarded
from
bok_choy.page_object
import
PageObject
,
PageLoadError
,
unguarded
from
bok_choy.promise
import
BrokenPromise
,
EmptyPromise
from
bok_choy.promise
import
BrokenPromise
,
EmptyPromise
from
.course_page
import
CoursePage
from
.course_page
import
CoursePage
from
..common.paging
import
PaginatedUIMixin
from
...tests.helpers
import
disable_animations
from
...tests.helpers
import
disable_animations
from
selenium.webdriver.common.action_chains
import
ActionChains
from
selenium.webdriver.common.action_chains
import
ActionChains
...
@@ -242,7 +243,7 @@ class SearchResultsView(EdxNotesPageView):
...
@@ -242,7 +243,7 @@ class SearchResultsView(EdxNotesPageView):
TAB_SELECTOR
=
".tab#view-search-results"
TAB_SELECTOR
=
".tab#view-search-results"
class
EdxNotesPage
(
CoursePage
):
class
EdxNotesPage
(
CoursePage
,
PaginatedUIMixin
):
"""
"""
EdxNotes page.
EdxNotes page.
"""
"""
...
@@ -348,6 +349,10 @@ class EdxNotesPage(CoursePage):
...
@@ -348,6 +349,10 @@ class EdxNotesPage(CoursePage):
children
=
self
.
q
(
css
=
'.note-group'
)
children
=
self
.
q
(
css
=
'.note-group'
)
return
[
EdxNotesTagsGroup
(
self
.
browser
,
child
.
get_attribute
(
"id"
))
for
child
in
children
]
return
[
EdxNotesTagsGroup
(
self
.
browser
,
child
.
get_attribute
(
"id"
))
for
child
in
children
]
def
count
(
self
):
""" Returns the total number of notes in the list """
return
len
(
self
.
q
(
css
=
'div.wrapper-note-excerpts'
)
.
results
)
class
EdxNotesPageNoContent
(
CoursePage
):
class
EdxNotesPageNoContent
(
CoursePage
):
"""
"""
...
...
common/test/acceptance/tests/lms/test_lms_edxnotes.py
View file @
71ec1b94
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