I'm attempting to run cucumber tests of my application over capybara with selenium driver. Within the test steps i dynamically create customers to login towards the application . However the user login fails using the user i've produced. I've set the consumer_transactional_fixture to false. Still the produced records aren't open to the selenium application.
This is actually the code
@browser Scenario: Admin alone can get access to admin pages Given "email@example.com" is really a admin After I have drenched in as "firstname.lastname@example.org" step definition file
Given /"([^"]*)" is really a admin/ do email
user = Email.active.find_by_address(email).try(:user) User.new(, :password =>
'Monkey_123', :password_confirmation => 'Monkey_123', :last_title => 'example', :first_title => 'admin')
user.groups << Group.find(1)
user.primary_email = Email.new(:address => email, :condition => Email::Condition::ACTIVE,
:email_type => Email::Type::PRIMARY)
after i run the tests using capybara and selenium driveri am not able to login to my application using
the produced user with the browser.
I attempted while using ruby debugger, which demonstrated the development of the specific user.
Following is my config within the env.rb file
require 'database_cleaner' DatabaseCleaner.strategy = :truncation rescue LoadError => ignore_if_database_cleaner_not_present
Capybara.server_port = 9887 # Or whatever number you would like?
Capybara.application_host = "http://localhost:#"
Capybara.default_wait_time = 4
Before('@browser') do Capybara.current_driver = :selenium finish
Kindly advise a solution with this. The gems versions are 1) cucumber -v .10.7
4) database_cleaner .5.