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
84bbd84a
Commit
84bbd84a
authored
Jul 01, 2013
by
David Baumgold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ease Christina's pain
But only slightly. Sorry Christina.
parent
e1ed5c3d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
common/djangoapps/terrain/ui_helpers.py
+3
-7
No files found.
common/djangoapps/terrain/ui_helpers.py
View file @
84bbd84a
...
@@ -70,9 +70,7 @@ def css_click(css_selector, index=0, max_attempts=5, success_condition=lambda: T
...
@@ -70,9 +70,7 @@ def css_click(css_selector, index=0, max_attempts=5, success_condition=lambda: T
success_condition).
success_condition).
"""
"""
assert
is_css_present
(
css_selector
),
"{} is not present"
.
format
(
css_selector
)
assert
is_css_present
(
css_selector
),
"{} is not present"
.
format
(
css_selector
)
attempt
=
0
for
_
in
range
(
max_attempts
):
result
=
False
for
attempt
in
range
(
max_attempts
):
try
:
try
:
world
.
css_find
(
css_selector
)[
index
]
.
click
()
world
.
css_find
(
css_selector
)[
index
]
.
click
()
if
success_condition
():
if
success_condition
():
...
@@ -85,7 +83,7 @@ def css_click(css_selector, index=0, max_attempts=5, success_condition=lambda: T
...
@@ -85,7 +83,7 @@ def css_click(css_selector, index=0, max_attempts=5, success_condition=lambda: T
except
:
except
:
pass
pass
else
:
else
:
# try once more, letting ex
ec
ptions raise
# try once more, letting ex
ce
ptions raise
world
.
css_find
(
css_selector
)[
index
]
.
click
()
world
.
css_find
(
css_selector
)[
index
]
.
click
()
...
@@ -102,9 +100,7 @@ def css_check(css_selector, index=0, max_attempts=5, success_condition=lambda: T
...
@@ -102,9 +100,7 @@ def css_check(css_selector, index=0, max_attempts=5, success_condition=lambda: T
success_condition).
success_condition).
"""
"""
assert
is_css_present
(
css_selector
),
"{} is not present"
.
format
(
css_selector
)
assert
is_css_present
(
css_selector
),
"{} is not present"
.
format
(
css_selector
)
attempt
=
0
for
_
in
range
(
max_attempts
):
result
=
False
for
attempt
in
range
(
max_attempts
):
try
:
try
:
world
.
css_find
(
css_selector
)[
index
]
.
check
()
world
.
css_find
(
css_selector
)[
index
]
.
check
()
if
success_condition
():
if
success_condition
():
...
...
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