Merge branch 'main' into feature/prefill_repetible
This commit is contained in:
parent
4b3d403d7e
commit
4876d583b6
33 changed files with 613 additions and 76 deletions
|
@ -1,4 +1,6 @@
|
|||
describe 'Prefilling a dossier (with a GET request):' do
|
||||
let(:memory_store) { ActiveSupport::Cache.lookup_store(:memory_store) }
|
||||
|
||||
let(:password) { 'my-s3cure-p4ssword' }
|
||||
|
||||
let(:procedure) { create(:procedure, :published, opendata: true) }
|
||||
|
@ -16,6 +18,21 @@ describe 'Prefilling a dossier (with a GET request):' do
|
|||
let(:integer_repetition_libelle) { sub_type_de_champs_repetition.second.libelle }
|
||||
let(:text_repetition_value) { "First repetition text" }
|
||||
let(:integer_repetition_value) { "42" }
|
||||
let(:type_de_champ_epci) { create(:type_de_champ_epci, procedure: procedure) }
|
||||
let(:epci_value) { ['01', '200029999'] }
|
||||
|
||||
before do
|
||||
allow(Rails).to receive(:cache).and_return(memory_store)
|
||||
Rails.cache.clear
|
||||
|
||||
VCR.insert_cassette('api_geo_departements')
|
||||
VCR.insert_cassette('api_geo_epcis')
|
||||
end
|
||||
|
||||
after do
|
||||
VCR.eject_cassette('api_geo_departements')
|
||||
VCR.eject_cassette('api_geo_epcis')
|
||||
end
|
||||
|
||||
context 'when authenticated' do
|
||||
it_behaves_like "the user has got a prefilled dossier, owned by themselves" do
|
||||
|
@ -35,7 +52,8 @@ describe 'Prefilling a dossier (with a GET request):' do
|
|||
\"#{sub_type_de_champs_repetition.second.to_typed_id}\": \"#{integer_repetition_value}\"
|
||||
}"
|
||||
],
|
||||
"champ_#{type_de_champ_datetime.to_typed_id}" => datetime_value
|
||||
"champ_#{type_de_champ_datetime.to_typed_id}" => datetime_value,
|
||||
"champ_#{type_de_champ_epci.to_typed_id}" => epci_value
|
||||
)
|
||||
|
||||
click_on "Poursuivre mon dossier prérempli"
|
||||
|
@ -55,7 +73,8 @@ describe 'Prefilling a dossier (with a GET request):' do
|
|||
\"#{sub_type_de_champs_repetition.second.to_typed_id}\": \"#{integer_repetition_value}\"
|
||||
}"
|
||||
],
|
||||
"champ_#{type_de_champ_datetime.to_typed_id}" => datetime_value
|
||||
"champ_#{type_de_champ_datetime.to_typed_id}" => datetime_value,
|
||||
"champ_#{type_de_champ_epci.to_typed_id}" => epci_value
|
||||
)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue