diff --git a/app/views/administrateurs/procedures/_informations.html.haml b/app/views/administrateurs/procedures/_informations.html.haml index 52d8add12..80451473f 100644 --- a/app/views/administrateurs/procedures/_informations.html.haml +++ b/app/views/administrateurs/procedures/_informations.html.haml @@ -103,7 +103,7 @@ selected: @procedure.tags, disabled: [], label: 'Tags', - group: '.procedure-form__column--form', + group: '.procedure_tags_combo', name: 'tags', describedby: 'procedure-tags', acceptNewValues: true) diff --git a/app/views/administrateurs/procedures/edit.html.haml b/app/views/administrateurs/procedures/edit.html.haml index 7c03be268..0dee092c9 100644 --- a/app/views/administrateurs/procedures/edit.html.haml +++ b/app/views/administrateurs/procedures/edit.html.haml @@ -8,7 +8,7 @@ = render NestedForms::FormOwnerComponent.new = form_for @procedure, url: url_for({ controller: 'administrateurs/procedures', action: :update, id: @procedure.id }), - html: { class: 'form', multipart: true } do |f| + html: { class: 'form procedure_tags_combo', multipart: true } do |f| .fr-container .fr-grid-row .fr-col-12.fr-col-offset-sm-2.fr-col-sm-8 diff --git a/app/views/administrateurs/procedures/new.html.haml b/app/views/administrateurs/procedures/new.html.haml index 120a2c45e..fd1511d26 100644 --- a/app/views/administrateurs/procedures/new.html.haml +++ b/app/views/administrateurs/procedures/new.html.haml @@ -7,7 +7,7 @@ = render NestedForms::FormOwnerComponent.new = form_for @procedure, url: url_for({ controller: 'administrateurs/procedures', action: :create, id: @procedure.id }), - html: { class: 'form', multipart: true } do |f| + html: { class: 'form procedure_tags_combo', multipart: true } do |f| .fr-container .fr-grid-row .fr-col-12.fr-col-offset-sm-2.fr-col-sm-8 diff --git a/spec/system/administrateurs/procedure_creation_spec.rb b/spec/system/administrateurs/procedure_creation_spec.rb index c9a684209..f0c5ab84c 100644 --- a/spec/system/administrateurs/procedure_creation_spec.rb +++ b/spec/system/administrateurs/procedure_creation_spec.rb @@ -41,14 +41,6 @@ describe 'Creating a new procedure', js: true do add_champ expect(page).to have_selector('.type-de-champ', count: 1) - - click_on Procedure.last.libelle - - preview_window = window_opened_by { find('#preview-procedure').click } - within_window(preview_window) do - expect(page).to have_current_path(apercu_admin_procedure_path(Procedure.last)) - expect(page).to have_field('libelle de champ') - end end scenario 'a warning is displayed when creating an invalid procedure' do diff --git a/spec/system/administrateurs/procedure_publish_spec.rb b/spec/system/administrateurs/procedure_publish_spec.rb index 8fab1137b..82a970052 100644 --- a/spec/system/administrateurs/procedure_publish_spec.rb +++ b/spec/system/administrateurs/procedure_publish_spec.rb @@ -44,7 +44,6 @@ describe 'Publishing a procedure', js: true do click_on 'Publier' expect(page).to have_text('Démarche publiée') - expect(page).to have_selector('#preview-procedure') end context 'when the procedure has invalid champs' do @@ -93,7 +92,6 @@ describe 'Publishing a procedure', js: true do click_on 'publish' expect(page).to have_text('Démarche publiée') - expect(page).to have_selector('#preview-procedure') end end @@ -125,7 +123,6 @@ describe 'Publishing a procedure', js: true do find('#publish').click expect(page).to have_text('Démarche publiée') - expect(page).to have_selector('#preview-procedure') end end diff --git a/spec/system/administrateurs/procedure_update_spec.rb b/spec/system/administrateurs/procedure_update_spec.rb index 5624a70ab..19d006a51 100644 --- a/spec/system/administrateurs/procedure_update_spec.rb +++ b/spec/system/administrateurs/procedure_update_spec.rb @@ -32,10 +32,6 @@ describe 'Administrateurs can edit procedures', js: true do expect(page).to have_field('procedure_libelle', with: procedure.libelle) fill_in('procedure_libelle', with: 'Ma petite démarche') - within('.procedure-form__preview') do - expect(page).to have_content('Ma petite démarche') - end - click_on 'Enregistrer' expect(page).to have_selector('.fr-breadcrumb li', text: 'Ma petite démarche') diff --git a/spec/views/administrateurs/procedures/edit.html.haml_spec.rb b/spec/views/administrateurs/procedures/edit.html.haml_spec.rb index f1a061e93..1355dcad8 100644 --- a/spec/views/administrateurs/procedures/edit.html.haml_spec.rb +++ b/spec/views/administrateurs/procedures/edit.html.haml_spec.rb @@ -1,15 +1,5 @@ RSpec.describe 'administrateurs/procedures/edit', type: :view do - let(:logo) { fixture_file_upload('spec/fixtures/files/logo_test_procedure.png', 'image/png') } - let(:procedure) { create(:procedure, logo: logo, lien_site_web: 'http://some.website') } - - context 'when procedure logo is present' do - it 'display on the page' do - assign(:procedure, procedure) - render - - expect(rendered).to have_selector('.procedure-logos') - end - end + let(:procedure) { create(:procedure, lien_site_web: 'http://some.website') } context 'when opendata is enabled' do it 'asks for opendata' do