mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Fixed id duplication for login and sign up forms.
This commit is contained in:
@@ -7,12 +7,12 @@
|
||||
Invalid email or password
|
||||
%p
|
||||
= f.label :email, t(:email)
|
||||
= f.email_field :email, :class => 'title', :tabindex => 1
|
||||
= f.email_field :email, :class => 'title', :tabindex => 1, :id => "login_spree_user_email"
|
||||
%p
|
||||
= f.label :password, t(:password)
|
||||
= f.password_field :password, :class => 'title', :tabindex => 2
|
||||
= f.password_field :password, :class => 'title', :tabindex => 2, :id => "login_spree_user_password"
|
||||
%p
|
||||
%label
|
||||
= f.check_box :remember_me
|
||||
= f.label :remember_me, t(:remember_me)
|
||||
%p= f.submit t(:login), :class => 'button primary', :tabindex => 3
|
||||
%p= f.submit t(:login), :class => 'button primary', :tabindex => 3, :id => "login_spree_user_remember_me"
|
||||
@@ -4,14 +4,14 @@
|
||||
= form_for Spree::User.new, :as => :spree_user, :url => spree.spree_user_registration_path(@spree_user) do |f|
|
||||
%p
|
||||
= f.label :email, t(:email)
|
||||
= f.email_field :email, :class => 'title'
|
||||
= f.email_field :email, :class => 'title', :id => "signup_spree_user_email"
|
||||
|
||||
#password-credentials
|
||||
%p
|
||||
= f.label :password, t(:password)
|
||||
= f.password_field :password, :class => 'title'
|
||||
= f.password_field :password, :class => 'title', :id => "signup_spree_user_password"
|
||||
%p
|
||||
= f.label :password_confirmation, t(:confirm_password)
|
||||
= f.password_field :password_confirmation, :class => 'title'
|
||||
= f.password_field :password_confirmation, :class => 'title', :id => "signup_spree_user_password_confirmation"
|
||||
|
||||
= f.submit t(:create), :class => 'button'
|
||||
|
||||
@@ -24,8 +24,8 @@ feature %q{
|
||||
end
|
||||
|
||||
scenario "with valid credentials" do
|
||||
fill_in 'spree_user_email', :with => 'spree123@example.com'
|
||||
fill_in 'spree_user_password', :with => 'spree123'
|
||||
fill_in 'login_spree_user_email', :with => 'spree123@example.com'
|
||||
fill_in 'login_spree_user_password', :with => 'spree123'
|
||||
find(:xpath, '//input[contains(@value, "Login")][contains(@type, "submit")]').click
|
||||
sleep 3
|
||||
page.should_not have_content("Invalid email or password")
|
||||
@@ -33,8 +33,8 @@ feature %q{
|
||||
end
|
||||
|
||||
scenario "with invalid credentials" do
|
||||
fill_in 'spree_user_email', :with => 'spree123@example.com.WRONG'
|
||||
fill_in 'spree_user_password', :with => 'spree123_WRONG'
|
||||
fill_in 'login_spree_user_email', :with => 'spree123@example.com.WRONG'
|
||||
fill_in 'login_spree_user_password', :with => 'spree123_WRONG'
|
||||
find(:xpath, '//input[contains(@value, "Login")][contains(@type, "submit")]').click
|
||||
sleep 3
|
||||
page.should have_content("Invalid email or password")
|
||||
|
||||
Reference in New Issue
Block a user