diff --git a/spec/models/champs/annuaire_education_champ_spec.rb b/spec/models/champs/annuaire_education_champ_spec.rb index 8c8f58be57f..3ac3a87a0a9 100644 --- a/spec/models/champs/annuaire_education_champ_spec.rb +++ b/spec/models/champs/annuaire_education_champ_spec.rb @@ -22,21 +22,19 @@ it_behaves_like "a data updater (without updating the value)", '' end - context 'when data is inconsistent' do - let(:data) { { 'yo' => 'lo' } } - it_behaves_like "a data updater (without updating the value)", { 'yo' => 'lo' } - end - context 'when data is consistent' do let(:data) { { - 'nom_etablissement': "karrigel an ankou", + 'nom_etablissement' => "karrigel an ankou", 'nom_commune' => 'kumun', 'identifiant_de_l_etablissement' => '666667' - }.with_indifferent_access + } + } + it_behaves_like "a data updater (without updating the value)", { + 'nom_etablissement' => "karrigel an ankou", + 'nom_commune' => 'kumun', + 'identifiant_de_l_etablissement' => '666667' } - it { expect { subject }.to change { champ.reload.data }.to(data) } - it { expect { subject }.to change { champ.reload.value }.to('karrigel an ankou, kumun (666667)') } end end end diff --git a/spec/system/users/brouillon_spec.rb b/spec/system/users/brouillon_spec.rb index 97498b83b56..2d3e587e179 100644 --- a/spec/system/users/brouillon_spec.rb +++ b/spec/system/users/brouillon_spec.rb @@ -38,11 +38,11 @@ select('02 – Aisne', from: form_id_for('departements')) fill_in('communes', with: '60400') - find('li', text: 'Brétigny (60400)').click + find('.fr-menu__item', text: 'Brétigny (60400)').click wait_until { champ_value_for('communes') == "Brétigny" } fill_in('address', with: '78 Rue du Grés 30310 Vergè') - find('li', text: '78 Rue du Grés 30310 Vergèze').click + find('.fr-menu__item', text: '78 Rue du Grés 30310 Vergèze').click wait_until { champ_value_for('address') == '78 Rue du Grés 30310 Vergèze' } wait_until { champ_for('address').full_address? } expect(champ_for('address').departement_code_and_name).to eq('30 – Gard') diff --git a/spec/views/instructeur/dossiers/_envoyer_dossier_block.html.haml_spec.rb b/spec/views/instructeur/dossiers/_envoyer_dossier_block.html.haml_spec.rb index 1c3107fbbe6..94b8d0e5712 100644 --- a/spec/views/instructeur/dossiers/_envoyer_dossier_block.html.haml_spec.rb +++ b/spec/views/instructeur/dossiers/_envoyer_dossier_block.html.haml_spec.rb @@ -13,7 +13,7 @@ let(:instructeur) { create(:instructeur, email: 'yop@totomail.fr') } let(:potential_recipients) { [instructeur] } - it { is_expected.to match(/data-react-props.*#{instructeur.email}/) } + it { is_expected.to match(/props.*#{instructeur.email}/) } it { is_expected.to have_css(".fr-btn") } end