Skip to content

Commit

Permalink
test(routing): test routing on autosave
Browse files Browse the repository at this point in the history
  • Loading branch information
E-L-T committed Jun 7, 2024
1 parent f37d448 commit d7f5e7d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spec/system/routing/rules_full_scenario_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@
expect(page).to have_text('Le groupe d’instructeurs « artistique » a été créé. ')
expect(procedure.groupe_instructeurs.count).to eq(4)

# add contact_information to all groupes instructeur
procedure.groupe_instructeurs.each { |gi| gi.update!(contact_information: create(:contact_information)) }

# publish
publish_procedure(procedure)
log_out
Expand Down Expand Up @@ -267,9 +270,18 @@ def user_send_dossier(user, groupe)
# the old system should not be present
expect(page).not_to have_selector("#dossier_groupe_instructeur_id")

dossier = user.dossiers.first

expect(dossier.groupe_instructeur_id).to be_nil
expect(page).to have_text(procedure.service.nom)

choose(groupe)
wait_for_autosave

expect(dossier.reload.groupe_instructeur_id).not_to be_nil
expect(page).to have_text(dossier.service.nom)
expect(page).not_to have_text(procedure.service.nom)

click_on 'Déposer le dossier'
expect(page).to have_text('Merci')

Expand Down

0 comments on commit d7f5e7d

Please sign in to comment.