mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-05 07:21:48 +01:00
finish upgrade of selenium
these were manual cherry-picks of the rails upgrade work.
This commit is contained in:
parent
551eab19a5
commit
e2841e31eb
9 changed files with 80 additions and 48 deletions
2
features/support/init_factory_girl.rb
Normal file
2
features/support/init_factory_girl.rb
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
require 'factory_girl'
|
||||
Dir.glob(File.join(File.dirname(__FILE__), '../../spec/factories/*.rb')).each {|f| require f }
|
||||
|
|
@ -9,7 +9,23 @@ module NavigationHelpers
|
|||
case page_name
|
||||
|
||||
when /the home\s?page/
|
||||
'/'
|
||||
root_path
|
||||
when /the statistics page/
|
||||
stats_path
|
||||
when /the signup page/
|
||||
signup_path
|
||||
when /the login page/
|
||||
login_path
|
||||
when /the notes page/
|
||||
notes_path
|
||||
when /the contexts page/
|
||||
contexts_path
|
||||
when /the manage users page/
|
||||
users_path
|
||||
when /the repeating todos page/
|
||||
recurring_todos_path
|
||||
when /the integrations page/
|
||||
integrations_path
|
||||
|
||||
# Add more mappings here.
|
||||
# Here is an example that pulls values out of the Regexp:
|
||||
|
|
|
|||
|
|
@ -1,22 +1,13 @@
|
|||
Webrat.configure do |config|
|
||||
config.mode = :selenium
|
||||
config.application_environment = :selenium
|
||||
config.selenium_browser_startup_timeout = 30
|
||||
#config.selenium_server_address = "localhost"
|
||||
end
|
||||
if ENV["RAILS_ENV"] == "selenium"
|
||||
puts "Configuring to use Selenium with Webrat for Cucumber stories"
|
||||
Webrat.configure do |config|
|
||||
config.mode = :selenium
|
||||
config.application_environment = :selenium
|
||||
config.selenium_browser_startup_timeout = 30
|
||||
# use only if you run a separate selenium server instance and do not
|
||||
# want webrat to start one for you
|
||||
#config.selenium_server_address = "localhost"
|
||||
end
|
||||
|
||||
Cucumber::Rails::World.use_transactional_fixtures = false
|
||||
|
||||
require 'database_cleaner'
|
||||
|
||||
# clean the database once when starting
|
||||
DatabaseCleaner.clean_with :truncation
|
||||
DatabaseCleaner.strategy = :truncation
|
||||
|
||||
Before do
|
||||
DatabaseCleaner.start
|
||||
end
|
||||
|
||||
After do
|
||||
DatabaseCleaner.clean
|
||||
end
|
||||
Cucumber::Rails::World.use_transactional_fixtures = false
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue