mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-04 22:16:08 +00:00
Fixing broken limited reached page in registration flow
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
= inject_enterprise_attributes
|
||||
|
||||
- steps = %w{about contact details finished images introduction}
|
||||
- steps += %w{limit_reached logo promo social steps type}
|
||||
- steps += %w{logo promo social steps type}
|
||||
- steps.each do |step|
|
||||
= render partial: "registration/steps/#{step}"
|
||||
= render "modal"
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
= render partial: "registration/steps/limit_reached"
|
||||
|
||||
/ Directive which loads the modal
|
||||
%div{ "ofn-registration-limit-modal" => true }
|
||||
|
||||
@@ -98,6 +98,23 @@ feature "Registration", js: true do
|
||||
expect(e.instagram).to eq "@InStAgRaM"
|
||||
end
|
||||
|
||||
context "when the user has no more remaining enterprises" do
|
||||
before do
|
||||
user.update_attributes(enterprise_limit: 0)
|
||||
end
|
||||
|
||||
it "displays the limit reached page" do
|
||||
visit registration_path
|
||||
|
||||
expect(page).to have_selector "dd", text: "Login"
|
||||
switch_to_login_tab
|
||||
|
||||
# Enter Login details
|
||||
fill_in "Email", with: user.email
|
||||
fill_in "Password", with: user.password
|
||||
click_login_and_ensure_content I18n.t('limit_reached_headline')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "Terms of Service agreement" do
|
||||
|
||||
Reference in New Issue
Block a user