You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For some reason when running a feature file that has javascript scenarios and non javascript scenarios the cookies are not always being set. It seems to be completely random as to when it is happening. The only similarity I have seen in the tests that do this are that some are tagged with @akephalos and some are not.
�(::) failed steps (::)�
�undefined method `value' for nil:NilClass (NoMethodError) (DRb::DRbRemoteError)
Our cookie helper:
module CookiesHelpers
def cookies
case Capybara.current_driver
when :rack_test, :envjs
rack_test_cookies
when :akephalos
akephalos_cookies
end
end
def akephalos_cookies
Capybara.current_session.driver.cookies
end
def rack_test_cookies
Capybara.
current_session.
driver.
current_session.
instance_variable_get("@rack_mock_session").
cookie_jar
end
end
World(CookiesHelpers)
And our session help which gets the cookies:
module SessionHelpers
def current_user
remember_token = if cookies['remember_token'].respond_to?(:value)
cookies['remember_token'].value
else
cookies['remember_token']
end
User.where(:remember_token => remember_token).first
end
end
World(SessionHelpers)
World(SessionHelpers)
The text was updated successfully, but these errors were encountered:
For some reason when running a feature file that has javascript scenarios and non javascript scenarios the cookies are not always being set. It seems to be completely random as to when it is happening. The only similarity I have seen in the tests that do this are that some are tagged with @akephalos and some are not.
�(::) failed steps (::)�
�undefined method `value' for nil:NilClass (NoMethodError) (DRb::DRbRemoteError)
Our cookie helper:
And our session help which gets the cookies:
World(SessionHelpers)
The text was updated successfully, but these errors were encountered: