Add editing submission instructions
This commit is contained in:
parent
3d99661d02
commit
bc4177154a
4 changed files with 10 additions and 2 deletions
|
|
@ -49,7 +49,7 @@ module Admin
|
||||||
private
|
private
|
||||||
|
|
||||||
def event_type_params
|
def event_type_params
|
||||||
params.require(:event_type).permit(:title, :length, :minimum_abstract_length, :maximum_abstract_length, :color, :conference_id, :description)
|
params.require(:event_type).permit(:title, :length, :minimum_abstract_length, :maximum_abstract_length, :submission_instructions, :color, :conference_id, :description)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@
|
||||||
= f.input :description, as: :text, hint: markdown_hint, input_html: { rows: 5, data: { provide: 'markdown-editable' } }
|
= f.input :description, as: :text, hint: markdown_hint, input_html: { rows: 5, data: { provide: 'markdown-editable' } }
|
||||||
= f.input :minimum_abstract_length, input_html: {size: 3}
|
= f.input :minimum_abstract_length, input_html: {size: 3}
|
||||||
= f.input :maximum_abstract_length, input_html: {size: 3}
|
= f.input :maximum_abstract_length, input_html: {size: 3}
|
||||||
|
= f.input :submission_instructions, as: :text, hint: markdown_hint, input_html: { rows: 5, data: { provide: 'markdown-editable' } }
|
||||||
= f.input :color, input_html: { size: 6, type: 'color' }
|
= f.input :color, input_html: { size: 6, type: 'color' }
|
||||||
%p.text-right
|
%p.text-right
|
||||||
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
|
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
%thead
|
%thead
|
||||||
%th Title
|
%th Title
|
||||||
%th Description
|
%th Description
|
||||||
|
%th Instructions
|
||||||
%th Length
|
%th Length
|
||||||
%th Abstract Length
|
%th Abstract Length
|
||||||
%th Color
|
%th Color
|
||||||
|
|
@ -21,6 +22,8 @@
|
||||||
= event_type.title
|
= event_type.title
|
||||||
%td
|
%td
|
||||||
= markdown(event_type.description)
|
= markdown(event_type.description)
|
||||||
|
%td
|
||||||
|
= markdown(event_type.submission_instructions)
|
||||||
%td
|
%td
|
||||||
= event_type.length
|
= event_type.length
|
||||||
Minutes
|
Minutes
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,8 @@ feature EventType do
|
||||||
|
|
||||||
fill_in 'event_type_title', with: 'Party'
|
fill_in 'event_type_title', with: 'Party'
|
||||||
fill_in 'event_type_length', with: '240'
|
fill_in 'event_type_length', with: '240'
|
||||||
fill_in 'event_type_description', with: '### This is a description'
|
fill_in 'event_type_description', with: '**Description**'
|
||||||
|
fill_in 'event_type_submission_instructions', with: '**Instructions**'
|
||||||
fill_in 'event_type_minimum_abstract_length', with: '0'
|
fill_in 'event_type_minimum_abstract_length', with: '0'
|
||||||
fill_in 'event_type_maximum_abstract_length', with: '13042'
|
fill_in 'event_type_maximum_abstract_length', with: '13042'
|
||||||
page.find('#event_type_color').set('#e4e4e4')
|
page.find('#event_type_color').set('#e4e4e4')
|
||||||
|
|
@ -30,11 +31,14 @@ feature EventType do
|
||||||
click_button 'Create Event type'
|
click_button 'Create Event type'
|
||||||
page.find('#flash')
|
page.find('#flash')
|
||||||
# Validations
|
# Validations
|
||||||
|
# binding.pry
|
||||||
expect(flash).to eq('Event type successfully created.')
|
expect(flash).to eq('Event type successfully created.')
|
||||||
within('table#event_types') do
|
within('table#event_types') do
|
||||||
expect(page.has_content?('Party')).to be true
|
expect(page.has_content?('Party')).to be true
|
||||||
expect(page.has_content?('13042')).to be true
|
expect(page.has_content?('13042')).to be true
|
||||||
expect(page.has_content?('#E4E4E4')).to be true
|
expect(page.has_content?('#E4E4E4')).to be true
|
||||||
|
expect(page.has_content?('Description')).to be true
|
||||||
|
expect(page.has_content?('Instructions')).to be true
|
||||||
expect(page.assert_selector('tr', count: 3)).to be true
|
expect(page.assert_selector('tr', count: 3)).to be true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue