From a8d04d6fc82a92eba699baa227104b1294b9a1d5 Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Wed, 15 Sep 2021 13:35:48 +0200 Subject: [PATCH] test(routing): fix routing feature spec --- spec/features/routing/full_scenario_spec.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/features/routing/full_scenario_spec.rb b/spec/features/routing/full_scenario_spec.rb index dc5853468..c09c3f706 100644 --- a/spec/features/routing/full_scenario_spec.rb +++ b/spec/features/routing/full_scenario_spec.rb @@ -6,6 +6,7 @@ feature 'The routing', js: true do let(:litteraire_user) { create(:user, password: password) } before do + procedure.update(routing_enabled: true) procedure.defaut_groupe_instructeur.instructeurs << administrateur.instructeur end @@ -31,14 +32,14 @@ feature 'The routing', js: true do # add victor to littéraire groupe find("input[aria-label='email instructeur'").send_keys('victor@inst.com', :enter) perform_enqueued_jobs { click_on 'Affecter' } - expect(page).to have_text("Les instructeurs ont bien été affectés à la démarche") + expect(page).to have_text("L’instructeur victor@inst.com a été affecté au groupe « littéraire »") victor = User.find_by(email: 'victor@inst.com').instructeur # add superwoman to littéraire groupe find("input[aria-label='email instructeur'").send_keys('superwoman@inst.com', :enter) perform_enqueued_jobs { click_on 'Affecter' } - expect(page).to have_text("Les instructeurs ont bien été affectés à la démarche") + expect(page).to have_text("L’instructeur superwoman@inst.com a été affecté au groupe « littéraire »") superwoman = User.find_by(email: 'superwoman@inst.com').instructeur