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
1d0ce64b
Commit
1d0ce64b
authored
Dec 17, 2013
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update to the latest version of lettuce
parent
179a1dd4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
8 deletions
+19
-8
common/djangoapps/terrain/steps.py
+8
-4
common/djangoapps/terrain/ui_helpers.py
+10
-3
requirements/edx/github.txt
+1
-1
No files found.
common/djangoapps/terrain/steps.py
View file @
1d0ce64b
...
...
@@ -11,10 +11,14 @@
# Disable the "unused argument" warning because lettuce uses "step"
#pylint: disable=W0613
# django_url is assigned late in the process of loading lettuce,
# so we import this as a module, and then read django_url from
# it to get the correct value
import
lettuce.django
from
lettuce
import
world
,
step
from
.course_helpers
import
*
from
.ui_helpers
import
*
from
lettuce.django
import
django_url
from
nose.tools
import
assert_equals
# pylint: disable=E0611
from
logging
import
getLogger
...
...
@@ -135,7 +139,7 @@ def should_have_link_with_id_and_text(step, link_id, text):
def
should_have_link_with_path_and_text
(
step
,
path
,
text
):
link
=
world
.
browser
.
find_link_by_text
(
text
)
assert
len
(
link
)
>
0
assert_equals
(
link
.
first
[
"href"
],
django_url
(
path
))
assert_equals
(
link
.
first
[
"href"
],
lettuce
.
django
.
django_url
(
path
))
@step
(
r'should( not)? see "(.*)" (?:somewhere|anywhere) (?:in|on) (?:the|this) page'
)
...
...
@@ -154,7 +158,7 @@ def should_see_in_the_page(step, doesnt_appear, text):
def
i_am_logged_in
(
step
):
world
.
create_user
(
'robot'
,
'test'
)
world
.
log_in
(
username
=
'robot'
,
password
=
'test'
)
world
.
browser
.
visit
(
django_url
(
'/'
))
world
.
browser
.
visit
(
lettuce
.
django
.
django_url
(
'/'
))
dash_css
=
'section.container.dashboard'
assert
world
.
is_css_present
(
dash_css
)
...
...
@@ -176,7 +180,7 @@ def dialogs_are_closed(step):
@step
(
u'visit the url "([^"]*)"'
)
def
visit_url
(
step
,
url
):
world
.
browser
.
visit
(
django_url
(
url
))
world
.
browser
.
visit
(
lettuce
.
django
.
django_url
(
url
))
@step
(
u'wait for AJAX to (?:finish|complete)'
)
...
...
common/djangoapps/terrain/ui_helpers.py
View file @
1d0ce64b
...
...
@@ -2,10 +2,18 @@
#pylint: disable=W0621
from
lettuce
import
world
import
time
import
json
import
re
import
platform
# django_url is assigned late in the process of loading lettuce,
# so we import this as a module, and then read django_url from
# it to get the correct value
import
lettuce.django
from
textwrap
import
dedent
from
urllib
import
quote_plus
from
selenium.common.exceptions
import
(
...
...
@@ -14,7 +22,6 @@ from selenium.common.exceptions import (
from
selenium.webdriver.support
import
expected_conditions
as
EC
from
selenium.webdriver.common.by
import
By
from
selenium.webdriver.support.ui
import
WebDriverWait
from
lettuce.django
import
django_url
from
nose.tools
import
assert_true
# pylint: disable=E0611
...
...
@@ -247,13 +254,13 @@ def wait_for_ajax_complete():
@world.absorb
def
visit
(
url
):
world
.
browser
.
visit
(
django_url
(
url
))
world
.
browser
.
visit
(
lettuce
.
django
.
django_url
(
url
))
wait_for_js_to_load
()
@world.absorb
def
url_equals
(
url
):
return
world
.
browser
.
url
==
django_url
(
url
)
return
world
.
browser
.
url
==
lettuce
.
django
.
django_url
(
url
)
@world.absorb
...
...
requirements/edx/github.txt
View file @
1d0ce64b
...
...
@@ -10,7 +10,7 @@
-e git+https://github.com/edx/django-staticfiles.git@6d2504e5c8#egg=django-staticfiles
-e git+https://github.com/edx/django-pipeline.git@88ec8a011e481918fdc9d2682d4017c835acd8be#egg=django-pipeline
-e git+https://github.com/edx/django-wiki.git@41815e2ef1b0323f92900f8e60711b0f0c37766b#egg=django-wiki
-e git+https://github.com/
edx/lettuce.git@503fe2d2599290c45b021d6c424ab5ea899e42be
#egg=lettuce
-e git+https://github.com/
gabrielfalcao/lettuce.git@cccc3978ad2df82a78b6f9648fe2e9baddd22f88
#egg=lettuce
-e git+https://github.com/dementrock/pystache_custom.git@776973740bdaad83a3b029f96e415a7d1e8bec2f#egg=pystache_custom-dev
-e git+https://github.com/eventbrite/zendesk.git@d53fe0e81b623f084e91776bcf6369f8b7b63879#egg=zendesk
...
...
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