Skip to content

Commit

Permalink
And a Rake task
Browse files Browse the repository at this point in the history
  • Loading branch information
pikesley committed Oct 26, 2016
1 parent 5049ffd commit 7a56ffa
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ end
namespace :nightwatch do
desc 'spin up selenium, run the nightwatch tests, tear down selenium'
task :local do
require 'dotenv'
Dotenv.load

pid = Process.spawn "selenium-server -log /tmp/selenium.log &"
sleep 3
sh "nightwatch --config spec/javascripts/support/nightwatch.js --env local"
Expand All @@ -30,6 +27,14 @@ namespace :nightwatch do
sh "nightwatch --config spec/javascripts/support/nightwatch.js --env local"
end

desc 'take screenshots'
task :screenshots do
pid = Process.spawn "selenium-server -log /tmp/selenium.log &"
sleep 3
sh "nightwatch --config spec/javascripts/support/nightwatch.js --env local --test spec/javascripts/screenshots/screenshots.js"
sh "pkill -f selenium"
end

#task :travis do
# sh "nvm install 4.0"
# sh "npm install -g nightwatch"
Expand Down

0 comments on commit 7a56ffa

Please sign in to comment.