[Fix #1689] Only allow plain text for procedure descriptions

This commit is contained in:
Frederic Merizen 2018-03-28 17:30:08 +02:00
parent 657d8d9368
commit d825c3d586
3 changed files with 4 additions and 4 deletions

View file

@ -7,7 +7,7 @@
%h4
= value
- if key == :description
= f.text_area key, rows: '6', placeholder: 'Description du projet', class: 'form-control wysihtml5'
= f.text_area key, rows: '6', placeholder: 'Description du projet', class: 'form-control'
- else
= f.text_field key, class: 'form-control', placeholder: value

View file

@ -12,7 +12,7 @@ feature 'As an administrateur I wanna clone a procedure', js: true do
before 'Create procedure' do
page.find_by_id('new-procedure').click
fill_in 'procedure_libelle', with: 'libelle de la procedure'
page.execute_script("$('#procedure_description').data('wysihtml5').editor.setValue('description de la procedure')")
page.execute_script("$('#procedure_description').val('description de la procedure')")
fill_in 'procedure_organisation', with: 'organisme de la procedure'
page.find_by_id('save-procedure').click
end

View file

@ -36,7 +36,7 @@ feature 'As an administrateur I wanna create a new procedure', js: true do
page.find_by_id('save-procedure').click
page.find_by_id('flash_message').visible?
fill_in 'procedure_libelle', with: 'libelle de la procedure'
page.execute_script("$('#procedure_description').data('wysihtml5').editor.setValue('description de la procedure')")
page.execute_script("$('#procedure_description').val('description de la procedure')")
fill_in 'procedure_organisation', with: 'organisme de la procedure'
page.find_by_id('save-procedure').click
expect(page).to have_current_path(admin_procedure_types_de_champ_path(Procedure.first.id.to_s))
@ -47,7 +47,7 @@ feature 'As an administrateur I wanna create a new procedure', js: true do
before 'Create procedure' do
page.find_by_id('new-procedure').click
fill_in 'procedure_libelle', with: 'libelle de la procedure'
page.execute_script("$('#procedure_description').data('wysihtml5').editor.setValue('description de la procedure')")
page.execute_script("$('#procedure_description').val('description de la procedure')")
fill_in 'procedure_organisation', with: 'organisme de la procedure'
page.find_by_id('save-procedure').click
end