diff --git a/Gemfile b/Gemfile index 3a224b34a..20ddf1137 100644 --- a/Gemfile +++ b/Gemfile @@ -76,7 +76,7 @@ gem 'zipline' gem 'zxcvbn-ruby', require: 'zxcvbn' group :test do - gem 'capybara', '3.13.2' # Integration testing + gem 'capybara' # Integration testing gem 'capybara-email' # Access emails during integration tests gem 'capybara-screenshot' # Save a dump of the page when an integration test fails gem 'capybara-selenium' diff --git a/Gemfile.lock b/Gemfile.lock index 9efd53568..b516e9f39 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -119,13 +119,13 @@ GEM browser (2.5.3) builder (3.2.3) byebug (10.0.2) - capybara (3.13.2) + capybara (3.29.0) addressable mini_mime (>= 0.1.3) nokogiri (~> 1.8) rack (>= 1.6.0) rack-test (>= 0.6.3) - regexp_parser (~> 1.2) + regexp_parser (~> 1.5) xpath (~> 3.2) capybara-email (3.0.1) capybara (>= 2.4, < 4.0) @@ -719,7 +719,7 @@ DEPENDENCIES brakeman browser byebug - capybara (= 3.13.2) + capybara capybara-email capybara-screenshot capybara-selenium diff --git a/spec/features/instructeurs/procedure_filters_spec.rb b/spec/features/instructeurs/procedure_filters_spec.rb index 5753111bd..144305ff7 100644 --- a/spec/features/instructeurs/procedure_filters_spec.rb +++ b/spec/features/instructeurs/procedure_filters_spec.rb @@ -25,10 +25,10 @@ feature "procedure filters" do scenario "should list all dossiers" do within ".dossiers-table" do - expect(page).to have_link(new_unfollow_dossier.id) + expect(page).to have_link(new_unfollow_dossier.id.to_s) expect(page).to have_link(new_unfollow_dossier.user.email) - expect(page).to have_link(new_unfollow_dossier_2.id) + expect(page).to have_link(new_unfollow_dossier_2.id.to_s) expect(page).to have_link(new_unfollow_dossier_2.user.email) end end @@ -61,20 +61,20 @@ feature "procedure filters" do expect(page).to have_content("#{type_de_champ.libelle} : #{champ.value}") within ".dossiers-table" do - expect(page).to have_link(new_unfollow_dossier.id, exact: true) + expect(page).to have_link(new_unfollow_dossier.id.to_s, exact: true) expect(page).to have_link(new_unfollow_dossier.user.email) - expect(page).not_to have_link(new_unfollow_dossier_2.id, exact: true) + expect(page).not_to have_link(new_unfollow_dossier_2.id.to_s, exact: true) expect(page).not_to have_link(new_unfollow_dossier_2.user.email) end remove_filter(champ.value) within ".dossiers-table" do - expect(page).to have_link(new_unfollow_dossier.id) + expect(page).to have_link(new_unfollow_dossier.id.to_s) expect(page).to have_link(new_unfollow_dossier.user.email) - expect(page).to have_link(new_unfollow_dossier_2.id) + expect(page).to have_link(new_unfollow_dossier_2.id.to_s) expect(page).to have_link(new_unfollow_dossier_2.user.email) end end @@ -86,30 +86,30 @@ feature "procedure filters" do expect(page).to have_content("#{type_de_champ.libelle} : #{champ.value}") within ".dossiers-table" do - expect(page).to have_link(new_unfollow_dossier.id, exact: true) + expect(page).to have_link(new_unfollow_dossier.id.to_s, exact: true) expect(page).to have_link(new_unfollow_dossier.user.email) - expect(page).to have_link(new_unfollow_dossier_2.id, exact: true) + expect(page).to have_link(new_unfollow_dossier_2.id.to_s, exact: true) expect(page).to have_link(new_unfollow_dossier_2.user.email) end remove_filter(champ.value) within ".dossiers-table" do - expect(page).not_to have_link(new_unfollow_dossier.id, exact: true) + expect(page).not_to have_link(new_unfollow_dossier.id.to_s, exact: true) expect(page).not_to have_link(new_unfollow_dossier.user.email) - expect(page).to have_link(new_unfollow_dossier_2.id, exact: true) + expect(page).to have_link(new_unfollow_dossier_2.id.to_s, exact: true) expect(page).to have_link(new_unfollow_dossier_2.user.email) end remove_filter(champ_2.value) within ".dossiers-table" do - expect(page).to have_link(new_unfollow_dossier.id, exact: true) + expect(page).to have_link(new_unfollow_dossier.id.to_s, exact: true) expect(page).to have_link(new_unfollow_dossier.user.email) - expect(page).to have_link(new_unfollow_dossier_2.id, exact: true) + expect(page).to have_link(new_unfollow_dossier_2.id.to_s, exact: true) expect(page).to have_link(new_unfollow_dossier_2.user.email) end end diff --git a/spec/features/users/invite_spec.rb b/spec/features/users/invite_spec.rb index 5651743f0..2a7d4a26f 100644 --- a/spec/features/users/invite_spec.rb +++ b/spec/features/users/invite_spec.rb @@ -104,13 +104,13 @@ feature 'Invitations' do def navigate_to_brouillon(dossier) expect(page).to have_current_path(dossiers_path) - click_on(dossier.id) + click_on(dossier.id.to_s) expect(page).to have_current_path(brouillon_dossier_path(dossier)) end def navigate_to_dossier(dossier) expect(page).to have_current_path(dossiers_path) - click_on(dossier.id) + click_on(dossier.id.to_s) expect(page).to have_current_path(dossier_path(dossier)) end diff --git a/spec/views/users/dossiers/index.html.haml_spec.rb b/spec/views/users/dossiers/index.html.haml_spec.rb index f220b8f86..e908b5678 100644 --- a/spec/views/users/dossiers/index.html.haml_spec.rb +++ b/spec/views/users/dossiers/index.html.haml_spec.rb @@ -24,13 +24,13 @@ describe 'users/dossiers/index.html.haml', type: :view do it 'affiche les informations des dossiers' do dossier = user_dossiers.first - expect(rendered).to have_text(dossier_brouillon.id) + expect(rendered).to have_text(dossier_brouillon.id.to_s) expect(rendered).to have_text(dossier_brouillon.procedure.libelle) - expect(rendered).to have_link(dossier_brouillon.id, href: brouillon_dossier_path(dossier_brouillon)) + expect(rendered).to have_link(dossier_brouillon.id.to_s, href: brouillon_dossier_path(dossier_brouillon)) - expect(rendered).to have_text(dossier_en_construction.id) + expect(rendered).to have_text(dossier_en_construction.id.to_s) expect(rendered).to have_text(dossier_en_construction.procedure.libelle) - expect(rendered).to have_link(dossier_en_construction.id, href: dossier_path(dossier_en_construction)) + expect(rendered).to have_link(dossier_en_construction.id.to_s, href: dossier_path(dossier_en_construction)) end context 'quand il n’y a aucun dossier' do