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
22cf0dfa
Commit
22cf0dfa
authored
May 14, 2013
by
Diana Huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug in lettuce tests where the unregister dialog wasn't
getting closed fast enough.
parent
1c217530
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
3 deletions
+21
-3
common/djangoapps/terrain/steps.py
+5
-0
common/djangoapps/terrain/ui_helpers.py
+13
-2
lms/djangoapps/courseware/features/registration.feature
+3
-1
No files found.
common/djangoapps/terrain/steps.py
View file @
22cf0dfa
...
@@ -144,3 +144,8 @@ def i_am_an_edx_user(step):
...
@@ -144,3 +144,8 @@ def i_am_an_edx_user(step):
@step
(
u'User "([^"]*)" is an edX user$'
)
@step
(
u'User "([^"]*)" is an edX user$'
)
def
registered_edx_user
(
step
,
uname
):
def
registered_edx_user
(
step
,
uname
):
world
.
create_user
(
uname
)
world
.
create_user
(
uname
)
@step
(
u'All dialogs should be closed$'
)
def
dialogs_are_closed
(
step
):
assert
world
.
dialogs_closed
()
common/djangoapps/terrain/ui_helpers.py
View file @
22cf0dfa
#pylint: disable=C0111
#pylint: disable=C0111
#pylint: disable=W0621
#pylint: disable=W0621
from
lettuce
import
world
,
step
from
lettuce
import
world
import
time
import
time
from
urllib
import
quote_plus
from
urllib
import
quote_plus
from
selenium.common.exceptions
import
WebDriverException
from
selenium.common.exceptions
import
WebDriverException
...
@@ -105,10 +105,21 @@ def css_visible(css_selector):
...
@@ -105,10 +105,21 @@ def css_visible(css_selector):
@world.absorb
@world.absorb
def
dialogs_closed
():
def
are_dialogs_closed
(
driver
):
'''
Return True when no modal dialogs are visible
'''
return
not
css_visible
(
'.modal'
)
wait_for
(
are_dialogs_closed
)
return
not
css_visible
(
'.modal'
)
@world.absorb
def
save_the_html
(
path
=
'/tmp'
):
def
save_the_html
(
path
=
'/tmp'
):
u
=
world
.
browser
.
url
u
=
world
.
browser
.
url
html
=
world
.
browser
.
html
.
encode
(
'ascii'
,
'ignore'
)
html
=
world
.
browser
.
html
.
encode
(
'ascii'
,
'ignore'
)
filename
=
'
%
s.html'
%
quote_plus
(
u
)
filename
=
'
%
s.html'
%
quote_plus
(
u
)
f
=
open
(
'
%
s/
%
s'
%
(
path
,
filename
),
'w'
)
f
=
open
(
'
%
s/
%
s'
%
(
path
,
filename
),
'w'
)
f
.
write
(
html
)
f
.
write
(
html
)
f
.
close
f
.
close
()
lms/djangoapps/courseware/features/registration.feature
View file @
22cf0dfa
...
@@ -15,4 +15,6 @@ Feature: Register for a course
...
@@ -15,4 +15,6 @@ Feature: Register for a course
And
I visit the dashboard
And
I visit the dashboard
When
I click the link with the text
"Unregister"
When
I click the link with the text
"Unregister"
And
I press the
"Unregister"
button in the Unenroll dialog
And
I press the
"Unregister"
button in the Unenroll dialog
Then
I should see
"Looks like you haven't registered for any courses yet."
somewhere in the page
Then
All dialogs should be closed
And
I should be on the dashboard page
And
I should see
"Looks like you haven't registered for any courses yet."
somewhere in the page
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