Fix: User does not get stuck when going backwards while creating new ent

This commit is contained in:
binarygit
2023-01-05 15:22:06 +05:45
committed by Jean-Baptiste Bellet
parent 533f7048bf
commit ae166ae220
2 changed files with 9 additions and 8 deletions

View File

@@ -10,7 +10,7 @@
%span{ ng: { class: "{brick: !enterprise.is_primary_producer, turquoise: enterprise.is_primary_producer}" } }
{{ enterprise.name }}
%form{ name: 'about', novalidate: true, ng: { controller: "RegistrationFormCtrl", submit: "update('images',about)" } }
%form{ name: 'about', novalidate: true, ng: { controller: "RegistrationFormCtrl", submit: "selectIfValid('images', about)" } }
.row
.small-12.columns
.alert-box.info{ "ofn-inline-alert" => true, ng: { show: "visible" } }

View File

@@ -98,13 +98,6 @@ describe "Registration" do
click_button "Continue"
expect(page).to have_content 'Step 1. Select Logo Image'
# Enterprise should be updated
e.reload
expect(e.description).to eq "Short description"
expect(e.long_description).to eq "Long description"
expect(e.abn).to eq '12345'
expect(e.acn).to eq '54321'
expect(e.charges_sales_tax).to be true
# Images
# Upload logo image
@@ -142,7 +135,15 @@ describe "Registration" do
expect(page).to have_content 'Finished!'
# Done
# Check values set in about tab
e.reload
expect(e.description).to eq "Short description"
expect(e.long_description).to eq "Long description"
expect(e.abn).to eq '12345'
expect(e.acn).to eq '54321'
expect(e.charges_sales_tax).to be true
# Check values set in social tab
expect(e.website).to eq "www.shop.com"
expect(e.facebook).to eq "FaCeBoOk"
expect(e.linkedin).to eq "LiNkEdIn"