From ea0b64a9dc235537f1e5611f9731e51ae159748d Mon Sep 17 00:00:00 2001 From: Xavier J Date: Thu, 24 Sep 2015 10:42:14 +0200 Subject: [PATCH] Correction teste view --- .../backoffice/add_commentaire_spec.rb | 8 ------- .../backoffice/display_dossier_page_spec.rb | 24 +++++++++---------- .../recapitulatif_page/show_page_spec.rb | 6 ++--- spec/views/dossiers/_infos_dossier_spec.rb | 10 -------- .../recapitulatif/_commentaires_flux_spec.rb | 8 ------- 5 files changed, 15 insertions(+), 41 deletions(-) diff --git a/spec/features/backoffice/add_commentaire_spec.rb b/spec/features/backoffice/add_commentaire_spec.rb index 41d9af70e..2205ad2e5 100644 --- a/spec/features/backoffice/add_commentaire_spec.rb +++ b/spec/features/backoffice/add_commentaire_spec.rb @@ -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 diff --git a/spec/features/backoffice/display_dossier_page_spec.rb b/spec/features/backoffice/display_dossier_page_spec.rb index 9ba322b42..154b2d96a 100644 --- a/spec/features/backoffice/display_dossier_page_spec.rb +++ b/spec/features/backoffice/display_dossier_page_spec.rb @@ -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 diff --git a/spec/features/recapitulatif_page/show_page_spec.rb b/spec/features/recapitulatif_page/show_page_spec.rb index f5959a26d..ef380cdbd 100644 --- a/spec/features/recapitulatif_page/show_page_spec.rb +++ b/spec/features/recapitulatif_page/show_page_spec.rb @@ -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 diff --git a/spec/views/dossiers/_infos_dossier_spec.rb b/spec/views/dossiers/_infos_dossier_spec.rb index 686990878..d560d09e3 100644 --- a/spec/views/dossiers/_infos_dossier_spec.rb +++ b/spec/views/dossiers/_infos_dossier_spec.rb @@ -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 diff --git a/spec/views/recapitulatif/_commentaires_flux_spec.rb b/spec/views/recapitulatif/_commentaires_flux_spec.rb index 9eaffbc8b..fb320f4a8 100644 --- a/spec/views/recapitulatif/_commentaires_flux_spec.rb +++ b/spec/views/recapitulatif/_commentaires_flux_spec.rb @@ -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