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
477f29d5
Commit
477f29d5
authored
Jun 06, 2013
by
JonahStanley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added docstring specifying when this method must be called
parent
d226a21e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
common/djangoapps/terrain/steps.py
+15
-0
No files found.
common/djangoapps/terrain/steps.py
View file @
477f29d5
...
...
@@ -163,14 +163,29 @@ def dialogs_are_closed(step):
@step
(
'I will confirm all alerts'
)
def
i_confirm_all_alerts
(
step
):
"""
Please note: This method must be called RIGHT BEFORE an expected alert
Window variables are page local and thus all changes are removed upon navigating to a new page
In addition, this method changes the functionality of ONLY future alerts
"""
world
.
browser
.
execute_script
(
'window.confirm = function(){return true;} ; window.alert = function(){return;}'
)
@step
(
'I will cancel all alerts'
)
def
i_cancel_all_alerts
(
step
):
"""
Please note: This method must be called RIGHT BEFORE an expected alert
Window variables are page local and thus all changes are removed upon navigating to a new page
In addition, this method changes the functionality of ONLY future alerts
"""
world
.
browser
.
execute_script
(
'window.confirm = function(){return false;} ; window.alert = function(){return;}'
)
@step
(
'I will answer all prompts with "([^"]*)"'
)
def
i_answer_prompts_with
(
step
,
prompt
):
"""
Please note: This method must be called RIGHT BEFORE an expected alert
Window variables are page local and thus all changes are removed upon navigating to a new page
In addition, this method changes the functionality of ONLY future alerts
"""
world
.
browser
.
execute_script
(
'window.prompt = function(){return
%
s;}'
)
%
prompt
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