Add smoke test script that runs in chrome headless.

This commit is contained in:
Guo Xiang Tan
2017-12-18 16:39:01 +08:00
parent b9f553d45d
commit 8d44642b97
4 changed files with 381 additions and 6 deletions
+9 -1
View File
@@ -31,7 +31,15 @@ task "smoke:test" do
end
results = ""
IO.popen("#{phantom_path} #{Rails.root}/spec/phantom_js/smoke_test.js #{url}").each do |line|
command =
if ENV["USE_CHROME"]
"node #{Rails.root}/test/smoke_test.js #{url}"
else
"#{phantom_path} #{Rails.root}/spec/phantom_js/smoke_test.js #{url}"
end
IO.popen(command).each do |line|
puts line
results << line
end