Fixing broken limited reached page in registration flow

This commit is contained in:
Rob Harrington
2017-04-05 17:02:40 +10:00
parent 80d8d18eb2
commit c83ad2ecc4
3 changed files with 20 additions and 1 deletions

View File

@@ -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"

View File

@@ -1,2 +1,4 @@
= render partial: "registration/steps/limit_reached"
/ Directive which loads the modal
%div{ "ofn-registration-limit-modal" => true }

View File

@@ -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