Merge pull request #2609 from betagouv/bump-capybara

Bump capybara (2.18.0 → 3.9.0)
This commit is contained in:
Paul Chavard 2018-12-04 10:41:33 +01:00 committed by GitHub
commit 022f419039
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 20 additions and 15 deletions

View file

@ -115,17 +115,18 @@ GEM
browser (2.5.3) browser (2.5.3)
builder (3.2.3) builder (3.2.3)
byebug (10.0.2) byebug (10.0.2)
capybara (2.18.0) capybara (3.11.0)
addressable addressable
mini_mime (>= 0.1.3) mini_mime (>= 0.1.3)
nokogiri (>= 1.3.3) nokogiri (~> 1.8)
rack (>= 1.0.0) rack (>= 1.6.0)
rack-test (>= 0.5.4) rack-test (>= 0.6.3)
xpath (>= 2.0, < 4.0) regexp_parser (~> 1.2)
xpath (~> 3.2)
capybara-email (3.0.1) capybara-email (3.0.1)
capybara (>= 2.4, < 4.0) capybara (>= 2.4, < 4.0)
mail mail
capybara-screenshot (1.0.21) capybara-screenshot (1.0.22)
capybara (>= 1.0, < 4) capybara (>= 1.0, < 4)
launchy launchy
capybara-selenium (0.0.6) capybara-selenium (0.0.6)
@ -416,7 +417,7 @@ GEM
pry-byebug (3.6.0) pry-byebug (3.6.0)
byebug (~> 10.0) byebug (~> 10.0)
pry (~> 0.10) pry (~> 0.10)
public_suffix (3.0.2) public_suffix (3.0.3)
puma (3.12.0) puma (3.12.0)
rack (2.0.6) rack (2.0.6)
rack-handlers (0.7.3) rack-handlers (0.7.3)
@ -476,6 +477,7 @@ GEM
ffi ffi
rbnacl-libsodium (1.0.16) rbnacl-libsodium (1.0.16)
rbnacl (>= 3.0.1) rbnacl (>= 3.0.1)
regexp_parser (1.3.0)
request_store (1.4.1) request_store (1.4.1)
rack (>= 1.4) rack (>= 1.4)
responders (2.4.0) responders (2.4.0)
@ -643,7 +645,7 @@ GEM
websocket-driver (0.7.0) websocket-driver (0.7.0)
websocket-extensions (>= 0.1.0) websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.3) websocket-extensions (0.1.3)
xpath (3.0.0) xpath (3.2.0)
nokogiri (~> 1.8) nokogiri (~> 1.8)
xray-rails (0.3.1) xray-rails (0.3.1)
rails (>= 3.1.0) rails (>= 3.1.0)

View file

@ -111,7 +111,7 @@ describe SupportController, type: :controller do
get :index get :index
expect(response.status).to eq(200) expect(response.status).to eq(200)
expect(response.body).to have_content("Email *") expect(response.body).to have_text("Email")
end end
end end

View file

@ -22,7 +22,7 @@ feature 'The user' do
# fill data # fill data
fill_in('text', with: 'super texte') fill_in('text', with: 'super texte')
fill_in('textarea', with: 'super textarea') fill_in('textarea', with: 'super textarea')
fill_in('date', with: '12/12/2012') fill_in('date', with: '12-12-2012')
select_date_and_time(Time.zone.parse('06/01/1985 7h05'), form_id_for('datetime')) select_date_and_time(Time.zone.parse('06/01/1985 7h05'), form_id_for('datetime'))
fill_in('number', with: '42') fill_in('number', with: '42')
check('checkbox') check('checkbox')

View file

@ -7,7 +7,7 @@ RSpec.describe AvisMailer, type: :mailer do
subject { described_class.avis_invitation(avis) } subject { described_class.avis_invitation(avis) }
it { expect(subject.subject).to eq("Donnez votre avis sur le dossier nº #{avis.dossier.id} (#{avis.dossier.procedure.libelle})") } it { expect(subject.subject).to eq("Donnez votre avis sur le dossier nº #{avis.dossier.id} (#{avis.dossier.procedure.libelle})") }
it { expect(subject.body).to have_text("Vous avez été invité par #{avis.claimant.email} à donner votre avis sur le dossier nº #{avis.dossier.id} de la démarche : #{avis.dossier.procedure.libelle}") } it { expect(subject.body).to have_text("Vous avez été invité par\n#{avis.claimant.email}\nà donner votre avis sur le dossier nº #{avis.dossier.id} de la démarche :\n#{avis.dossier.procedure.libelle}") }
it { expect(subject.body).to include(avis.introduction) } it { expect(subject.body).to include(avis.introduction) }
it { expect(subject.body).to include(gestionnaire_avis_url(avis)) } it { expect(subject.body).to include(gestionnaire_avis_url(avis)) }

View file

@ -48,6 +48,9 @@ Capybara.register_driver :headless_chrome do |app|
desired_capabilities: capabilities desired_capabilities: capabilities
end end
# FIXME: remove this line when https://github.com/rspec/rspec-rails/issues/1897 has been fixed
Capybara.server = :puma, { Silent: true }
Capybara.default_max_wait_time = 2 Capybara.default_max_wait_time = 2
# Save a snapshot of the HTML page when an integration test fails # Save a snapshot of the HTML page when an integration test fails

View file

@ -10,7 +10,7 @@ describe 'new_gestionnaire/dossiers/show.html.haml', type: :view do
subject! { render } subject! { render }
it 'renders the header' do it 'renders the header' do
expect(rendered).to have_text("Dossier nº #{dossier.id}") expect(rendered).to have_text("Dossier nº #{dossier.id}")
end end
it 'renders the dossier infos' do it 'renders the dossier infos' do

View file

@ -12,7 +12,7 @@ describe 'new_user/dossiers/demande.html.haml', type: :view do
subject! { render } subject! { render }
it 'renders the header' do it 'renders the header' do
expect(rendered).to have_text("Dossier nº #{dossier.id}") expect(rendered).to have_text("Dossier nº #{dossier.id}")
end end
it 'renders the dossier infos' do it 'renders the dossier infos' do

View file

@ -11,7 +11,7 @@ describe 'new_user/dossiers/show.html.haml', type: :view do
subject! { render } subject! { render }
it 'renders a summary of the dossier state' do it 'renders a summary of the dossier state' do
expect(rendered).to have_text("Dossier nº #{dossier.id}") expect(rendered).to have_text("Dossier nº #{dossier.id}")
expect(rendered).to have_selector('.status-overview') expect(rendered).to have_selector('.status-overview')
end end

View file

@ -9,7 +9,7 @@ describe 'new_user/dossiers/show/header.html.haml', type: :view do
it 'affiche les informations du dossier' do it 'affiche les informations du dossier' do
expect(rendered).to have_text(dossier.procedure.libelle) expect(rendered).to have_text(dossier.procedure.libelle)
expect(rendered).to have_text("Dossier nº #{dossier.id}") expect(rendered).to have_text("Dossier nº #{dossier.id}")
expect(rendered).to have_text("en construction") expect(rendered).to have_text("en construction")
expect(rendered).to have_selector("ul.tabs") expect(rendered).to have_selector("ul.tabs")