lib/generic_test/setup.rb in generic_test-0.2.2 vs lib/generic_test/setup.rb in generic_test-0.3.0
- old
+ new
@@ -32,10 +32,15 @@
login_button.click
login_button.wait_while(&:present?)
puts "Login through #{ENV[GT_LOGIN_URL]} successful!"
end
+GenericTest.all_subpages = true if ENV['ALL_SUBPAGES'] == 'true'
ENV['PAGE_URL'] = RestClient.get(ENV['PAGE_URL']).request.url # Check page exists
-puts "Checking #{ENV['PAGE_URL']}"
+puts "Loading..."
browser.goto ENV['PAGE_URL']
sleep 2.5 # Give a bit of time for page to load
+puts "Checking #{ENV['PAGE_URL']} (#{browser.title})"
GenericTest.pages << GenericTest::Page.new(browser)
+if GenericTest.all_subpages
+ puts "Subpages include #{GenericTest.pages.first.internal_links }"
+end