Allow to SignatureSheet parse new fields
- In the previous version, each signature was equivalent to a document and we separated them by commas. Now each signature may also need the fields birth date and postal code. So we separated each signature with a semicolon and separated each of its fields by commas. Example old version: "12345678X, 87654321Y" Example new version: "12345678X, 31/12/1980, 28001; 87654321Y, 31/12/1981, 28002" - Update translations: "Write the numbers separated by commas (,)" to "Write the numbers separated by semicolons (;)"
This commit is contained in:
@@ -39,7 +39,7 @@ describe "Signature sheets" do
|
||||
|
||||
select "Citizen proposal", from: "signature_sheet_signable_type"
|
||||
fill_in "signature_sheet_signable_id", with: proposal.id
|
||||
fill_in "signature_sheet_required_fields_to_verify", with: "12345678Z, 1234567L, 99999999Z"
|
||||
fill_in "signature_sheet_required_fields_to_verify", with: "12345678Z; 1234567L; 99999999Z"
|
||||
click_button "Create signature sheet"
|
||||
|
||||
expect(page).to have_content "Signature sheet created successfully"
|
||||
@@ -61,7 +61,7 @@ describe "Signature sheets" do
|
||||
|
||||
select "Investment", from: "signature_sheet_signable_type"
|
||||
fill_in "signature_sheet_signable_id", with: investment.id
|
||||
fill_in "signature_sheet_required_fields_to_verify", with: "12345678Z, 1234567L, 99999999Z"
|
||||
fill_in "signature_sheet_required_fields_to_verify", with: "12345678Z; 1234567L; 99999999Z"
|
||||
click_button "Create signature sheet"
|
||||
|
||||
expect(page).to have_content "Signature sheet created successfully"
|
||||
@@ -89,14 +89,14 @@ describe "Signature sheets" do
|
||||
user = Administrator.first.user
|
||||
signature_sheet = create(:signature_sheet,
|
||||
signable: proposal,
|
||||
required_fields_to_verify: "12345678Z, 123A, 123B",
|
||||
required_fields_to_verify: "12345678Z; 123A; 123B",
|
||||
author: user)
|
||||
signature_sheet.verify_signatures
|
||||
|
||||
visit admin_signature_sheet_path(signature_sheet)
|
||||
|
||||
expect(page).to have_content "Citizen proposal #{proposal.id}"
|
||||
expect(page).to have_content "12345678Z, 123A, 123B"
|
||||
expect(page).to have_content "12345678Z; 123A; 123B"
|
||||
expect(page).to have_content signature_sheet.created_at.strftime("%B %d, %Y %H:%M")
|
||||
expect(page).to have_content user.name
|
||||
|
||||
|
||||
Reference in New Issue
Block a user