Fix type de champ menu déroulant

This commit is contained in:
Paul Chavard 2019-04-03 21:53:57 +02:00
parent a3ba9e370d
commit 8157fd0127
2 changed files with 14 additions and 2 deletions

View file

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
function TypeDeChampDropDownOptions({ isVisible, value, handler }) { function TypeDeChampDropDownOptions({ isVisible, handler }) {
if (isVisible) { if (isVisible) {
return ( return (
<div className="cell"> <div className="cell">
@ -9,7 +9,7 @@ function TypeDeChampDropDownOptions({ isVisible, value, handler }) {
<textarea <textarea
id={handler.id} id={handler.id}
name={handler.name} name={handler.name}
value={value} value={handler.value}
onChange={handler.onChange} onChange={handler.onChange}
rows={3} rows={3}
cols={40} cols={40}

View file

@ -133,4 +133,16 @@ feature 'As an administrateur I can edit types de champ', js: true do
expect(page).not_to have_content('Cadastres') expect(page).not_to have_content('Cadastres')
end end
end end
it "Add dropdown champ" do
select('Menu déroulant', from: 'champ-0-type_champ')
fill_in 'champ-0-libelle', with: 'libellé de champ menu déroulant'
blur
fill_in 'champ-0-drop_down_list_value', with: 'Un menu'
expect(page).to have_content('Formulaire enregistré')
page.refresh
expect(page).to have_content('Un menu')
end
end end