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
03f02bcf
Commit
03f02bcf
authored
Jun 13, 2013
by
David Baumgold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added rake jasmine:cms:browser:watch command
parent
25aec96e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
rakefiles/jasmine.rake
+11
-2
No files found.
rakefiles/jasmine.rake
View file @
03f02bcf
...
@@ -61,10 +61,10 @@ def template_jasmine_runner(lib)
...
@@ -61,10 +61,10 @@ def template_jasmine_runner(lib)
yield
File
.
expand_path
(
template_output
)
yield
File
.
expand_path
(
template_output
)
end
end
def
jasmine_browser
(
url
,
wait
=
10
)
def
jasmine_browser
(
url
,
jitter
=
3
,
wait
=
10
)
# Jitter starting the browser so that the tests don't all try and
# Jitter starting the browser so that the tests don't all try and
# start the browser simultaneously
# start the browser simultaneously
sleep
(
rand
(
3
))
sleep
(
rand
(
jitter
))
sh
(
"python -m webbrowser -t '
#{
url
}
'"
)
sh
(
"python -m webbrowser -t '
#{
url
}
'"
)
sleep
(
wait
)
sleep
(
wait
)
end
end
...
@@ -87,6 +87,15 @@ end
...
@@ -87,6 +87,15 @@ end
end
end
end
end
desc
"Open jasmine tests for
#{
system
}
in your default browser, and dynamically recompile coffeescript"
task
:'browser:watch'
=>
:'assets:coffee:_watch'
do
django_for_jasmine
(
system
,
true
)
do
|
jasmine_url
|
jasmine_browser
(
jasmine_url
,
jitter
=
0
,
wait
=
0
)
end
puts
"Press ENTER to terminate"
.
red
$stdin
.
gets
end
desc
"Use phantomjs to run jasmine tests for
#{
system
}
from the console"
desc
"Use phantomjs to run jasmine tests for
#{
system
}
from the console"
task
:phantomjs
do
task
:phantomjs
do
Rake
::
Task
[
:assets
].
invoke
(
system
,
'jasmine'
)
Rake
::
Task
[
:assets
].
invoke
(
system
,
'jasmine'
)
...
...
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