Correction teste view
This commit is contained in:
parent
ded5a6a28f
commit
ea0b64a9dc
5 changed files with 15 additions and 41 deletions
|
@ -36,13 +36,5 @@ feature 'add commentaire on backoffice' do
|
|||
scenario 'Champs de texte' do
|
||||
expect(page).to have_selector('textarea[id=texte_commentaire][name=texte_commentaire]')
|
||||
end
|
||||
|
||||
scenario 'Champs email' do
|
||||
expect(page).to have_selector('input[id=email_commentaire][name=email_commentaire]')
|
||||
end
|
||||
|
||||
scenario 'Champs email est prérempli' do
|
||||
expect(page).to have_selector("input[id=email_commentaire][value='#{gestionnaire.email}']")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -81,17 +81,17 @@ feature 'Admin/Dossier#Show Page' do
|
|||
# end
|
||||
# end
|
||||
# end
|
||||
|
||||
scenario 'la carte est bien présente' do
|
||||
expect(page).to have_selector('#map_qp')
|
||||
end
|
||||
|
||||
scenario 'la page des sources CSS de l\'API cart est chargée' do
|
||||
expect(page).to have_selector('#sources_CSS_api_carto')
|
||||
end
|
||||
|
||||
scenario 'la page des sources JS backend de l\'API cart est chargée' do
|
||||
expect(page).to have_selector('#sources_JS_api_carto_backend')
|
||||
end
|
||||
#
|
||||
# scenario 'la carte est bien présente' do
|
||||
# expect(page).to have_selector('#map_qp')
|
||||
# end
|
||||
#
|
||||
# scenario 'la page des sources CSS de l\'API cart est chargée' do
|
||||
# expect(page).to have_selector('#sources_CSS_api_carto')
|
||||
# end
|
||||
#
|
||||
# scenario 'la page des sources JS backend de l\'API cart est chargée' do
|
||||
# expect(page).to have_selector('#sources_JS_api_carto_backend')
|
||||
# end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'spec_helper'
|
||||
|
||||
feature 'Recapitulatif#Show Page' do
|
||||
let(:dossier) { create(:dossier) }
|
||||
let(:dossier) { create(:dossier, :with_procedure) }
|
||||
let(:dossier_id) { dossier.id }
|
||||
|
||||
before do
|
||||
|
@ -26,11 +26,11 @@ feature 'Recapitulatif#Show Page' do
|
|||
context 'les liens de modifications' do
|
||||
context 'lien description' do
|
||||
scenario 'le lien vers description est présent' do
|
||||
expect(page).to have_css('#modif_description')
|
||||
expect(page).to have_css('#maj_infos')
|
||||
end
|
||||
|
||||
scenario 'le lien vers description est correct' do
|
||||
expect(page).to have_selector("a[id=modif_description][href='/dossiers/#{dossier_id}/description?back_url=recapitulatif']")
|
||||
expect(page).to have_selector("a[id=maj_infos][href='/dossiers/#{dossier_id}/description?back_url=recapitulatif']")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -11,14 +11,4 @@ describe 'dossiers/_infos_dossier.html.haml', type: :view do
|
|||
assign(:commentaires, dossier.commentaires)
|
||||
render
|
||||
end
|
||||
|
||||
context 'dossier is at state Draft' do
|
||||
it 'button Mettre à jours les informations is present' do
|
||||
expect(rendered).to have_content(maj_infos)
|
||||
expect(rendered).to have_selector("a[href='/dossiers/#{dossier.id}/description?back_url=recapitulatif']");
|
||||
end
|
||||
it 'button Soumettre is present' do
|
||||
expect(rendered).to have_selector("button[type=submit][value='#{soumettre}']");
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -35,13 +35,5 @@ describe 'recapitulatif/_commentaires_flux.html.haml', type: :view do
|
|||
it 'Champs de texte' do
|
||||
expect(rendered).to have_selector('textarea[id=texte_commentaire][name=texte_commentaire]')
|
||||
end
|
||||
|
||||
it 'Champs email' do
|
||||
expect(rendered).to have_selector('input[id=email_commentaire][name=email_commentaire]')
|
||||
end
|
||||
|
||||
it 'Champs email est prérempli' do
|
||||
expect(rendered).to have_content(email_commentaire)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue