mirror of
https://github.com/discourse/discourse.git
synced 2025-03-26 18:57:25 +08:00
BUGFIX: smoke test was broken
This commit is contained in:
parent
41631311e9
commit
6daef624c3
@ -17,9 +17,12 @@ task "smoke:test" => :environment do
|
|||||||
raise "TRIVIAL GET FAILED WITH #{res.code}"
|
raise "TRIVIAL GET FAILED WITH #{res.code}"
|
||||||
end
|
end
|
||||||
|
|
||||||
results = `#{phantom_path} #{Rails.root}/spec/phantom_js/smoke_test.js #{url}`
|
results = ""
|
||||||
|
IO.popen("#{phantom_path} #{Rails.root}/spec/phantom_js/smoke_test.js #{url}").each do |line|
|
||||||
|
puts line
|
||||||
|
results << line
|
||||||
|
end
|
||||||
|
|
||||||
puts results
|
|
||||||
if results !~ /ALL PASSED/
|
if results !~ /ALL PASSED/
|
||||||
raise "FAILED"
|
raise "FAILED"
|
||||||
end
|
end
|
||||||
|
@ -101,8 +101,8 @@ page.runTests = function(){
|
|||||||
|
|
||||||
navigate("navigate to first topic", function(){
|
navigate("navigate to first topic", function(){
|
||||||
Em.run.later(function(){
|
Em.run.later(function(){
|
||||||
if ($('.main-link a:first').length > 0) {
|
if ($('.main-link > a:first').length > 0) {
|
||||||
$('.main-link a:first').click(); // topic list page
|
$('.main-link > a:first').click(); // topic list page
|
||||||
} else {
|
} else {
|
||||||
$('.featured-topic a.title:first').click(); // categories page
|
$('.featured-topic a.title:first').click(); // categories page
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user