Merge pull request #3742 from tchak/fix-editor-bug

Fix type de champ menu déroulant
This commit is contained in:
Paul Chavard 2019-04-03 22:00:55 +02:00 committed by GitHub
commit 8e3d85ac84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 2 deletions

View file

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