mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Display log in / sign up links on landing page
This commit is contained in:
@@ -12,6 +12,15 @@
|
||||
|
||||
= csrf_meta_tags
|
||||
%body
|
||||
- unless spree_current_user
|
||||
%nav.top-bar
|
||||
%ul.title-area
|
||||
%li.name
|
||||
%section.top-bar-section
|
||||
%ul.right
|
||||
%li= link_to 'Log in', spree.login_path
|
||||
%li= link_to 'Sign up', spree.signup_path
|
||||
|
||||
.row.landing-page-row.with-bottom-border
|
||||
.large-12.columns.centered
|
||||
= image_tag "ofn_logo_black.png"
|
||||
|
||||
@@ -5,6 +5,7 @@ feature %q{
|
||||
I want to see the landing page
|
||||
So I choose a distributor
|
||||
}, js: true do
|
||||
include AuthenticationWorkflow
|
||||
|
||||
background do
|
||||
# for the link to be visible, it would also have to be in 'distributors.yml'
|
||||
@@ -23,9 +24,24 @@ feature %q{
|
||||
end
|
||||
end
|
||||
|
||||
describe "account links" do
|
||||
it "should display log in and sign up links when signed out" do
|
||||
page.should have_link 'Log in'
|
||||
page.should have_link 'Sign up'
|
||||
end
|
||||
|
||||
it "should not display links when signed in" do
|
||||
login_to_consumer_section
|
||||
visit root_path
|
||||
|
||||
page.should_not have_link 'Log in'
|
||||
page.should_not have_link 'Sign up'
|
||||
end
|
||||
end
|
||||
|
||||
describe "hub list" do
|
||||
it "should display hub link" do
|
||||
page.should have_link("Green Grass")
|
||||
page.should have_link "Green Grass"
|
||||
end
|
||||
|
||||
it "should link to the hub page" do
|
||||
|
||||
Reference in New Issue
Block a user