force order place to index for type de champ
This commit is contained in:
parent
008fb396b7
commit
cf81623937
2 changed files with 3 additions and 1 deletions
|
@ -10,7 +10,7 @@
|
|||
%h4 Description
|
||||
= ff.text_area :description, class: 'form-control description', placeholder: 'Description'
|
||||
.form-group
|
||||
= ff.hidden_field :order_place
|
||||
= ff.hidden_field :order_place, value: ff.index
|
||||
= ff.hidden_field :id
|
||||
|
||||
/ .form-group.order_type_de_champ_button{id: "order_type_de_champ_#{type_de_champ.id || index}_button", style: ("display:none" if type_de_champ.id.nil?)}
|
||||
|
|
|
@ -35,6 +35,7 @@ feature 'add a new type de champs', js: true do
|
|||
expect(subject.libelle).to eq(libelle)
|
||||
expect(subject.type_champ).to eq(type_champ)
|
||||
expect(subject.description).to eq(description)
|
||||
expect(subject.order_place).to eq(0)
|
||||
end
|
||||
|
||||
context 'user fill another one' do
|
||||
|
@ -55,6 +56,7 @@ feature 'add a new type de champs', js: true do
|
|||
expect(subject.libelle).to eq(libelle)
|
||||
expect(subject.type_champ).to eq(type_champ)
|
||||
expect(subject.description).to eq(description)
|
||||
expect(subject.order_place).to eq(1)
|
||||
expect(procedure.types_de_champ.count).to eq(2)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue