mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
Merge pull request #8869 from filipefurtad0/remove_signup_string
Removes signup string from private shop login screen
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
%p
|
||||
- if spree_current_user.nil?
|
||||
%p
|
||||
= t('.require_login_html', login: ('<a auth="login" data-action="click->login-modal#call">' + t('.login') + '</a>').html_safe, signup: ('<a auth="signup" data-action="click->login-modal#call">' + t('.signup') + '</a>').html_safe)
|
||||
= t('.require_login_link_html', login: ('<a data-action="click->login-modal#call">' + t('.login') + '</a>').html_safe)
|
||||
%p
|
||||
= t('.require_login_2_html', contact: link_to(t('.contact'), '#contact'), enterprise: current_distributor.name)
|
||||
- else
|
||||
|
||||
@@ -1487,10 +1487,9 @@ en:
|
||||
messages:
|
||||
customer_required:
|
||||
login: "login"
|
||||
signup: "signup"
|
||||
contact: "contact"
|
||||
require_customer_login: "Only approved customers can access this shop."
|
||||
require_login_html: "If you're already an approved customer, %{login} or %{signup} to proceed."
|
||||
require_login_link_html: "If you're already an approved customer, %{login} to proceed."
|
||||
require_login_2_html: "Want to start shopping here? Please %{contact} %{enterprise} and ask about joining."
|
||||
require_customer_html: "If you'd like to start shopping here, please %{contact} %{enterprise} to ask about joining."
|
||||
select_oc:
|
||||
|
||||
@@ -156,6 +156,25 @@ describe "Authentication", js: true do
|
||||
end
|
||||
end
|
||||
|
||||
describe "Logging in from the private shop page" do
|
||||
let(:distributor) { create(:distributor_enterprise, require_login: true) }
|
||||
let!(:order_cycle) {
|
||||
create(:simple_order_cycle, distributors: [distributor],
|
||||
coordinator: create(:distributor_enterprise))
|
||||
}
|
||||
before do
|
||||
visit enterprise_shop_path(distributor)
|
||||
end
|
||||
|
||||
it "clicking login triggers the login modal" do
|
||||
within "#shop-tabs" do
|
||||
find("a", text: "login").click
|
||||
end
|
||||
expect(page).to have_selector("a.active", text: "Login")
|
||||
expect(page).to have_button("Login")
|
||||
end
|
||||
end
|
||||
|
||||
describe "after following email confirmation link" do
|
||||
it "shows confirmed message in modal" do
|
||||
visit root_path(anchor: "/login", validation: "confirmed")
|
||||
|
||||
@@ -567,7 +567,7 @@ describe "As a consumer I want to shop with a distributor", js: true do
|
||||
it "tells us to login" do
|
||||
visit shop_path
|
||||
expect(page).to have_content "Only approved customers can access this shop."
|
||||
expect(page).to have_content "login or signup"
|
||||
expect(page).to have_content "login to proceed"
|
||||
expect(page).to have_no_content product.name
|
||||
expect(page).not_to have_selector "ordercycle"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user