diff --git a/app/controllers/registration_controller.rb b/app/controllers/registration_controller.rb index 4fae68bb79..a7401abf60 100644 --- a/app/controllers/registration_controller.rb +++ b/app/controllers/registration_controller.rb @@ -7,11 +7,11 @@ class RegistrationController < BaseController layout 'registration' def index - @enterprise_attributes = { type: 'profile' } + @enterprise_attributes = { sells: 'none' } end def store - @enterprise_attributes = { is_distributor: true, is_primary_producer: true, type: 'single' } + @enterprise_attributes = { is_primary_producer: true, sells: 'own' } render :index end diff --git a/spec/features/consumer/registration_spec.rb b/spec/features/consumer/registration_spec.rb index 91bd92eb91..8c55ae3a68 100644 --- a/spec/features/consumer/registration_spec.rb +++ b/spec/features/consumer/registration_spec.rb @@ -3,8 +3,7 @@ require 'spec_helper' feature "Registration", js: true do include WebHelper - # TODO fix this after removal of is_distributor. - pending "Registering a Profile" do + describe "Registering a Profile" do let(:user) { create(:user, password: "password", password_confirmation: "password") } it "Allows a logged in user to register a profile" do @@ -18,7 +17,7 @@ feature "Registration", js: true do # Enter Login details fill_in "Email", with: user.email fill_in "Password", with: user.password - click_login_and_ensure_content "This wizard will step you through creating a profile" + click_login_and_ensure_content "Hi there!" expect(URI.parse(current_url).path).to eq registration_path @@ -45,8 +44,11 @@ feature "Registration", js: true do # Choosing a type expect(page).to have_content 'Last step to create your enterprise!' - click_link 'both-panel' + click_link 'producer-panel' click_button 'Continue' + sleep 2 + click_button 'Continue' + save_screenshot '/Users/rob/Desktop/ss.png' # Enterprise should be created expect(page).to have_content 'Nice one!' @@ -107,7 +109,7 @@ feature "Registration", js: true do # Enter Login details fill_in "Email", with: user.email fill_in "Password", with: user.password - click_login_and_ensure_content "This wizard will step you through creating a profile" + click_login_and_ensure_content "Hi there!" expect(URI.parse(current_url).path).to eq store_registration_path