FAQ
Meant to add I'm testing "click_link 'Products'" and it doesn't work.

  Failure/Error: click_link "Products"
      Capybara::ElementNotFound:
        Unable to find link "Products"

It's never logging in....
On Tuesday, June 25, 2013 6:01:36 PM UTC-7, ara...@gmail.com wrote:

I looked at spree store credits and found this code:

module AuthenticationHelpers
def sign_in_as!(user)
visit '/login'
fill_in 'Email', :with => user.email
fill_in 'Password', :with => 'secret'
click_button 'Login'
end
end

RSpec.configure do |c|
c.include AuthenticationHelpers
end


I added it to spec/support/authentication_helpers.rb

And I include it in my

spec/features/admin_spec.rb

If I do the following:

feature 'test tab' do
scenario "test tab" do
admin = create(:admin_user)
visit '/login'
fill_in 'Email', :with => admin.email
fill_in 'Password', :with => 'secret'
click_button 'Login'
visit spree.admin_path
end
end


It doesn't pass

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupspree-user @
categoriesrubyonrails
postedJun 26, '13 at 1:04a
activeJun 26, '13 at 1:04a
posts1
users1
websitespreecommerce.com
irc#RubyOnRails

1 user in discussion

Arachnd: 1 post

People

Translate

site design / logo © 2022 Grokbase