rend accessible l'affectation d'un instructeur

en remplaçant select2 par ComboMultipleDropdownList
This commit is contained in:
Christophe Robillard 2021-02-11 15:36:11 +01:00 committed by Paul Chavard
parent 3fc7b57b8c
commit 7565a25b51
4 changed files with 18 additions and 17 deletions

View file

@ -30,14 +30,16 @@ feature 'The routing', js: true do
expect(page).to have_field('Nom du groupe', with: 'littéraire')
# add victor to littéraire groupe
find('input.select2-search__field').send_keys('victor@inst.com', :enter)
# find('input.select2-search__field').send_keys('victor@inst.com', :enter)
find("input[aria-label='email instructeur'").send_keys('victor@inst.com', :enter)
click_on 'Affecter'
perform_enqueued_jobs { click_on 'Affecter' }
expect(page).to have_text("Les instructeurs ont bien été affectés à la démarche")
victor = User.find_by(email: 'victor@inst.com').instructeur
# add superwoman to littéraire groupe
find('input.select2-search__field').send_keys('superwoman@inst.com', :enter)
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")
@ -50,14 +52,14 @@ feature 'The routing', js: true do
expect(page).to have_text('Le groupe dinstructeurs « scientifique » a été créé.')
# add marie to scientifique groupe
find('input.select2-search__field').send_keys('marie@inst.com', :enter)
find("input[aria-label='email instructeur'").send_keys('marie@inst.com', :enter)
perform_enqueued_jobs { click_on 'Affecter' }
expect(page).to have_text("Linstructeur marie@inst.com a été affecté")
marie = User.find_by(email: 'marie@inst.com').instructeur
# add superwoman to scientifique groupe
find('input.select2-search__field').send_keys('superwoman@inst.com', :enter)
find("input[aria-label='email instructeur'").send_keys('superwoman@inst.com', :enter)
perform_enqueued_jobs { click_on 'Affecter' }
expect(page).to have_text("Linstructeur superwoman@inst.com a été affecté")