Merge pull request #4589 from betagouv/upgrade-capybara

Mise à jour de Capybara
This commit is contained in:
Pierre de La Morinerie 2019-11-28 12:25:53 +01:00 committed by GitHub
commit 23af0d5d93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 22 deletions

View file

@ -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'

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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 ny a aucun dossier' do