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
b2de4fd9
Commit
b2de4fd9
authored
Sep 15, 2014
by
Christine Lytwynec
Committed by
Zia Fazal
Apr 06, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add promise to get around race condition in discussion bok-choy test
parent
ceedc248
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
common/test/acceptance/pages/lms/discussion.py
+11
-2
No files found.
common/test/acceptance/pages/lms/discussion.py
View file @
b2de4fd9
from
contextlib
import
contextmanager
from
contextlib
import
contextmanager
from
bok_choy.page_object
import
PageObject
from
bok_choy.page_object
import
PageObject
from
bok_choy.promise
import
EmptyPromise
from
bok_choy.promise
import
EmptyPromise
,
Promise
from
.course_page
import
CoursePage
from
.course_page
import
CoursePage
...
@@ -367,7 +367,16 @@ class DiscussionUserProfilePage(CoursePage):
...
@@ -367,7 +367,16 @@ class DiscussionUserProfilePage(CoursePage):
return
[
elem
.
get_attribute
(
"id"
)[
7
:]
for
elem
in
elems
]
return
[
elem
.
get_attribute
(
"id"
)[
7
:]
for
elem
in
elems
]
def
get_current_page
(
self
):
def
get_current_page
(
self
):
return
int
(
self
.
q
(
css
=
"nav.discussion-paginator li.current-page"
)
.
text
[
0
])
def
check_func
():
try
:
current_page
=
int
(
self
.
q
(
css
=
"nav.discussion-paginator li.current-page"
)
.
text
[
0
])
except
:
return
False
,
None
return
True
,
current_page
return
Promise
(
check_func
,
'discussion-paginator current page has text'
,
timeout
=
5
,
)
.
fulfill
()
def
_check_pager
(
self
,
text
,
page_number
=
None
):
def
_check_pager
(
self
,
text
,
page_number
=
None
):
"""
"""
...
...
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