Add some tests for the submission instructions

This commit is contained in:
Michael Ball 2021-03-08 02:13:57 -08:00
parent 1a24533b00
commit 2d1246448c
2 changed files with 7 additions and 1 deletions

View file

@ -23,6 +23,8 @@ FactoryBot.define do
length { 30 }
minimum_abstract_length { 0 }
maximum_abstract_length { 500 }
description { 'Example Event Description'}
submission_instructions { 'Example Event Instructions'}
color { '#ffffff' }
program
end

View file

@ -136,11 +136,15 @@ feature Event do
select('Example Event Type', from: 'event[event_type_id]')
expect(page).to have_selector(".in[id='#{find_field('event[event_type_id]').value}-help']") # End of animation
expect(page).to have_text('Example Event Description')
fill_in 'event_abstract', with: 'Lorem ipsum abstract'
expect(page).to have_text('You have used 3 words')
fill_in 'event_submission_text', with: 'Lorem ipsum submission_text'
expect(page).to have_text('Submission description')
expect(page).to have_text('Submission text')
# Submission Instructions content
expect(page).to have_text('Example Event Instructions')
click_link 'Do you require something special?'
fill_in 'event_description', with: 'Lorem ipsum description'