Merge pull request #9630 from tchak/fix-champ-address

fix(address): champ address should allow custom values
This commit is contained in:
mfo 2023-10-23 13:23:59 +00:00 committed by GitHub
commit 81ccc8ace2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View file

@ -1,2 +1,2 @@
= render Dsfr::ComboboxComponent.new form: @form, name: :value, url: data_sources_data_source_adresse_path, selected: @champ.value, id: @champ.input_id, class: 'fr-select', describedby: @champ.describedby_id do = render Dsfr::ComboboxComponent.new form: @form, name: :value, url: data_sources_data_source_adresse_path, selected: @champ.value, id: @champ.input_id, class: 'fr-select', describedby: @champ.describedby_id, allows_custom_value: true do
= @form.hidden_field :external_id, data: { value_slot: 'value' } = @form.hidden_field :external_id, data: { value_slot: 'value' }

View file

@ -176,6 +176,17 @@ describe 'The user' do
expect(page).to have_current_path(merci_dossier_path(user_dossier)) expect(page).to have_current_path(merci_dossier_path(user_dossier))
end end
scenario 'fill address not in BAN', js: true, retry: 3 do
log_in(user, procedure)
fill_individual
fill_in('address', with: '2 rue de la paix, 92094 Belgique')
wait_until {
champ_value_for('address') == '2 rue de la paix, 92094 Belgique'
}
expect(champ_for('address').full_address?).to be_falsey
end
scenario 'numbers champs formatting', js: true, retry: 3 do scenario 'numbers champs formatting', js: true, retry: 3 do
log_in(user, simple_procedure) log_in(user, simple_procedure)
fill_individual fill_individual