test: various fix due to recent refactor

This commit is contained in:
Colin Darie 2024-11-14 16:53:35 +01:00
parent f6be8eb823
commit 9abac909df
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4
2 changed files with 6 additions and 6 deletions

View file

@ -157,7 +157,7 @@ describe 'The routing with rules', js: true do
# the search only show litteraires dossiers
fill_in 'q', with: scientifique_user.email
find('.fr-search-bar .fr-btn').click
expect(page).to have_text('0 dossier trouvé')
expect(page).to have_text('Aucun dossier')
# weird bug, capabary appends text instead of replaces it
# see https://github.com/redux-form/redux-form/issues/686
@ -284,7 +284,7 @@ describe 'The routing with rules', js: true do
expect(dossier.groupe_instructeur_id).to be_nil
expect(page).to have_text(procedure.service.nom)
choose(groupe)
choose(groupe, allow_label_click: true)
wait_for_autosave
expect(dossier.reload.groupe_instructeur_id).not_to be_nil
@ -303,7 +303,7 @@ describe 'The routing with rules', js: true do
click_on user.dossiers.first.procedure.libelle
click_on "Modifier mon dossier"
choose(new_group)
choose(new_group, allow_label_click: true)
wait_for_autosave
expect(page).to have_text(new_group)

View file

@ -25,20 +25,20 @@ describe 'dropdown list with other option activated', js: true do
scenario 'Select other option and the other input hidden must appear' do
fill_individual
choose I18n.t('shared.champs.drop_down_list.other')
choose I18n.t('shared.champs.drop_down_list.other'), allow_label_click: true
expect(page).to have_selector('.drop_down_other', visible: true)
end
scenario "Getting back from other save the new option" do
fill_individual
choose I18n.t('shared.champs.drop_down_list.other')
choose I18n.t('shared.champs.drop_down_list.other'), allow_label_click: true
fill_in(I18n.t('shared.champs.drop_down_list.other_label'), with: "My choice")
wait_until { user_dossier.reload.project_champs_public.first.value == "My choice" }
expect(user_dossier.project_champs_public.first.value).to eq("My choice")
choose "Secondary 1.1"
choose "Secondary 1.1", allow_label_click: true
wait_until { user_dossier.reload.project_champs_public.first.value == "Secondary 1.1" }
expect(user_dossier.project_champs_public.first.value).to eq("Secondary 1.1")